OFFSET
0,2
FORMULA
a(n) = A135342(n) + 1.
a(n) = 2*a(n-1) - a(n-2) + phi(n-1) for n>3. - Chai Wah Wu, Feb 22 2023
EXAMPLE
The a(3) = 6 distinct means are 0, 1, 3/2, 2, 5/2, 3.
MAPLE
a:= proc(n) option remember; `if`(n<4, [1, 2, 4, 6][n+1],
2*a(n-1)-a(n-2)+numtheory[phi](n-1))
end:
seq(a(n), n=0..50); # Alois P. Heinz, Feb 22 2023
MATHEMATICA
Table[Length[Union[Mean/@Subsets[Range[n]]]], {n, 0, 10}]
PROG
(Python)
from itertools import count, islice
from sympy import totient
def A327474_gen(): # generator of terms
a, b = 4, 6
yield from (1, 2, 4, 6)
for n in count(3):
a, b = b, (b<<1)-a+totient(n)
yield b
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 13 2019
STATUS
approved