The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A327474 Number of distinct means of subsets of {1..n}, where {} has mean 0. 6
1, 2, 4, 6, 10, 16, 26, 38, 56, 78, 106, 138, 180, 226, 284, 348, 420, 500, 596, 698, 818, 946, 1086, 1236, 1408, 1588, 1788, 2000, 2230, 2472, 2742, 3020, 3328, 3652, 3996, 4356, 4740, 5136, 5568, 6018, 6492, 6982, 7512, 8054, 8638, 9242, 9870, 10520, 11216 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
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
A327474_list = list(islice(A327474_gen(), 30)) # Chai Wah Wu, Feb 22 2023
CROSSREFS
The version for only nonempty subsets is A135342.
Sequence in context: A006305 A067247 A017985 * A347207 A028488 A280341
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 13 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 23:22 EDT 2024. Contains 372535 sequences. (Running on oeis4.)