OFFSET
1,3
COMMENTS
For n odd the value of the arithmetic mean for each possible subset equals (n+1)/2. For n even this value is n/2 or (n+2)/2. If looking after RootMeanSquare for the subset we obtain a sequence [1,0,0,0,0,0,2,...]. We see for example for n=7, A={1,2,3,4,5,6,7} and the only 2 subsets with an integer RootMeanSquare are {1,7}, {1,5,7}. Interestingly the value of RootMeanSquare is 5 for both subsets. So the sequence A140480 RMS numbers is a subsequence of it as a set of divisors of n is clearly a subset of n of the form {1,...,n}.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..100
Eric Weisstein's World of Mathematics, Arithmetic mean
EXAMPLE
n=5, A={1,2,3,4,5}. Subsets of A starting with 1 and ending with 5 are : {1,5}, {1,2,5}, {1,3,5}, {1,4,5}, {1,2,3,5}, {1,2,4,5}, {1,3,4,5}, {1,2,3,4,5}. Arithmetic mean of the subset is an integer for subsets : {1,5}, {1,3,5}, {1,2,4,5}, {1,2,3,4,5}. Thus a(5) = 4. The value of the arithmetic mean is 3 for all 4 subsets.
MAPLE
b:= proc(i, s, c) option remember; `if` (i=1, `if` (irem (s, c)=0, 1, 0), b(i-1, s, c)+ b(i-1, s+i, c+1)) end: a:= n-> `if` (n=1, 1, b (n-1, n+1, 2)): seq (a(n), n=1..40); # Alois P. Heinz, May 06 2010
MATHEMATICA
b[i_, s_, c_] := b[i, s, c] = If[i==1, If[Mod[s, c]==0, 1, 0], b[i-1, s, c] + b[i-1, s+i, c+1]];
a[n_] := If[n==1, 1, b[n-1, n+1, 2]];
Array[a, 40] (* Jean-François Alcover, Nov 20 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Nov 18 2008
EXTENSIONS
More terms from Alois P. Heinz, May 06 2010
STATUS
approved