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.

Showing 1-4 of 4 results.

A117946 a(3n)=0, a(3n+1)/a(1)=a(3n+2)/a(2)=A059151(n).

Original entry on oeis.org

0, 1, -2, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 4, -8, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 4, -8, 0, 2, -4, 0, 4, -8, 0, 8, -16, 0, 4, -8, 0, 2, -4, 0, 4, -8, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 4, -8, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 1, -2, 0, 2, -4, 0, 4, -8, 0, 2, -4, 0, 4, -8, 0, 8, -16, 0, 4, -8
Offset: 0

Views

Author

Paul Barry, Apr 05 2006

Keywords

Comments

Second column of A117939.

Formula

a(n)=sum{k=0..n, L((n-k)/3)*L(C(n,k)/3)} where L(j/p) is the Legendre symbol of j and p.

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.

Original entry on oeis.org

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
Offset: 0

Views

Author

Paul D. Hanna, Jul 11 2006

Keywords

Comments

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. - N. Sato, Jun 22 2007 (see Liu (1991))
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
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

Examples

			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 +...
		

Crossrefs

Programs

  • Haskell
    a120880 n = sum $ map (a039966 . (n -)) $ takeWhile (<= n) a005836_list
    -- Reinhard Zumkeller, Jan 28 2012
  • Mathematica
    Nest[ Join[#, 2 #, #] &, {1}, 5] (* Robert G. Wilson v, Jul 27 2014 *)
  • PARI
    a(n)=if(n==0,1,a(n\3)*2^((n%3)%2))
    

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.

A117939 Triangle related to powers of 3 partitions of n.

Original entry on oeis.org

1, 2, 1, 1, -2, 1, 2, 0, 0, 1, 4, 2, 0, 2, 1, 2, -4, 2, 1, -2, 1, 1, 0, 0, -2, 0, 0, 1, 2, 1, 0, -4, -2, 0, 2, 1, 1, -2, 1, -2, 4, -2, 1, -2, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, 2, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, -4, 2, 0, 0, 0, 0, 0, 0, 1, -2, 1, 4, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 1, 8, 4, 0, 4, 2, 0, 0, 0, 0, 4, 2, 0, 2, 1
Offset: 0

Views

Author

Paul Barry, Apr 05 2006

Keywords

Examples

			Triangle begins
  1;
  2,  1;
  1, -2, 1;
  2,  0, 0,  1;
  4,  2, 0,  2,  1;
  2, -4, 2,  1, -2,  1;
  1,  0, 0, -2,  0,  0, 1;
  2,  1, 0, -4, -2,  0, 2,  1;
  1, -2, 1, -2,  4, -2, 1, -2, 1;
		

Crossrefs

Cf. A120854 (matrix log), A117941 (inverse), A117947 (matrix square-root).

Programs

  • Mathematica
    T[n_, k_]:= Sum[JacobiSymbol[Binomial[n, j], 3]*JacobiSymbol[Binomial[n-j, k], 3], {j, 0, n}]; Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 29 2021 *)
  • PARI
    T(n,k)=(matrix(n+1,n+1,r,c,(binomial(r-1,c-1)+1)%3-1)^2)[n+1,k+1] \\ Paul D. Hanna, Jul 08 2006
    
  • Sage
    def A117939(n, k): return sum(jacobi_symbol(binomial(n, j), 3)*jacobi_symbol(binomial(n-j, k), 3) for j in (0..n))
    flatten([[A117939(n, k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Oct 29 2021

Formula

Triangle T(n,k) = Sum_{j=0..n} L(C(n,j)/3)*L(C(n-j,k)/3) where L(j/p) is the Legendre symbol of j and p.
T(n, k) mod 2 = A117944(n,k).
T(n, 0) = A059151(n).
T(n, 1) = A117946(n).
Sum_{k=0..n} T(n, k) = A117940(n).
Matrix square of triangle A117947. Matrix log is the integer triangle A120854. - Paul D. Hanna, Jul 08 2006

A059163 A hierarchical sequence (W'3{2,2}*c - see A059126).

Original entry on oeis.org

4, 8, 4, 8, 16, 8, 4, 8, 4, 16, 32, 16, 4, 8, 4, 8, 16, 8, 4, 8, 4, 32, 64, 32, 4, 8, 4, 8, 16, 8, 4, 8, 4, 16, 32, 16, 4, 8, 4, 8, 16, 8, 4, 8, 4, 64, 128, 64, 4, 8, 4, 8, 16, 8, 4, 8, 4, 16, 32, 16, 4, 8, 4, 8, 16, 8, 4, 8, 4, 32, 64, 32, 4, 8, 4, 8, 16, 8, 4, 8, 4, 16, 32, 16, 4, 8, 4, 8, 16
Offset: 0

Views

Author

Jonas Wallgren, Feb 02 2001

Keywords

Formula

Conjecture: a(n) = 2^(1+A059129(n)). - R. J. Mathar, Apr 04 2019
a(n) = A059151(3*n) + A059151(3*n+1) + A059151(3*n+2). - Sean A. Irvine, Sep 13 2022
Showing 1-4 of 4 results.