|
Search: id:A039966
|
|
|
| A039966 |
|
a(0) = 1, a(3n+2) = 0, a(3n) = a(3n+1) = a(n). |
|
+0 12
|
|
| 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
(list; graph; listen)
|
|
|
OFFSET
|
1,1
|
|
|
COMMENT
|
Number of partitions of n into distinct powers of 3.
Trajectory of 1 under the morphism : 1 -> 110, 0 -> 000. Thus 1 -> 110 ->110110000 -> 110110000110110000000000000 -> ... - Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Jul 09 2005
Also, an example of a d-perfect sequence.
This is a composite of two earlier sequences contributed at different times by njas and by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Mar 05 2005. Christian G. Bower extended them and found that they agreed for at least 512 terms. The proof that they were identical was found by Ralf Stephan, Jun 13, 2005, based on the fact that they were both 3-regular sequences.
|
|
LINKS
|
D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions
D. Kohel, S. Ling and C. Xing, Explicit Sequence Expansions
|
|
FORMULA
|
a(0)=1, a(1)=0, a(n) = b(n-2), where b [A-number?] is the sequence defined by b(0) = 1, b(3n+2) = 0, b(3n) = b(3n+1) = b(n) (Ralf Stephan)
a(n) = A005043(n-1) mod 3 - Christian G. Bower (bowerc(AT)usa.net), Jun 12 2005
Properties: 0 <= a(n) <= 1, a(A074940(n)) = 0, a(A005836(n)) = 1; A104406(n) = Sum(a(k): 1<=k<=n). - Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Mar 05 2005
Euler transform of sequence b(n) where b(3^k)=1, b(2*3^k)=-1 and zero otherwise. - Michael Somos Jul 15 2005
G.f. A(x) satisfies A(x)=(1+x)A(x^3). - Michael Somos Jul 15 2005
G.f.: Product{k>=0} 1+x^(3^k).
|
|
MAPLE
|
a := proc(n) option remember; if n <= 1 then RETURN(1) end if; if n = 2 then RETURN(0) end if; if n mod 3 = 2 then RETURN(0) end if; if n mod 3 = 0 then RETURN(a(1/3*n)) end if; if n mod 3 = 1 then RETURN(a(1/3*n - 1/3)) end if end proc; (Ralf Stephan, Jun 13 2005)
|
|
MATHEMATICA
|
(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) s = Rest[ Sort[ Plus @@@ Table[UnrankSubset[n, Table[3^i, {i, 0, 4}]], {n, 32}]]]; Table[ If[ Position[s, n] == {}, 0, 1], {n, 105}] (from Robert G. Wilson v (rgwv(AT)rgwv.com), Jun 14 2005)
CoefficientList[Series[Product[(1 + x^(3^k)), {k, 0, 5}], {x, 0, 111}], x] (* or *)
Nest[ Flatten[ # /. {0 -> {0, 0, 0}, 1 -> {1, 1, 0}}] &, {1}, 5] (from Robert G. Wilson v (rgwv(at)rgwv.com), Mar 29 2006)
|
|
PROGRAM
|
(PARI) {a(n)=local(A, m); if(n<0, 0, m=1; A=1+O(x); while(m<=n, m*=3; A=(1+x)*subst(A, x, x^3)); polcoeff(A, n))} /* Michael Somos Jul 15 2005 */
|
|
CROSSREFS
|
Cf. A062051, A000009, A000244, A004642.
Sequence in context: A137161 A077050 A128432 this_sequence A089451 A070886 A041004
Adjacent sequences: A039963 A039964 A039965 this_sequence A039967 A039968 A039969
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
njas
|
|
EXTENSIONS
|
Entry revised Jun 30 2005
|
|
|
Search completed in 0.002 seconds
|