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-10 of 11 results. Next

A131078 Periodic sequence (1, 1, 1, 1, 0, 0, 0, 0).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Crossrefs

Period 2*k: repeat k ones followed by k zeros: A000035(n+1) (k=1), A133872(n) (k=2), A088911 (k=3), this sequence (k=4), and A112713(n-1) (k=5).

Programs

  • Magma
    m:=105; [ [1, 1, 1, 1, 0, 0, 0, 0][ (n-1) mod 8 + 1 ]: n in [1..m] ];
    
  • Magma
    &cat[[1, 1, 1, 1, 0, 0, 0,0]: n in [0..10]]; // Vincenzo Librandi, May 31 2015
    
  • Magma
    [Floor((1+(-1)^((2*n+11-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8))/2): n in [1..60]]; // Vincenzo Librandi, May 31 2015
    
  • PARI
    {m=105; for(n=1, m, print1((n-1)%8<4, ","))}
    
  • Python
    def A131078(n): return int(not n-1&4) # Chai Wah Wu, Jan 31 2023

Formula

a(1) = a(2) = a(3) = a(4) = 1, a(5) = a(6) = a(7) = a(8) = 0; for n > 8, a(n) = a(n-8).
G.f.: x/((1-x)*(1+x^4)).
a(n) = floor(((n+4) mod 8)/4). [Gary Detlefs, May 17 2011]
From Wesley Ivan Hurt, May 30 2015: (Start)
a(n) = a(n-1)-a(n-4)+a(n-5), n>5.
a(n) = (1+(-1)^((2*n+11-(-1)^n+2*(-1)^((2*n+5-(-1)^n)/4))/8))/2. (End)
From Ridouane Oudra, Nov 17 2019: (Start)
a(n) = binomial(n+3,4) mod 2
a(n) = floor((n+3)/4) - 2*floor((n+3)/8). (End)

A131082 Periodic sequence (15, 11, 5, 1, 1, 5, 11, 15).

Original entry on oeis.org

15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1, 1, 5, 11, 15, 15, 11, 5, 1
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Fifth column of triangular array T defined in A131074.
Simple continued fraction of (1728521 + sqrt(3040737300437))/230114 = 15.0894426240... - R. J. Mathar, Mar 08 2012

Crossrefs

Programs

  • Magma
    m:=84; [ [15, 11, 5, 1, 1, 5, 11, 15][(n-1) mod 8 + 1]: n in [1..m] ];
    
  • Mathematica
    PadRight[{},100,{15,11,5,1,1,5,11,15}] (* or *) LinearRecurrence[ {1,0,0,-1,1},{15,11,5,1,1},100] (* Harvey P. Dale, Feb 01 2015 *)
  • PARI
    {m=84; for(n=1, m, r=(n-1)%8; print1(if(r==0||r==7, 15, if(r==1||r==6, 11, if(r==2||r==5, 5, 1))), ","))}
    
  • Scheme
    (define (A131082 n) (list-ref '(15 11 5 1 1 5 11 15) (modulo (- n 1) 8))) ;; Antti Karttunen, Aug 10 2017

Formula

a(n) = a(n-8).
G.f.: x*(15 - 4*x - 6*x^2 - 4*x^3 + 15*x^4)/((1-x)*(1+x^4)).

A129961 Main diagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1)+T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 8, 15, 26, 42, 64, 94, 140, 232, 464, 1092, 2744, 6840, 16384, 37384, 81296, 169120, 338240, 654192, 1232288, 2280864, 4194304, 7761376, 14635712, 28384384, 56768768, 116566080, 243472256, 511907712, 1073741824, 2232713344
Offset: 1

Views

Author

Paul Curtz, Jun 10 2007

Keywords

Comments

First column is periodically 1 1 1 1 0 0 0 0 (see A131078).
First subdiagonal is 1, 2, 4, 7, 11, 16, 22, ... (see A131075); next subdiagonals are 1, 2, 3, 4, 5, 6, 8, 16, 46, 140, ..., 1, 1, 1, 1, 1, 2, 8, 30, 94, 256, ..., 0, 0, 0, 0, 1, 6, 22, 64, 162, 372, ..., 0, 0, 0, 1, 5, 16, 42, 98, 210, 420, ...., 0, 0, 1, 4, 11, 26, 56, 112, 210, 372, ..., 0, 1, 3, 7, 15, 30, 56, 98, 162, 256, ...,1, 2, 4, 8, 15, 26, 42, 64, 94, 140, ... . Main diagonal and eighth subdiagonal agree; generally j-th subdiagonal equals (j+8)-th subdiagonal.
Antidiagonal sums are 1, 1, 3, 3, 6, 5, 11, ... (see A131077).

Examples

			First seven rows of T are
[ 1 ]
[ 1, 2 ]
[ 1, 2, 4 ]
[ 1, 2, 4, 8 ]
[ 0, 1, 3, 7, 15 ]
[ 0, 0, 1, 4, 11, 26 ]
[ 0, 0, 0, 1, 5, 16, 42 ].
		

Crossrefs

Cf. A129339, A131074 (T read by rows), A131075 (first subdiagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=33; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n, n]: n in [1..m] ]; // Klaus Brockhaus, Jun 14 2007
    
  • Magma
    m:=33; S:=[ [1, 1, 1, 1, 0, 0, 0, 0][(n-1) mod 8 + 1]: n in [1..m] ]; [ &+[ Binomial(i-1, k-1)*S[k]: k in [1..i] ]: i in [1..m] ]; // Klaus Brockhaus, Jun 17 2007
  • PARI
    {m=33; v=concat([1, 2, 4, 8, 15], vector(m-5)); for(n=6, m, v[n]=6*v[n-1]-14*v[n-2]+16*v[n-3]-10*v[n-4]+4*v[n-5]); v} \\ Klaus Brockhaus, Jun 14 2007
    

Formula

G.f.: x*(1-x)^4/((1-2*x)*(1-4*x+6*x^2-4*x^3+2*x^4)).
a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 8, a(5) = 15; for n > 5, a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-10*a(n-4)+4*a(n-5).
Binomial transform of A131078. - Klaus Brockhaus, Jun 17 2007

Extensions

Edited and extended by Klaus Brockhaus, Jun 14 2007
G.f. corrected by Klaus Brockhaus, Oct 15 2009

A131079 Periodic sequence (2, 2, 2, 1, 0, 0, 0, 1).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Second column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=105; [ [2, 2, 2, 1, 0, 0, 0, 1][(n-1) mod 8 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{2,2,2,1,0,0,0,1}] (* Harvey P. Dale, Mar 04 2020 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%8; print1(if(r<3, 2, if(r==3||r==7, 1, 0)), ","))}
    

Formula

a(n) = a(n-8).
G.f.: x*(2-x^3+x^4)/((1-x)*(1+x^4)).

A131080 Periodic sequence (4, 4, 3, 1, 0, 0, 1, 3).

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Third column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=105; [ [4, 4, 3, 1, 0, 0, 1, 3][(n-1) mod 8 + 1]: n in [1..m] ];
  • PARI
    {m=105; for(n=1, m, r=(n-1)%8; print1(if(r<2, 4, if(r==2||r==7, 3, if(r==3||r==6, 1, 0))), ","))}
    

Formula

a(n) = a(n-8).
G.f.: x*(4-x^2-2*x^3+3*x^4)/((1-x)*(1+x^4)).

A131081 Periodic sequence (8, 7, 4, 1, 0, 1, 4, 7).

Original entry on oeis.org

8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8, 7, 4, 1, 0, 1, 4, 7, 8
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Fourth column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=105; [ [8, 7, 4, 1, 0, 1, 4, 7][(n-1) mod 8 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},120,{8,7,4,1,0,1,4,7}] (* Harvey P. Dale, May 20 2012 *)
  • PARI
    {m=105; for(n=1, m, r=(n-1)%8; print1(if(r==0, 8, if(r==1||r==7, 7, if(r==2||r==6, 4, if(r==4, 0, 1)))), ","))}
    

Formula

a(1) = 8, a(2) = a(8) = 7, a(3) = a(7) = 4, a(4) = a(6) = 1, a(5) = 0; for n > 8, a(n) = a(n-8).
G.f.: (8-x-3*x^2-3*x^3+7*x^4)/((1-x)*(1+x^4)).

A131083 Periodic sequence (26, 16, 6, 2, 6, 16, 26, 30).

Original entry on oeis.org

26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30, 26, 16, 6, 2, 6, 16, 26, 30
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Sixth column of triangular array T defined in A131074.

Crossrefs

Programs

  • Magma
    m:=80; [ [26, 16, 6, 2, 6, 16, 26, 30][(n-1) mod 8 + 1]: n in [1..m] ];
  • Mathematica
    PadRight[{},90,{26,16,6,2,6,16,26,30}] (* Harvey P. Dale, Nov 02 2017 *)
  • PARI
    {m=80; for(n=1, m, r=(n-1)%8; print1(if(r==0||r==6, 26, if(r==1||r==5, 16, if(r==2||r==4, 6, if(r==3, 2, 30)))), ","))}
    

Formula

a(n) = a(n-8).
G.f.: x*(26-10*x-10*x^2-4*x^3+30*x^4)/((1-x)*(1+x^4)).

A300401 Array T(n,k) = n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1) read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 4, 4, 3, 4, 7, 8, 7, 4, 5, 11, 14, 14, 11, 5, 6, 16, 22, 24, 22, 16, 6, 7, 22, 32, 37, 37, 32, 22, 7, 8, 29, 44, 53, 56, 53, 44, 29, 8, 9, 37, 58, 72, 79, 79, 72, 58, 37, 9, 10, 46, 74, 94, 106, 110, 106, 94, 74, 46, 10, 11, 56, 92, 119
Offset: 0

Views

Author

Keywords

Comments

Antidiagonal sums are given by 2*A055795.
Rows/columns n are binomial transform of {n, A152947(n+1), n, 0, 0, 0, ...}.
Some primes in the array are
n = 1: {2, 7, 11, 29, 37, 67, 79, 137, 191, 211, 277, 379, ...} = A055469, primes of the form k*(k + 1)/2 + 1;
n = 3: {3, 7, 37, 53, 479, 653, 1249, 1619, 2503, 3727, 4349, 5737, 7109, 8179, 9803, 11839, 12107, ...};
n = 4: {11, 37, 79, 137, 211, 821, 991, 1597, 1831, 2081, 2347, ...} = A188382, primes of the form 8*(2*k - 1)^2 + 2*(2*k - 1) + 1.

Examples

			The array T(n,k) begins
0     1    2    3    4     5     6     7     8     9    10    11  ...
1     2    4    7   11    16    22    29    37    46    56    67  ...
2     4    8   14   22    32    44    58    74    92   112   134  ...
3     7   14   24   37    53    72    94   119   147   178   212  ...
4    11   22   37   56    79   106   137   172   211   254   301  ...
5    16   32   53   79   110   146   187   233   284   340   401  ...
6    22   44   72  106   146   192   244   302   366   436   512  ...
7    29   58   94  137   187   244   308   379   457   542   634  ...
8    37   74  119  172   233   302   379   464   557   658   767  ...
9    46   92  147  211   284   366   457   557   666   784   911  ...
10   56  112  178  254   340   436   542   658   784   920  1066  ...
11   67  134  212  301   401   512   634   767   911  1066  1232  ...
12   79  158  249  352   467   594   733   884  1047  1222  1409  ...
13   92  184  289  407   538   682   839  1009  1192  1388  1597  ...
14  106  212  332  466   614   776   952  1142  1346  1564  1796  ...
15  121  242  378  529   695   876  1072  1283  1509  1750  2006  ...
16  137  274  427  596   781   982  1199  1432  1681  1946  2227  ...
17  154  308  479  667   872  1094  1333  1589  1862  2152  2459  ...
18  172  344  534  742   968  1212  1474  1754  2052  2368  2702  ...
19  191  382  592  821  1069  1336  1622  1927  2251  2594  2956  ...
20  211  422  653  904  1175  1466  1777  2108  2459  2830  3221  ...
...
The inverse binomial transforms of the columns are
0     1    2    3    4     5     6     7     8     9    10    11  ...  A001477
1     1    2    4    7    11    22    29    37    45    56    67  ...  A152947
0     1    2    3    4     5     6     7     8     9    10    11  ...  A001477
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  ...
...
		

References

  • Miklós Bóna, Introduction to Enumerative Combinatorics, McGraw-Hill, 2007.
  • L. Comtet, Advanced Combinatorics: The Art of Finite and Infinite Expansions, Reidel Publishing Company, 1974.
  • R. P. Stanley, Enumerative Combinatorics, second edition, Cambridge University Press, 2011.

Crossrefs

Programs

  • Maple
    T := (n, k) -> n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1);
    for n from 0 to 20 do seq(T(n, k), k = 0 .. 20) od;
  • Mathematica
    T[n_, k_] := n (Binomial[k, 2] + 1) + k (Binomial[n, 2] + 1);
    Table[T[n - k, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Dec 07 2018 *)
  • Maxima
    T(n, k) := n*(binomial(k, 2) + 1) + k*(binomial(n, 2) + 1)$
    for n:0 thru 20 do
      print(makelist(T(n, k), k, 0, 20));
    
  • PARI
    T(n, k) = n*(binomial(k,2) + 1) + k*(binomial(n,2) + 1);
    tabl(nn) = for (n=0, nn, for (k=0, nn, print1(T(n, k), ", ")); print); \\ Michel Marcus, Mar 12 2018

Formula

T(n,k) = T(k,n) = n*A152947(k+1) + k*A152947(n+1).
T(n,0) = A001477(n).
T(n,1) = A000124(n).
T(n,2) = A014206(n).
T(n,3) = A273465(3*n+2).
T(n,4) = A084849(n+1).
T(n,n) = A179000(n-1,n), n >= 1.
T(2*n,2*n) = 8*A081436(n-1), n >= 1.
T(2*n+1,2*n+1) = 2*A006000(2*n+1).
T(n,n+1) = A188377(n+3).
T(n,n+2) = A188377(n+2), n >= 1.
Sum_{k=0..n} T(k,n-k) = 2*(binomial(n, 4) + binomial(n, 2)).
G.f.: -((2*x*y - y - x)*(2*x*y - y - x + 1))/(((x - 1)*(y - 1))^3).
E.g.f.: (1/2)*(x + y)*(x*y + 2)*exp(x + y).

A131075 First subdiagonal of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 2, 4, 7, 11, 16, 22, 30, 46, 92, 232, 628, 1652, 4096, 9544, 21000, 43912, 87824, 169120, 315952, 578096, 1048576, 1913440, 3567072, 6874336, 13748672, 28384384, 59797312, 126906176, 268435456, 561834112, 1158971520, 2353246336, 4706492672, 9292452352
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Also first differences of main diagonal A129961.

Examples

			For first seven rows of T see A131074 or A129961.
		

Crossrefs

Cf. A131074 (T read by rows), A129961 (main diagonal of T), A131076 (row sums of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=34; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ M[n+1, n]: n in [1..m-1] ];
    
  • PARI
    lista(m) = my(v=concat([1, 2, 4, 7, 11], vector(m-5))); for(n=6, m, v[n]=6*v[n-1]-14*v[n-2]+16*v[n-3]-10*v[n-4]+4*v[n-5]); v

Formula

a(1) = 1, a(2) = 2, a(3) = 4, a(4) = 7, a(5) = 11; for n > 5, a(n) = 6*a(n-1)-14*a(n-2)+16*a(n-3)-10*a(n-4)+4*a(n-5).
G.f.: x*(1-4*x+6*x^2-5*x^3+3*x^4)/((1-2*x)*(1-4*x+6*x^2-4*x^3+2*x^4)).

A131076 Row sums of triangular array T: T(j,1) = 1 for ((j-1) mod 8) < 4, else 0; T(j,k) = T(j-1,k-1) + T(j,k-1) for 2 <= k <= j.

Original entry on oeis.org

1, 3, 7, 15, 26, 42, 64, 93, 139, 231, 463, 1092, 2744, 6840, 16384, 37383, 81295, 169119, 338239, 654192, 1232288, 2280864, 4194304, 7761375, 14635711, 28384383, 56768767, 116566080, 243472256, 511907712, 1073741824, 2232713343, 4585959679, 9292452351
Offset: 1

Views

Author

Klaus Brockhaus, following a suggestion of Paul Curtz, Jun 14 2007

Keywords

Comments

Sum of n-th row equals (n+1)-th term of main diagonal minus (n+1)-th term of first column: a(n) = A129961(n+1) - A131078(n+1).

Examples

			For first seven rows of T see A131074 or A129961.
		

Crossrefs

Cf. A131074 (T read by rows), A129961 (main diagonal of T), A131075 (first subdiagonal of T), A131077 (antidiagonal sums of T). First through sixth column of T are in A131078, A131079, A131080, A131081, A131082, A131083 resp.

Programs

  • Magma
    m:=32; M:=ZeroMatrix(IntegerRing(), m, m); for j:=1 to m do if (j-1) mod 8 lt 4 then M[j, 1]:=1; end if; end for; for k:=2 to m do for j:=k to m do M[j, k]:=M[j-1, k-1]+M[j, k-1]; end for; end for; [ &+[ M[j, k]: k in [1..j] ]: j in [1..m] ];
    
  • Mathematica
    LinearRecurrence[{7,-20,30,-27,21,-24,30,-26,14,-4},{1,3,7,15,26,42,64,93,139,231},40] (* Harvey P. Dale, Jun 23 2025 *)
  • PARI
    lista(m) = my(M=matrix(m, m)); for(j=1, m, M[j, 1]=if((j-1)%8<4, 1, 0)); for(k=2, m, for(j=k, m, M[j, k]=M[j-1, k-1]+M[j, k-1])); for(j=1, m, print1(sum(k=1, j, M[j, k]), ", "))

Formula

G.f.: x*(1-4*x+6*x^2-4*x^3-2*x^4+10*x^5-10*x^6+5*x^7-x^8)/((1-x)*(1-2*x)*(1+x^4)*(1-4*x+6*x^2-4*x^3+2*x^4)).
Showing 1-10 of 11 results. Next