A120879 G.f. satisfies: A(x) = A(x^3)*(1 + 3*x + 2*x^2).
1, 3, 2, 3, 9, 6, 2, 6, 4, 3, 9, 6, 9, 27, 18, 6, 18, 12, 2, 6, 4, 6, 18, 12, 4, 12, 8, 3, 9, 6, 9, 27, 18, 6, 18, 12, 9, 27, 18, 27, 81, 54, 18, 54, 36, 6, 18, 12, 18, 54, 36, 12, 36, 24, 2, 6, 4, 6, 18, 12, 4, 12, 8, 6, 18, 12, 18, 54, 36, 12, 36, 24, 4, 12, 8, 12, 36, 24, 8, 24, 16, 3, 9
Offset: 0
Links
- Paul D. Hanna, Table of n, a(n) for n = 0..10000
Programs
-
PARI
{a(n)=local(A=1+x+x*O(x^n));for(i=1,floor(log(n+1)/log(3))+1, A=subst(A,x,x^3+x*O(x^n))*(1+3*x+2*x^2));polcoeff(A,n,x)}
-
PARI
/* Recurrence: */ {a(n)=if(n==0,1,a(n\3)*3^((n%3)%2)*2^((n%3)\2))}
Formula
G.f.: A(x) = Product_{n>=0} (1 + x^(3^n))*(1 + 2*x^(3^n)).
a(n) = a(floor(n/3)) * 3^((n mod 3) mod 2) * 2^floor((n mod 3)/2) with a(0)=1.
Comments