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!)
A114976 Number of subsets of {1,2,....,n} with an arithmetic mean that is an integer and also a divisor of n. 3
1, 2, 2, 5, 2, 14, 2, 30, 11, 80, 2, 280, 2, 764, 128, 2557, 2, 9036, 2, 29656, 1958, 103134, 2, 373454, 119, 1300824, 36992, 4681568, 2, 17119030, 2, 61799636, 758982, 226451040, 2180, 837469677, 2, 3084255132, 16391220, 11451833394, 2, 42746493556, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(n) <= A051293(n);
a(n) = 2 iff n is prime, just as for the number of divisors of n and also, at least for the very first terms, a(n)=odd iff n is a square: these observations might suggest conjectures on a deeper relationship with A000005.
LINKS
EXAMPLE
a(9) = 11: {1}, {3}, {9}, {1,5}, {2,4}, {1,2,6}, {1,3,5}, {2,3,4}, {1,2,3,6}, {1,2,4,5} and {1,2,3,4,5}, e.g. also {1,4,7} has an integral arithmetic mean, but (1+4+7)/3 = 4 is not a divisor of 9.
MAPLE
b:= proc(n, m, s, c) option remember; `if`(n=0,
`if`(c>0 and denom(s)=1 and irem(m, s)=0, 1, 0),
b(n-1, m, s, c)+b(n-1, m, (s*c+n)/(c+1), c+1))
end:
a:= proc(n) option remember; forget (b); b(n$2, 0$2) end:
seq(a(n), n=1..50); # Alois P. Heinz, Jul 15 2019
MATHEMATICA
b[n_, m_, s_, c_] := b[n, m, s, c] = If[n==0, If[c>0 && Denominator[s]==1 && Mod[m, s]==0, 1, 0], b[n-1, m, s, c]+b[n-1, m, (s c + n)/(c+1), c+1]];
a[n_] := b[n, n, 0, 0];
Array[a, 50] (* Jean-François Alcover, Nov 04 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A068058 A192233 A144943 * A085483 A271654 A271622
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 22 2006
EXTENSIONS
a(27)-a(38) from Donovan Johnson, Jun 10 2010
a(39)-a(43) from Alois P. Heinz, Jul 15 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 April 25 13:02 EDT 2024. Contains 371969 sequences. (Running on oeis4.)