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

A076178 a(n) = 2*n^2 - A077071(n).

Original entry on oeis.org

0, 0, 0, 2, 2, 4, 6, 10, 10, 12, 14, 18, 20, 24, 28, 34, 34, 36, 38, 42, 44, 48, 52, 58, 60, 64, 68, 74, 78, 84, 90, 98, 98, 100, 102, 106, 108, 112, 116, 122, 124, 128, 132, 138, 142, 148, 154, 162, 164, 168, 172, 178, 182, 188, 194, 202, 206, 212, 218, 226, 232
Offset: 0

Views

Author

Benoit Cloitre, Nov 01 2002

Keywords

Crossrefs

Equals 2 * A078903(n).

Programs

  • PARI
    a(n)=2*n^2-sum(k=0,n,-valuation(polcoeff(pollegendre(2*n),2*k),2))
    
  • Python
    def A076178(n): return ((n+1)*n.bit_count()-n<<1)+sum((m:=1<>j)-(r if n<<1>=m*(r:=k<<1|1) else 0)) for j in range(1,n.bit_length()+1)) # Chai Wah Wu, Nov 12 2024

Formula

a(n) = A001105(n) - A077071(n). - Omar E. Pol, Nov 13 2024

A077070 Triangle read by rows: T(n,k) is the power of 2 in denominator of coefficients of Legendre polynomials, where n >= 0 and 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, 3, 2, 3, 4, 4, 4, 4, 7, 5, 6, 5, 7, 8, 8, 7, 7, 8, 8, 10, 9, 10, 8, 10, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 15, 12, 13, 12, 14, 12, 13, 12, 15, 16, 16, 14, 14, 15, 15, 14, 14, 16, 16, 18, 17, 18, 15, 17, 16, 17, 15, 18, 17, 18, 19, 19, 19, 19, 18, 18, 18, 18, 19, 19, 19, 19, 22, 20, 21, 20, 22, 19, 20, 19, 22, 20, 21, 20, 22
Offset: 0

Views

Author

Michael Somos, Oct 25 2002

Keywords

Examples

			Triangle T(n,k) (with rows n >= 0 and columns k >= 0) begins as follows:
   0;
   1,  1;
   3,  2,  3;
   4,  4,  4,  4;
   7,  5,  6,  5,  7;
   8,  8,  7,  7,  8,  8;
  10,  9, 10,  8, 10,  9, 10;
  ...
		

Crossrefs

Cf. A005187 (column k=0), A101925 (column k=1), A077071 (row sums), A144816 (denominators).

Programs

  • Maple
    T:= n-> (p-> seq(padic[ordp](denom(coeff(p, x, i)), 2)
                 , i=0..2*n, 2))(orthopoly[P](2*n, x)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Jan 25 2022
  • Mathematica
    T[n_, k_] := IntegerExponent[Denominator[Coefficient[LegendreP[2n, x], x, 2k]], 2]; Table[T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 28 2017 *)
  • PARI
    {T(n, k) = if( k<0 || k>n, 0, -valuation( polcoeff( pollegendre(2*n), 2*k), 2))}
    
  • PARI
    T(n,k) = 2*n - hammingweight(n-k) - hammingweight(k); \\ Kevin Ryde, Jan 29 2022

Formula

T(n, k) = A007814(A144816(n, k)). - Michel Marcus, Jan 29 2022
T(n, k) = 2*n - wt(n-k) - wt(k) where wt = A000120 is the binary weight. - Kevin Ryde, Jan 29 2022
Showing 1-2 of 2 results.