OFFSET
0,3
REFERENCES
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to arXiv version]
M. Bernstein and N. J. A. Sloane, Some canonical sequences of integers, Linear Alg. Applications, 226-228 (1995), 57-72; erratum 320 (2000), 210. [Link to Lin. Alg. Applic. version together with omitted figures]
FORMULA
G.f. A(x) = 1 / ((1 - x) * Product_{k>2} (1 - x^a(k))).
EXAMPLE
G.f. = 1 + x + 2*x^2 + 2*x^3 + 4*x^4 + 5*x^5 + 7*x^6 + 9*x^7 + 12*x^8 + 16*x^9 + ...
MAPLE
a:= proc(n) option remember; local x, j, i; `if`(n<6, [1, 1, 2, 2, 4, 5][n+1], coeff(series(1 /mul(1-x^i, i=[{seq(a(j), j=1..n-1)}[]]), x, n+1), x, n)) end: seq(a(n), n=0..60); # Alois P. Heinz, Apr 27 2009
MATHEMATICA
a[0] = a[1] = 1; a[2] = a[3] = 2; a[4] = 4; a[5] = 5; a[n_] := a[n] = SeriesCoefficient[ Series[ 1/((1 - x)*Product[ 1 - x^a[k], {k, 3, n-1}]), {x, 0, n}], n]; Table[a[n], {n, 0, 53}] (* Jean-François Alcover, Dec 09 2011 *)
PROG
(PARI) {a(n) = local(A, k); A = Ser([ 1, 1, 2, 2, 4, 5]); while( n > (k = #A - 1), A = 1 / (1 - x) / prod( i=3, k, 1 - x^polcoeff(A, i), 1 + x^2 * O(x^ polcoeff( A, k))) ); polcoeff( A, n)}; /* Michael Somos, Aug 08 2011 */
CROSSREFS
KEYWORD
nonn,nice
AUTHOR
EXTENSIONS
More terms from Alois P. Heinz, Apr 27 2009
STATUS
approved