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.

A045926 All digits even and nonzero.

Original entry on oeis.org

2, 4, 6, 8, 22, 24, 26, 28, 42, 44, 46, 48, 62, 64, 66, 68, 82, 84, 86, 88, 222, 224, 226, 228, 242, 244, 246, 248, 262, 264, 266, 268, 282, 284, 286, 288, 422, 424, 426, 428, 442, 444, 446, 448, 462, 464, 466, 468, 482, 484, 486, 488, 622, 624, 626, 628, 642
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a045926 n = a045926_list !! (n-1)
    a045926_list = filter (all (`elem` "2468") . show) [2, 4..]
    -- Reinhard Zumkeller, Jan 01 2013
    
  • Python
    def A045926(n):
        m = (3*n+1).bit_length()-1>>1
        return int(''.join((str(((3*n+1-(1<<(m<<1)))//(3<<((m-1-j)<<1))&3)+1) for j in range(m))))<<1 # Chai Wah Wu, Feb 08 2023

Formula

a(n) = 2 * A084544(n). - Reinhard Zumkeller, Jan 01 2013

Extensions

More terms from Patrick De Geest, Jun 15 1999

A094953 Triangle T(n,m) read by rows: number of rises (drops) in the compositions of n with m parts, m>=2.

Original entry on oeis.org

1, 1, 2, 2, 4, 3, 2, 8, 9, 4, 3, 12, 21, 16, 5, 3, 18, 39, 44, 25, 6, 4, 24, 66, 96, 80, 36, 7, 4, 32, 102, 184, 200, 132, 49, 8, 5, 40, 150, 320, 430, 372, 203, 64, 9, 5, 50, 210, 520, 830, 888, 637, 296, 81, 10, 6, 60, 285, 800, 1480, 1884, 1673, 1024, 414, 100, 11, 6
Offset: 2

Views

Author

Ralf Stephan, May 26 2004

Keywords

Examples

			1
1 2
2 4 3
2 8 9 4
3 12 21 16 5
3 18 39 44 25 6
4 24 66 96 80 36 7
		

Crossrefs

Columns 2-4 (+-offset) are A004526, A007590, A007518.
Row sums are A045883, diagonals include n, n^2, (n-1)(n^2-n+2)/2, (n-1)^2(n^+n+6), etc.
Cf. A045927.

Programs

  • Mathematica
    T[n_, m_] := SeriesCoefficient[(m-1)x^(m+1)/(1+x)/(1-x)^m, {x, 0, n+1}];
    Table[T[n, m], {n, 2, 13}, {m, 2, n}] // Flatten (* Jean-François Alcover, Dec 03 2018 *)
  • PARI
    T(n,m)=polcoeff((m-1)*x^(m+1)/(1+x)/(1-x)^m,n)

Formula

G.f. of m-th column: [(m-1)x^(m+1)]/[(1+x)(1-x)^m].
Showing 1-2 of 2 results.