cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A120880 #43 Sep 02 2025 22:53:02
%S A120880 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,
%T A120880 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,
%U A120880 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
%N 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.
%C A120880 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.
%C A120880 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. - _N. Sato_, Jun 22 2007 (see Liu (1991))
%C A120880 This sequence pertains to genotype Punnett square mathematics. Start with X = 1. Each hybrid cross involves the equation X:2X:X. Therefore, the ratio in the first (mono) hybrid cross is X=1:2X=2(1) or 2:X=1; or 1:2:1. When you move up to the next hybridization level, replace the previous cross ratio with X. X now represents 3 numbers—1:2:1. Therefore, the ratio in the second (di) hybrid cross is X = (1:2:1):2X = [2(1):2(2):2(1)] or (2:4:2):X = (1:2:1). Put it together and you get 1:2:1:2:4:2:1:2:1. Each time you move up a hybridization level, replace the previous ratio with X, and use the same equation—X:2X:X to get its ratio. - _John Michael Feuk_, Dec 10 2011
%C A120880 Also number of ways to write n as sum of two nonnegative numbers having in ternary representation no 3; see also A205565. - _Reinhard Zumkeller_, Jan 28 2012
%H A120880 Reinhard Zumkeller, <a href="/A120880/b120880.txt">Table of n, a(n) for n = 0..10000</a>
%H A120880 Andy Liu, <a href="http://pds13.egloos.com/pds/200904/04/93/a0100793_crux1991-all.pdf">Solution to Problem 2</a>, Crux Mathematicorum, 17 (1991), 5-6.
%F A120880 a((3^n+1)/2) = 2^n; a(n) = a(floor(n/3))*2^[[n (mod 3)] (mod 2)], with a(0)=1.
%F A120880 G.f.: A(x) = prod_{n>=0} (1 + x^(3^n))^2.
%F A120880 Self-convolution of A039966.
%F A120880 Row sums of triangle A117947(n,k) = balanced ternary of C(n,k) mod 3.
%e A120880 Records are 2^n at positions: 0,1,4,13,40,121,...,(3^n-1)/2,... (n>=0).
%e A120880 A(x) = 1 + 2*x + x^2 + 2*x^3 + 4*x^4 + 2*x^5 + x^6 + 2*x^7 + x^8 +...
%t A120880 Nest[ Join[#, 2 #, #] &, {1}, 5] (* _Robert G. Wilson v_, Jul 27 2014 *)
%o A120880 (PARI) a(n)=if(n==0,1,a(n\3)*2^((n%3)%2))
%o A120880 (Haskell)
%o A120880 a120880 n = sum $ map (a039966 . (n -)) $ takeWhile (<= n) a005836_list
%o A120880 -- _Reinhard Zumkeller_, Jan 28 2012
%Y A120880 Cf. A117947, A039966, A062756, A081603.
%K A120880 nonn,changed
%O A120880 0,2
%A A120880 _Paul D. Hanna_, Jul 11 2006