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.

Previous Showing 21-30 of 2117 results. Next

A028326 Twice Pascal's triangle A007318: T(n,k) = 2*C(n,k).

Original entry on oeis.org

2, 2, 2, 2, 4, 2, 2, 6, 6, 2, 2, 8, 12, 8, 2, 2, 10, 20, 20, 10, 2, 2, 12, 30, 40, 30, 12, 2, 2, 14, 42, 70, 70, 42, 14, 2, 2, 16, 56, 112, 140, 112, 56, 16, 2, 2, 18, 72, 168, 252, 252, 168, 72, 18, 2, 2, 20, 90, 240, 420, 504, 420, 240, 90, 20, 2, 2, 22, 110, 330, 660, 924, 924, 660, 330, 110, 22, 2
Offset: 0

Views

Author

Keywords

Comments

Also number of binary vectors of length n+1 with k+1 runs (1 <= k <= n).
If the last two entries in each row are removed and 0 replaces the entries in a checkerboard pattern, we obtain
2;
0, 6;
2, 0, 12;
0, 10, 0, 20;
2, 0, 30, 0, 30;
0, 14, 0, 70, 0, 42;
2, 0, 56, 0, 140, 0, 56;
0, 18, 0, 168, 0, 252, 0, 72;
...
This plays the same role of recurrence coefficients for second differences of polynomials as triangle A074909 plays for the first differences. - R. J. Mathar, Jul 03 2013
From Roger Ford, Jul 06 2023: (Start)
T(n,k) = the number of closed meanders with n top arches, n+1 exterior arches and with k = the number of arches of length 1 - (n+1).
Example of closed meanders with 4 top arches and 5 exterior arches:
exterior arches are top arches or bottom arches without a covering arch
/\ = top arch length 1, \/ = bottom arch length 1
/ \ Top: /\=3 / \ / \ Top: /\=2
/\ / /\ \ /\ / /\ \ / /\ \
\ \/ / \ \/ / Bottom: \/=2 \/ \ \/ / \/ Bottom: /\=3
\/ \/ k=5-5=0 \/ k=5-5=0 T(4,0) = 2
/ \ Top: /\=3 / \ Top: /\=3
/\ / /\ /\ \ / /\ \ /\ /\
\ \/ / \/ \/ Bottom: \/=3 \/ \ \/ \/ / Bottom: \/=3
\/ k=6-5=1 \____/ k=6-5=1
/ \ Top: /\=3 / \ Top: /\=3
/ /\ /\ \ /\ /\ /\ / /\ \
\/ \/ \ \/ / Bottom: \/=3 \ \/ \/ / \/ Bottom: \/=3
\/ k=6-5=1 \____/ k=6-5=1 T(4,1) = 4
/ \ Top: /\=3
/ /\ /\ /\ \ /\ /\ /\ /\ Top: /\=4
\/ \/ \/ \/ Bottom: \/=4 \ \/ \/ \/ / Bottom: ||=3
k=7-5=2 \________/ k=7-5=2 T(4,2) = 2.
(End)

Examples

			Triangle begins:
  2;
  2,  2;
  2,  4,   2;
  2,  6,   6,   2;
  2,  8,  12,   8,   2;
  2, 10,  20,  20,  10,    2;
  2, 12,  30,  40,  30,   12,    2;
  2, 14,  42,  70,  70,   42,   14,    2;
  2, 16,  56, 112, 140,  112,   56,   16,   2;
  2, 18,  72, 168, 252,  252,  168,   72,  18,   2;
  2, 20,  90, 240, 420,  504,  420,  240,  90,  20,   2;
  2, 22, 110, 330, 660,  924,  924,  660, 330, 110,  22,  2;
  2, 24, 132, 440, 990, 1584, 1848, 1584, 990, 440, 132, 24, 2;
		

References

  • I. Goulden and D. Jackson, Combinatorial Enumeration, John Wiley and Sons, 1983, page 76.

Crossrefs

Programs

  • Haskell
    a028326 n k = a028326_tabl !! n !! k
    a028326_row n = a028326_tabl !! n
    a028326_tabl = iterate
       (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [2]
    -- Reinhard Zumkeller, Mar 12 2012
    
  • Magma
    [2*Binomial(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 27 2021
    
  • Maple
    T := proc(n, k) if k=0 then 2 elif k>n then 0 else T(n-1, k)+T(n-1, k-1) fi end:
    for n from 0 to 13 do seq(T(n, k), k=0..n) od; # Zerinvary Lajos, Dec 16 2006
  • Mathematica
    Table[2*Binomial[n, k], {n, 0, 11}, {k, 0, n}]//Flatten (* Robert G. Wilson v, Mar 05 2012 *)
  • PARI
    T(n,k) = 2*binomial(n,k) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy import binomial
    def T(n, k):
        return 2*binomial(n, k)
    for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Apr 29 2017
    
  • Sage
    flatten([[2*binomial(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Apr 27 2021

Formula

G.f. for the number of length n binary words with k runs: (1-x+x*y)/(1-x-x*y) [Goulden and Jackson]. - Geoffrey Critzer, Mar 04 2012

Extensions

More terms from Donald Manchester, Jr. (s1199170(AT)cedarnet.cedarville.edu)

A095140 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 5.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 1, 4, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 2, 1, 0, 0, 1, 2, 1, 1, 3, 3, 1, 0, 1, 3, 3, 1, 1, 4, 1, 4, 1, 1, 4, 1, 4, 1, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 2, 2, 0, 0, 0, 1, 1, 1, 2, 1, 0, 0, 2, 4, 2, 0, 0, 1, 2, 1, 1, 3, 3, 1, 0, 2, 1, 1, 2, 0, 1, 3, 3, 1
Offset: 0

Views

Author

Robert G. Wilson v, May 29 2004

Keywords

Comments

{T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(5))/log(5) = log(15)/log(5) = 1.68260... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - Richard L. Ollerton, Dec 14 2021

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), (this sequence) (m = 5), A095141 (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 5]
  • Python
    from math import isqrt, comb
    def A095140(n):
        def f(m,k):
            if m<5 and k<5: return comb(m,k)%5
            c,a = divmod(m,5)
            d,b = divmod(k,5)
            return f(c,d)*f(a,b)%5
        return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Apr 30 2025

Formula

T(i, j) = binomial(i, j) mod 5.

A095142 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 7.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 29 2004

Keywords

Comments

{T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(7))/log(7) = log(28)/log(7) = 1.71241... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - Richard L. Ollerton, Dec 14 2021

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), (this sequence) (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 7]
  • Python
    from math import comb, isqrt
    def A095142(n):
        def f(m,k):
            if m<7 and k<7: return comb(m,k)%7
            c,a = divmod(m,7)
            d,b = divmod(k,7)
            return f(c,d)*f(a,b)%7
        return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Apr 30 2025

Formula

T(i, j) = binomial(i, j) mod 7.

A095144 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 11.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, May 29 2004

Keywords

Comments

{T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(11))/log(11) = log(66)/log(11) = 1.74722... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - Richard L. Ollerton, Dec 14 2021

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930 (m = 8), A095143 (m = 9), A008975 (m = 10), (this sequence) (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Maple
    R[0]:= 1:
    for  n from 1 to 20 do
      R[n]:= op([R[n-1],0] + [0,R[n-1]] mod 11);
    od:
    for n from 0 to 20 do R[n] od; # Robert Israel, Jan 02 2019
  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 11]
  • Python
    from math import isqrt, comb
    def A095144(n):
        def f(m,k):
            if m<11 and k<11: return comb(m,k)%11
            c,a = divmod(m,11)
            d,b = divmod(k,11)
            return f(c,d)*f(a,b)%11
        return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Apr 30 2025

Formula

T(i, j) = binomial(i, j) mod 11.
From Robert Israel, Jan 02 2019: (Start)
T(n,k) = (T(n-1,k-1) + T(n-1,k)) mod 11 with T(n,0) = 1.
T(n,k) = (Product_i binomial(n_i, k_i)) mod 11, where n_i and k_i are the base-11 digits of n and k. (End)

A014473 Pascal's triangle - 1: Triangle read by rows: T(n, k) = A007318(n, k) - 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 3, 5, 3, 0, 0, 4, 9, 9, 4, 0, 0, 5, 14, 19, 14, 5, 0, 0, 6, 20, 34, 34, 20, 6, 0, 0, 7, 27, 55, 69, 55, 27, 7, 0, 0, 8, 35, 83, 125, 125, 83, 35, 8, 0, 0, 9, 44, 119, 209, 251, 209, 119, 44, 9, 0, 0, 10, 54, 164, 329, 461, 461, 329, 164, 54, 10, 0
Offset: 0

Views

Author

Keywords

Comments

Indexed as a square array A(n,k): If X is an (n+k)-set and Y a fixed k-subset of X then A(n,k) is equal to the number of n-subsets of X intersecting Y. - Peter Luschny, Apr 20 2012

Examples

			Triangle begins:
   0;
   0, 0;
   0, 1,  0;
   0, 2,  2,  0;
   0, 3,  5,  3,  0;
   0, 4,  9,  9,  4,  0;
   0, 5, 14, 19, 14,  5, 0;
   0, 6, 20, 34, 34, 20, 6, 0;
   ...
Seen as a square array read by antidiagonals:
  [0] 0, 0,  0,  0,   0,   0,   0,    0,    0,    0,    0,     0, ... A000004
  [1] 0, 1,  2,  3,   4,   5,   6,    7,    8,    9,   10,    11, ... A001477
  [2] 0, 2,  5,  9,  14,  20,  27,   35,   44,   54,   65,    77, ... A000096
  [3] 0, 3,  9, 19,  34,  55,  83,  119,  164,  219,  285,   363, ... A062748
  [4] 0, 4, 14, 34,  69, 125, 209,  329,  494,  714, 1000,  1364, ... A063258
  [5] 0, 5, 20, 55, 125, 251, 461,  791, 1286, 2001, 3002,  4367, ... A062988
  [6] 0, 6, 27, 83, 209, 461, 923, 1715, 3002, 5004, 8007, 12375, ... A124089
		

Crossrefs

Triangle without zeros: A014430.
Related: A323211 (A007318(n, k) + 1).
A000295 (row sums), A059841 (alternating row sums), A030662(n-1) (central terms).
Columns include A000096, A062748, A062988, A063258.
Diagonals of A(n, n+d): A030662 (d=0), A010763 (d=1), A322938 (d=2).

Programs

  • Haskell
    a014473 n k = a014473_tabl !! n !! k
    a014473_row n = a014473_tabl !! n
    a014473_tabl = map (map (subtract 1)) a007318_tabl
    -- Reinhard Zumkeller, Apr 10 2012
    
  • Magma
    [Binomial(n,k)-1: k in [0..n], n in [0..12]]; // G. C. Greubel, Apr 08 2024
    
  • Maple
    with(combstruct): for n from 0 to 11 do seq(-1+count(Combination(n), size=m), m = 0 .. n) od; # Zerinvary Lajos, Apr 09 2008
    # The rows of the square array:
    Arow := proc(n, len) local gf, ser;
    gf := (x - 1)^(-n - 1) + (-1)^(n + 1)/(x*(x - 1));
    ser := series(gf, x, len+2): seq((-1)^(n+1)*coeff(ser, x, j), j=0..len) end:
    for n from 0 to 9 do lprint([n], Arow(n, 12)) od; # Peter Luschny, Feb 13 2019
  • Mathematica
    Table[Binomial[n,k] -1, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Apr 08 2024 *)
  • SageMath
    flatten([[binomial(n,k)-1 for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Apr 08 2024

Formula

G.f.: x^2*y/((1 - x)*(1 - x*y)*(1 - x*(1 + y))). - Ralf Stephan, Jan 24 2005
T(n,k) = A109128(n,k) - A007318(n,k), 0 <= k <= n. - Reinhard Zumkeller, Apr 10 2012
T(n, k) = T(n-1, k-1) + T(n-1, k) + 1, 0 < k < n with T(n, 0) = T(n, n) = 0. - Reinhard Zumkeller, Jul 18 2015
If seen as a square array read by antidiagonals the generating function of row n is: G(n) = (x - 1)^(-n - 1) + (-1)^(n + 1)/(x*(x - 1)). - Peter Luschny, Feb 13 2019
From G. C. Greubel, Apr 08 2024: (Start)
T(n, n-k) = T(n, k).
Sum_{k=0..floor(n/2)} T(n-k, k) = A129696(n-2).
Sum_{k=0..floor(n/2)} (-1)^k*T(n-k, k) = b(n-1), where b(n) is the repeating pattern {0, 0, -1, -2, -1, 1, 1, -1, -2, -1, 0, 0}_{n=0..11}, with b(n) = b(n-12). (End)

Extensions

More terms from Erich Friedman

A055249 Triangle of partial row sums (prs) of triangle A055248 (prs of Pascal's triangle A007318).

Original entry on oeis.org

1, 3, 1, 8, 4, 1, 20, 12, 5, 1, 48, 32, 17, 6, 1, 112, 80, 49, 23, 7, 1, 256, 192, 129, 72, 30, 8, 1, 576, 448, 321, 201, 102, 38, 9, 1, 1280, 1024, 769, 522, 303, 140, 47, 10, 1, 2816, 2304, 1793, 1291, 825, 443, 187, 57, 11, 1, 6144, 5120, 4097, 3084, 2116, 1268, 630
Offset: 0

Views

Author

Wolfdieter Lang, May 26 2000

Keywords

Comments

In the language of the Shapiro et al. reference (given in A053121) such a lower triangular (ordinary) convolution array, considered as matrix, belongs to the Riordan-group. The G.f. for the row polynomials p(n,x) (increasing powers of x) is ((1-z)/(1-2*z)^2)/(1-x*z/(1-z)).
This is the second member of the family of Riordan-type matrices obtained from A007318(n,m) (Pascal's triangle read as lower triangular matrix) by repeated application of the prs-procedure.
The column sequences appear in A001792, A001787, A000337, A045618, A045889, A034009, A055250, A055251 for m=0..7.

Examples

			1;
3,1;
8,4,1;
20,12,5,1;
...
Fourth row polynomial (n=3): p(3,x)= 20+12*x+5*x^2+x^3
		

Crossrefs

Cf. A007318, A055248, A008949. Row sums: A049611(n+1) = A055252(n, 0).

Programs

  • Mathematica
    a[n_, m_] := Binomial[n, m]*Hypergeometric2F1[2, m-n, m+1, -1]; Table[a[n, m], {n, 0, 10}, {m, 0, n}] // Flatten (* Jean-François Alcover, Mar 11 2014 *)

Formula

a(n, m) = Sum_{k=m,..,n} ( A055248(n, k) ), n >= m >= 0, a(n, m) := 0 if n
Column m recursion: a(n, m) = Sum_{j=m,..,(n-1)} ( a(j, m) ) + A055248(n, m), n >= m >= 0, a(n, m) := 0 if n
G.f. for column m: ((1-x)/(1-2*x)^2)*(x/(1-x))^m, m >= 0.
a(n, m) = binomial(n, m) * 2F1(2, m-n; m+1; -1) where 2F1 is the hypergeometric function. Jean-François Alcover, Mar 11 2014

A055372 Invert transform of Pascal's triangle A007318.

Original entry on oeis.org

1, 1, 1, 2, 4, 2, 4, 12, 12, 4, 8, 32, 48, 32, 8, 16, 80, 160, 160, 80, 16, 32, 192, 480, 640, 480, 192, 32, 64, 448, 1344, 2240, 2240, 1344, 448, 64, 128, 1024, 3584, 7168, 8960, 7168, 3584, 1024, 128, 256, 2304, 9216, 21504, 32256, 32256, 21504, 9216, 2304, 256
Offset: 0

Author

Christian G. Bower, May 16 2000

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, 1, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Aug 10 2005
T(n,k) is the number of nonempty bit strings with n bits and exactly k 1's over all strings in the sequence. For example, T(2,1)=4 because we have {(01)},{(10)},{(0),(1)},{(1),(0)}. - Geoffrey Critzer, Apr 06 2013

Examples

			Triangle begins:
  1;
  1,  1;
  2,  4,  2;
  4, 12, 12,  4;
  8, 32, 48, 32,  8;
  ...
		

Crossrefs

Row sums give A081294. Cf. A000079, A007318, A055373, A055374.
Cf. A134309.
T(2n,n) gives A098402.

Programs

  • Mathematica
    nn=10;f[list_]:=Select[list,#>0&];a=(x+y x)/(1-(x+y x));Map[f,CoefficientList[Series[1/(1-a),{x,0,nn}],{x,y}]]//Grid  (* Geoffrey Critzer, Apr 06 2013 *)

Formula

a(n,k) = 2^(n-1)*C(n, k), for n>0.
G.f.: A(x, y)=(1-x-xy)/(1-2x-2xy).
As an infinite lower triangular matrix, equals A134309 * A007318. - Gary W. Adamson, Oct 19 2007
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A011782(n), A081294(n), A081341(n), A092811(n), A093143(n), A067419(n) for x = -1, 0, 1, 2, 3, 4, 5 respectively. - Philippe Deléham, Feb 05 2012

A095141 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 6.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 0, 4, 1, 1, 5, 4, 4, 5, 1, 1, 0, 3, 2, 3, 0, 1, 1, 1, 3, 5, 5, 3, 1, 1, 1, 2, 4, 2, 4, 2, 4, 2, 1, 1, 3, 0, 0, 0, 0, 0, 0, 3, 1, 1, 4, 3, 0, 0, 0, 0, 0, 3, 4, 1, 1, 5, 1, 3, 0, 0, 0, 0, 3, 1, 5, 1, 1, 0, 0, 4, 3, 0, 0, 0, 3, 4, 0, 0, 1, 1, 1, 0, 4, 1, 3, 0, 0, 3, 1, 4, 0, 1, 1
Offset: 0

Author

Robert G. Wilson v, May 29 2004

Keywords

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), (this sequence) (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 6]
    Graphics[Table[{%[Mod[Binomial[n, k], 6]/5], RegularPolygon[{4√3 (k - n/2), -6 n}, {4,π/6}, 6]}, {n, 0, 105}, {k, 0, n}]] (* Mma code for illustration, Bill Gosper, Aug 05 2017 *)
  • Python
    from math import isqrt, comb
    from sympy.ntheory.modular import crt
    def A095141(n):
        w, c = n-((r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(r+1)>>1), 1
        d = int(not ~r & w)
        while True:
            r, a = divmod(r,3)
            w, b = divmod(w,3)
            c = c*comb(a,b)%3
            if r<3 and w<3:
                c = c*comb(r,w)%3
                break
        return crt([3,2],[c,d])[0] # Chai Wah Wu, May 01 2025

Formula

T(i, j) = binomial(i, j) mod 6.

A095145 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 12.

Original entry on oeis.org

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

Author

Robert G. Wilson v, May 29 2004

Keywords

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930 (m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), (this sequence) (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 12]
  • Python
    # uses python code from A034931 and A083093
    from sympy.ntheory.modular import crt
    def A095145(n): return crt([4,3],[A034931(n),A083093(n)])[0] # Chai Wah Wu, Jul 19 2025

Formula

T(i, j) = binomial(i, j) mod 12.

A275198 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 14.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 1, 6, 1, 6, 1, 1, 7, 7, 7, 7, 7, 7, 1, 1, 8, 0, 0, 0, 0, 0, 8, 1, 1, 9, 8, 0, 0, 0, 0, 8, 9, 1, 1, 10, 3, 8, 0, 0, 0, 8, 3, 10, 1, 1, 11, 13, 11, 8, 0, 0, 8, 11, 13, 11, 1, 1, 12, 10, 10, 5, 8, 0, 8, 5, 10, 10, 12, 1, 1, 13, 8, 6, 1, 13, 8, 8, 13, 1, 6, 8, 13, 1, 1, 0, 7, 0, 7, 0, 7, 2, 7, 0, 7, 0, 7, 0, 1
Offset: 0

Author

Ilya Gutkovskiy, Aug 11 2016

Keywords

Examples

			Triangle begins:
                      1,
                    1,  1,
                  1,  2,  1,
                1,  3,  3,  1,
              1,  4,  6,  4,  1,
            1,  5, 10, 10,  5,  1,
          1,  6,  1,  6,  1,  6,  1,
        1,  7,  7,  7,  7,  7,  7,  1,
      1,  8,  0,  0,  0,  0,  0,  8,  1,
    1,  9,  8,  0,  0,  0,  0,  8,  9,  1,
  1, 10,  3,  8,  0,  0,  0,  8,  3, 10,  1,
  ...
		

Crossrefs

Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930 (m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), (this sequence) (m = 14), A034932 (m = 16).

Programs

  • Mathematica
    Mod[Flatten[Table[Binomial[n, k], {n, 0, 14}, {k, 0, n}]], 14]
  • Python
    from math import comb, isqrt
    from sympy.ntheory.modular import crt
    def A275198(n):
        w, c = n-((r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(r+1)>>1), 1
        d = int(not ~r & w)
        while True:
            r, a = divmod(r,7)
            w, b = divmod(w,7)
            c = c*comb(a,b)%7
            if r<7 and w<7:
                c = c*comb(r,w)%7
                break
        return crt([7,2],[c,d])[0] # Chai Wah Wu, May 01 2025

Formula

T(n, k) = binomial(n, k) mod 14.
a(n) = A070696(A007318(n)).
Previous Showing 21-30 of 2117 results. Next