login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A096770
a(1) = 1; for n >= 1, replace each part, with repetitions, of every part k in each partition of n with a(k), then take the sum to get a(n+1).
0
1, 1, 3, 8, 21, 51, 127, 303, 734, 1751, 4200, 10004, 23918, 56981, 135958, 323996, 772530, 1840993, 4388456, 10458354, 24926754, 59405383, 141581236, 337417607, 804153140, 1916469872, 4567399008, 10885108498, 25941679513, 61824709789
OFFSET
1,3
COMMENTS
Comment from Michael Taktikos, Sep 04 2004: The following is a much simpler definition of this sequence: a[1] = 1; a[n_] := Mod[Sum[a[k], {k, 1, n - 1}], n - 1]
FORMULA
a(n+1) = sum{k=1 to n} (sum{j|k} a(j)) * p(n-k), where p(k) is the number of partitions of k (A000041).
EXAMPLE
We have the partitions of 4: 1+1+1+1, 1+1+2, 1+3, 2+2, 4; replace and add: 1+1+1+1 +1+1+1 +1+3 +1+1 +8 = 21 = a(5).
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Block[{j, k, s = 0}, For[k = 1, k < n, k++, j = Divisors[k]; s = s + Plus @@ ((a /@ j)PartitionsP[n - k - 1])]; s]; Table[ a[n], {n, 30}] (* Robert G. Wilson v, Aug 25 2004 *) (* or slower *)
(* first *) Needs["DiscreteMath`Combinatorica`"] (* then *) a[1] = 1; a[n_] := a[n] = Block[{p = Sort[ Flatten[ Partitions[n - 1]] ]}, Plus @@ (a /@ p)]; Table[ a[n], {n, 30}] (* Robert G. Wilson v, Aug 25 2004 *)
CROSSREFS
Sequence in context: A238831 A322059 A259714 * A007835 A152086 A014396
KEYWORD
nonn,easy
AUTHOR
Leroy Quet, Aug 17 2004
EXTENSIONS
More terms from Robert G. Wilson v, Aug 25 2004
STATUS
approved