|
Search: id:A120880
|
|
|
| A120880 |
|
G.f. satisfies: A(x) = A(x^3)*(1 + 2*x + x^2); thus a(n) = 2^A062756(n), where A062756(n) is the number of 1's in the ternary expansion of n. |
|
+0 2
|
|
| 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 4, 2, 4, 8, 4, 2, 4, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 4, 2, 4, 8, 4, 2, 4, 2, 4, 8, 4, 8, 16, 8, 4, 8, 4, 2, 4, 2, 4, 8, 4, 2, 4, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 4, 2, 4, 8, 4, 2, 4, 2, 1, 2, 1, 2, 4, 2, 1, 2, 1, 2, 4, 2, 4, 8, 4, 2, 4, 2, 4, 8, 4, 8, 16, 8, 4, 8, 4, 2, 4, 2, 4, 8, 4
(list; graph; listen)
|
|
|
OFFSET
|
0,2
|
|
|
COMMENT
|
More generally, if g.f. of {a(n)} satisfies: A(x) = A(x^3)*(1 + b*x + c*x^2), then a(n) = b^A062756(n)*c^A081603(n), where A062756(n) is the number of 1's and A081603(n) is the number of 2's, in the ternary expansion of n. This sequence is not the same as A059151.
a(n) is the number of entries in the n-th row of Pascal's triangle that are congruent to 1 mod 3 minus the number of entries that are congruent to 2 mod 3. - Naoki Sato (nsato7(AT)yahoo.ca), Jun 22 2007
|
|
FORMULA
|
a((3^n+1)/2) = 2^n; a(n) = a(floor(n/3))*2^[[n (mod 3)] (mod 2)], with a(0)=1. G.f.: A(x) = prod_{n>=0} (1 + x^(3^n))^2. Self-convolution of A039966. Row sums of triangle A117947(n,k) = balanced ternary of C(n,k) mod 3.
|
|
EXAMPLE
|
Records are 2^n at positions: 0,1,4,13,40,121,...,(3^n-1)/2,... (n>=0).
A(x) = 1 + 2*x + x^2 + 2*x^3 + 4*x^4 + 2*x^5 + x^6 + 2*x^7 + x^8 +...
|
|
PROGRAM
|
(PARI) a(n)=if(n==0, 1, a(n\3)*2^((n%3)%2))
|
|
CROSSREFS
|
Cf. A117947, A039966, A062756, A081603.
Sequence in context: A121439 A009205 A086754 this_sequence A059151 A059149 A013943
Adjacent sequences: A120877 A120878 A120879 this_sequence A120881 A120882 A120883
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Paul D. Hanna (pauldhanna(AT)juno.com), Jul 11 2006
|
|
|
Search completed in 0.002 seconds
|