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-7 of 7 results.

A117941 Inverse of number triangle A117939.

Original entry on oeis.org

1, -2, 1, -5, 2, 1, -2, 0, 0, 1, 4, -2, 0, -2, 1, 10, -4, -2, -5, 2, 1, -5, 0, 0, 2, 0, 0, 1, 10, -5, 0, -4, 2, 0, -2, 1, 25, -10, -5, -10, 4, 2, -5, 2, 1, -2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 4, -2, 0, 0, 0, 0, 0, 0, 0, -2, 1, 10, -4, -2, 0, 0, 0, 0, 0, 0, -5, 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

Comments

Row sums are A117942.
T(n, k) mod 2 = A117944(n,k).

Examples

			Triangle begins
   1;
  -2,   1;
  -5,   2,  1;
  -2,   0,  0,   1;
   4,  -2,  0,  -2, 1;
  10,  -4, -2,  -5, 2, 1;
  -5,   0,  0,   2, 0, 0,  1;
  10,  -5,  0,  -4, 2, 0, -2, 1;
  25, -10, -5, -10, 4, 2, -5, 2, 1;
		

Crossrefs

Programs

  • Mathematica
    M[n_, k_]:= M[n, k]= If[k>n, 0, Sum[JacobiSymbol[Binomial[n, j], 3]*JacobiSymbol[Binomial[n-j, k], 3], {j,0,n}], 0];
    m:= m= With[{q = 60}, Table[M[n, k], {n,0,q}, {k,0,q}]];
    T[n_, k_]:= Inverse[m][[n+1, k+1]];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 29 2021 *)

A120854 Matrix log of A117939, read by rows, consisting only of 0's, 3's and signed 2's.

Original entry on oeis.org

0, 2, 0, 3, -2, 0, 2, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 3, -2, 0, 3, 0, 0, -2, 0, 0, 0, 0, 3, 0, 0, -2, 0, 2, 0, 0, 0, 3, 0, 0, -2, 3, -2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 3, -2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 3, -2, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Paul D. Hanna, Jul 08 2006

Keywords

Comments

The number of nonzero elements in row n equals A053735(n), the sum of ternary digits of n. Row sums are A120855(n) = 2*A062756 + A081603(n), where A062756(n) = number of 1's in ternary expansion of n and A081603(n) = number of 2's in ternary expansion of n. Triangle A117939 is related to partitions of n into powers of 3 and is the matrix square of A117947, where A117947(n,k) = balanced ternary digits of C(n,k) mod 3, also A117947(n,k) = L(C(n,k)/3) where L(j/p) is the Legendre symbol of j and p.

Examples

			Triangle begins:
0;
2, 0;
3,-2, 0;
2, 0, 0, 0;
0, 2, 0, 2, 0;
0, 0, 2, 3,-2, 0;
3, 0, 0,-2, 0, 0, 0;
0, 3, 0, 0,-2, 0, 2, 0;
0, 0, 3, 0, 0,-2, 3,-2, 0;
2, 0, 0, 0, 0, 0, 0, 0, 0, 0; ...
Matrix exponentiation gives A117939:
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; ...
and A117939 is the matrix square of A117947:
1;
1, 1;
1,-1, 1;
1, 0, 0, 1;
1, 1, 0, 1, 1;
1,-1, 1, 1,-1, 1;
1, 0, 0,-1, 0, 0, 1;
1, 1, 0,-1,-1, 0, 1, 1;
1,-1, 1,-1, 1,-1, 1,-1, 1; ...
		

Crossrefs

Programs

  • PARI
    /* Generated as the Matrix LOG of A117939: */ T(n,k)=local(M=matrix(n+1,n+1,r,c,(binomial(r-1,c-1)+1)%3-1)^2, L=sum(i=1,#M,-(M^0-M)^i/i));return(L[n+1,k+1])
    
  • PARI
    /* Generated as the Ternary Fractal: */ T(n,k)=local(r=n,c=k,s=floor(log(n+1)/log(3))+1,u=vector(s),v=vector(s),d,e); if(n<=k,0,if(n<3&k<3,[0,0,0;2,0,0;3,-2,0][n+1,k+1], for(i=1,#u,u[i]=r%3;r=r\3);for(i=1,#v,v[i]=c%3;c=c\3); d=0;for(i=1,#v,if(u[i]!=v[i],d+=1;e=i));if(d==1,T(u[e],v[e]),0)))

Formula

Ternary fractal, T(3*n,3*k) = T(n,k), defined by: T(n,k) = 0 if n<=k or when more than 1 digit differs between the ternary expansions of n and k; else T(n,k) = T(m,j) where the only ternary digits of n, k, that differ are m, j, respectively and T(1,0)=2, T(2,1)=-2, T(2,0)=3.

A120855 Row sums of triangle A120854, which is the matrix log of triangle A117939.

Original entry on oeis.org

0, 2, 1, 2, 4, 3, 1, 3, 2, 2, 4, 3, 4, 6, 5, 3, 5, 4, 1, 3, 2, 3, 5, 4, 2, 4, 3, 2, 4, 3, 4, 6, 5, 3, 5, 4, 4, 6, 5, 6, 8, 7, 5, 7, 6, 3, 5, 4, 5, 7, 6, 4, 6, 5, 1, 3, 2, 3, 5, 4, 2, 4, 3, 3, 5, 4, 5, 7, 6, 4, 6, 5, 2, 4, 3, 4, 6, 5, 3, 5, 4, 2, 4, 3, 4, 6, 5, 3, 5, 4, 4, 6, 5, 6, 8, 7, 5, 7, 6, 3, 5, 4, 5, 7, 6
Offset: 0

Views

Author

Paul D. Hanna, Jul 08 2006

Keywords

Comments

Triangle A117939 is related to powers of 3 partitions of n and is the matrix square of A117947(n,k) = balanced ternary digits of C(n,k) mod 3, also A117947(n,k) = L(C(n,k)/3) where L(j/p) is the Legendre symbol of j and p.

Crossrefs

Programs

  • Mathematica
    f[n_] := DigitCount[n, 3] /. {a_, b_, c_} -> 2a + b + 0c; Array[f, 105, 0] (* Robert G. Wilson v, Jul 31 2012 *)
  • PARI
    {a(n)=local(M=matrix(n+1,n+1,r,c,(binomial(r-1,c-1)+1)%3-1)^2, L=sum(i=1,#M,-(M^0-M)^i/i));return(sum(k=0,n,L[n+1,k+1]))}

Formula

a(n) = 2*A062756 + A081603(n), where A062756(n) = number of 1's in ternary expansion of n and A081603(n) = number of 2's in ternary expansion of n.

A117940 a(0)=1, thereafter a(3n) = a(3n+1)/3 = a(n), a(3n+2)=0.

Original entry on oeis.org

1, 3, 0, 3, 9, 0, 0, 0, 0, 3, 9, 0, 9, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 9, 0, 9, 27, 0, 0, 0, 0, 9, 27, 0, 27, 81, 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, 3, 9, 0, 9, 27, 0, 0, 0, 0, 9, 27, 0, 27, 81, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Paul Barry, Apr 05 2006

Keywords

Comments

a(n) = a(3n)/a(0) = a(3n+1)/a(1). a(n) mod 2 = A039966(n). Row sums of A117939.
Observation: if this is written as a triangle (see example) then at least the first five row sums coincide with A002001. - Omar E. Pol, Nov 28 2011

Examples

			Contribution from Omar E. Pol, Nov 26 2011 (Start):
When written as a triangle this begins:
1,
3,0,
3,9,0,0,0,0,
3,9,0,9,27,0,0,0,0,0,0,0,0,0,0,0,0,0,
3,9,0,9,27,0,0,0,0,9,27,0,27,81,0,0,0,0,0,0,0,0,0,0,0,...
(End)
		

Crossrefs

For generating functions Prod_{k>=0} (1+a*x^(b^k)) for the following values of (a,b) see: (1,2) A000012 and A000027, (1,3) A039966 and A005836, (1,4) A151666 and A000695, (1,5) A151667 and A033042, (2,2) A001316, (2,3) A151668, (2,4) A151669, (2,5) A151670, (3,2) A048883, (3,3) A117940, (3,4) A151665, (3,5) A151671, (4,2) A102376, (4,3) A151672, (4,4) A151673, (4,5) A151674.

Formula

G.f.: Product{k>=0, 1+3x^(3^k)}; a(n)=sum{k=0..n, 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.

A117944 Triangle related to powers of 3 partitions of n.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Paul Barry, Apr 05 2006

Keywords

Comments

Inverse is A117945.
Row sums of inverse are A039966.

Examples

			Triangle begins
  1;
  0, 1;
  1, 0, 1;
  0, 0, 0, 1;
  0, 0, 0, 0, 1;
  0, 0, 0, 1, 0, 1;
  1, 0, 0, 0, 0, 0, 1;
  0, 1, 0, 0, 0, 0, 0, 1;
  1, 0, 1, 0, 0, 0, 1, 0, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1;
  0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= Mod[Sum[JacobiSymbol[Binomial[n, j], 3]*JacobiSymbol[Binomial[n-j, k], 3], {j,0,n}], 2];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 29 2021 *)
  • Sage
    def A117944(n, k): return ( sum(jacobi_symbol(binomial(n, j), 3)*jacobi_symbol(binomial(n-j, k), 3) for j in (0..n)) )%2
    flatten([[A117944(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) mod 2, where L(j/p) is the Legendre symbol of j and p.
T(n, k) = A117939(n,k) mod 2.
T(n, k) = A117939^(-1)(n,k) mod 2.
Sum_{k=0..n} T(n, k) = A117943(n).

A117947 T(n,k)=L(C(n,k)/3) where L(j/p) is the Legendre symbol of j and p.

Original entry on oeis.org

1, 1, 1, 1, -1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 1, 0, 0, -1, 0, 0, 1, 1, 1, 0, -1, -1, 0, 1, 1, 1, -1, 1, -1, 1, -1, 1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, -1, 1, 0, 0, 0, 0, 0, 0, 1, -1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, -1, 1, 1, -1, 1, 0, 0, 0, 1, -1, 1, 1, -1, 1
Offset: 0

Views

Author

Paul Barry, Apr 05 2006

Keywords

Comments

Row sums are A059126. Diagonal sums are A117963. Could be called the Legendre-binomial matrix for p=3.
The matrix square equals triangle A117939; the matrix log equals triangle A120854 divided by 2. - Paul D. Hanna, Jul 08 2006

Examples

			Triangle begins:
  1;
  1, 1;
  1, -1, 1;
  1, 0, 0, 1;
  1, 1, 0, 1, 1;
  ...
		

Crossrefs

Cf. A117939 (matrix square), A120854 (2*log).

Programs

Formula

T(n,k) = balanced ternary digit of C(n,k) mod 3. - Paul D. Hanna, Jul 08 2006

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.
Showing 1-7 of 7 results.