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

A134227 Row sums of triangle A134226.

Original entry on oeis.org

1, 4, 9, 15, 22, 30, 39, 49, 60, 72, 85, 99, 114, 130, 147, 165, 184, 204, 225, 247, 270, 294, 319, 345, 372, 400, 429, 459, 490, 522, 555, 589, 624, 660, 697, 735, 774, 814, 855, 897, 940, 984, 1029, 1075, 1122, 1170, 1219, 1269, 1320, 1372, 1425, 1479, 1534, 1590, 1647, 1705, 1764, 1824, 1885, 1947
Offset: 1

Views

Author

Gary W. Adamson, Oct 14 2007

Keywords

Comments

Essentially the same as A055999. - R. J. Mathar, Mar 28 2012

Examples

			a(4) = 15 = sum of row 4 terms of triangle A134226: (1 + 2 + 8 + 4).
a(4) = 15 = (1, 3, 3, 1) dot (1, 3, 2, -1) = (1 + 9 + 6 - 1).
		

Crossrefs

Cf. A134226.

Programs

  • Magma
    [1] cat [(n-1)*(n+6)/2: n in [2..70]]; // G. C. Greubel, Feb 17 2021
  • Mathematica
    Table[(n-1)*(n+6)/2 + Boole[n==1], {n, 70}] (* G. C. Greubel, Feb 17 2021 *)
    LinearRecurrence[{3,-3,1},{1,4,9,15},70] (* Harvey P. Dale, Aug 13 2024 *)
  • Sage
    [1]+[(n-1)*(n+6)/2 for n in (2..70)] # G. C. Greubel, Feb 17 2021
    

Formula

Binomial transform of (1, 3, 2, -1, 1, -1, 1, -1, 1, ...).
From G. C. Greubel, Feb 17 2021: (Start)
a(n) = (n-1)*(n+6)/2 + [n=1].
G.f.: x*(1 +x -x^3)/(1-x)^3.
E.g.f.: 3 + x + (-6 +6*x +x^2)*exp(x)/2. (End)

Extensions

Terms a(37) onward added by G. C. Greubel, Feb 17 2021

A185732 Accumulation array of the polygonal number array (A086270), by antidiagonals.

Original entry on oeis.org

1, 4, 2, 10, 9, 3, 20, 24, 15, 4, 35, 50, 42, 22, 5, 56, 90, 90, 64, 30, 6, 84, 147, 165, 140, 90, 39, 7, 120, 224, 273, 260, 200, 120, 49, 8, 165, 324, 420, 434, 375, 270, 154, 60, 9, 220, 450, 612, 672, 630, 510, 350, 192, 72, 10, 286, 605, 855, 984, 980, 861, 665, 440, 234, 85, 11, 364, 792, 1155, 1380, 1440, 1344, 1127, 840, 540, 280, 99, 12, 455, 1014, 1518, 1870, 2025, 1980, 1764, 1428, 1035, 650, 330, 114, 13, 560, 1274, 1950, 2464, 2750, 2790, 2604, 2240
Offset: 1

Views

Author

Clark Kimberling, Feb 01 2011

Keywords

Comments

This is the (first) accumulation array of A086270; the second is A185733. See A144112 for the definition of accumulation array.

Examples

			Northwest corner:
1....4....10...20...35
2....9....24...50...90
3....15...42...90...165
4....22...64...140..260
5....30...90...200..375
		

Crossrefs

Rows 1 to 5: A000292, A006002, A059270, A177814, 5*A002411.
Columns 1 to 4: A000027, A055999, A067728, 10*A000096.

Programs

  • Mathematica
    f[n_,k_]:=k+n*k(k-1)/2;
    TableForm[Table[f[n,k],{n,1,10},{k,1,15}]]  (* Array A086270 *)
    Table[f[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten  (* A086270 *)
    s[n_,k_]:=Sum[f[i,j],{i,1,n},{j,1,k}]; (* acc. arr. of {f(n,k)} *)
    Factor[s[n,k]]  (* formula for A185732 *)
    TableForm[Table[s[n,k],{n,1,10},{k,1,15}]] (* acc. arr. A185732 *)
    Table[s[n-k+1,k],{n,14},{k,n,1,-1}]//Flatten (* A185732 *)

Formula

T(n,k) = k*(k+1)*n*(n+1)*(k*n-n+k+5)/12.

A174183 a(n) is the period k such that binomial(m, n) (mod 10) = binomial(m + k, n) (mod 10).

Original entry on oeis.org

1, 10, 20, 60, 240, 1200, 7200, 50400, 403200, 3628800, 36288000, 399168000, 4790016000, 62270208000, 871782912000, 13076743680000, 209227898880000, 3556874280960000, 64023737057280000, 1216451004088320000
Offset: 0

Views

Author

Michel Lagneau, Mar 11 2010

Keywords

Comments

a(n) is the period (mod 10) of the numbers in each column n of Pascal's triangle.

Examples

			x(0)= 0.C(1,0)C(2,0)C(3,0) ... = 0.11111111111... and p(0)=1 ;
x(1)= 0.C(1,1)C(2,1)C(3,1) ... = 0.12345678901234... and p(1) = 10 ;
x(2)= 0.C(2,2)C(3,2)C(4,2) ... = 0.13605186556815063100 13605186556815063100... and p(2)=20.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 828.

Crossrefs

Programs

  • Mathematica
    Join[{1},Array[10#!&,20]] (* Harvey P. Dale, Feb 18 2018 *)
  • Python
    from math import factorial
    def A174183(n): return 10*factorial(n) if n else 1 # Chai Wah Wu, Aug 07 2025

Formula

a(0)=1, and a(n) = 10 * n! for n >= 1.

Extensions

Additional comments, and errors in examples corrected by Michel Lagneau, May 07 2010

A193002 Triangle T(n,k)=0 (k odd), T(0,0)=-3, T(n,0)=1 (n > 0) and T(n,k) = T(n-1,k) - T(n-2,k-2).

Original entry on oeis.org

-3, 1, 0, 1, 0, 3, 1, 0, 2, 0, 1, 0, 1, 0, -3, 1, 0, 0, 0, -5, 0, 1, 0, -1, 0, -6, 0, 3, 1, 0, -2, 0, -6, 0, 8, 0, 1, 0, -3, 0, -5, 0, 14, 0, -3, 1, 0, -4, 0, -3, 0, 20, 0, -11, 0, 1, 0, -5, 0, 0, 0, 25, 0, -25, 0, 3, 1, 0, -6
Offset: 0

Views

Author

Paul Curtz, Jul 14 2011

Keywords

Comments

Consider an array with recurrence BB(m,n) = BB(m,n-1) + BB(m-1,n), m >= 0:
3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
3, 2, 1, 0, -1, -2, -3, -4, -5, -6, -7,
3, 5, 6, 6, 5, 3, 0, -4, -9, -15, -22,
3, 8, 14, 20, 25, 28, 28, 24, 15, 0, -22,
3, 11, 25, 45, 70, 98, 126, 150, 165, 165, 143,
3, 14, 39, 84, 154, 252, 378, 528, 693, 858, 1001,
with BB(m,n) = (3m-n)*binomial(n+m-1,n)/m if m > 0. So the BB are polynomials of degree m in n:
BB(1,n) = -(n-3)/1,
BB(2,n) = -(n-6)*(n+1)/2, (see A055999)
BB(3,n) = -(n-9)*(n+1)*(n+2)/6,
BB(4,n) = -(n-12)*(n+1)*(n+2)*(n+3)/24,
BB(5,n) = -(n-15)*(n+1)*(n+2)*(n+3)*(n+4)/120.
Columns in the array are A010701, A016789, A095794, A005564, A059302.
T(n,k) is a zero-padded, column-shifted, sign-modified transpose of this array.

Examples

			Triangle begins
  -3;
   1,   0;
   1,   0,   3;
   1,   0,   2,   0;
   1,   0,   1,   0,  -3;
   1,   0,   0,   0,  -5,   0;
   1,   0,  -1,   0,  -6,   0,   3;
   1,   0,  -2,   0,  -6,   0,   8,   0;
   1,   0,  -3,   0,  -5,   0,  14,   0,  -3;
   1,   0,  -4,   0,  -3,   0,  20,   0, -11,   0;
		

Crossrefs

Cf. A174559.

Programs

  • Maple
    BB := proc(m,n) if m=0 then if n= 0 then 3 ; else -1; end if; else (3*m-n)*binomial(n+m-1,n)/m ; end if; end proc:
    A193002 := proc(n,k) if type(k,'odd') then 0; else (-1)^(1+k/2)*BB(k/2,n-k) ; end if; end proc:
    seq(seq(A193002(n,k),k=0..n),n=0..15) ; # R. J. Mathar, Aug 30 2011

Formula

Sum_{k=0..n} T(n,k) = A130806(n+5). (row sums)
Sum_{k=0..n} (-1)^(k/2)*T(n,k) = -A000032(n-2). (alternating row sums)
T(n,k) = (-1)^(1+k/2)*BB(k/2,n-k). - R. J. Mathar, Aug 30 2011
T(n,2k) = (-1)^(1+k)*(5-n/k)*binomial(n-k-1,k-1), k > 0. - R. J. Mathar, Aug 30 2011

A214859 Triangle read by rows, T(n,k) = n^2 - k*(k+1)/2 if k*(k+1)/2 <= n^2.

Original entry on oeis.org

0, 1, 0, 4, 3, 1, 9, 8, 6, 3, 16, 15, 13, 10, 6, 1, 25, 24, 22, 19, 15, 10, 4, 36, 35, 33, 30, 26, 21, 15, 8, 0, 49, 48, 46, 43, 39, 34, 28, 21, 13, 4, 64, 63, 61, 58, 54, 49, 43, 36, 28, 19, 9, 81, 80, 78, 75, 71, 66, 60, 53, 45, 36, 26, 15, 3, 100, 99, 97
Offset: 0

Views

Author

Philippe Deléham, Mar 09 2013

Keywords

Comments

Row lengths are in A214857.

Examples

			Triangle begins:
    0;
    1,   0;
    4,   3,   1;
    9,   8,   6,   3;
   16,  15,  13,  10,   6,   1;
   25,  24,  22,  19,  15,  10,   4;
   36,  35,  33,  30,  26,  21,  15,  8,  0;
   49,  48,  46,  43,  39,  34,  28, 21, 13,  4;
   64,  63,  61,  58,  54,  49,  43, 36, 28, 19,  9;
   81,  80,  78,  75,  71,  66,  60, 53, 45, 36, 26, 15,  3;
  100,  99,  97,  94,  90,  85,  79, 72, 64, 55, 45, 34, 22,  9;
  121, 120, 118, 115, 111, 106, 100, 93, 85, 76, 66, 55, 43, 30, 16, 1;
  ...
		

Crossrefs

Cf. Diagonals: A000217, A034856, A055999,

Programs

  • Mathematica
    Table[s = {}; k = 0; While[tri = k*(k + 1)/2; tri <= n^2, AppendTo[s, n^2 - tri]; k++]; s, {n, 0, 10}] (* T. D. Noe, Mar 11 2013 *)

Formula

T(2*n,n) = A022264(n).
T(n,n) = n*(n-1)/2 = A000217(n-1).

A279895 a(n) = n*(5*n + 11)/2.

Original entry on oeis.org

0, 8, 21, 39, 62, 90, 123, 161, 204, 252, 305, 363, 426, 494, 567, 645, 728, 816, 909, 1007, 1110, 1218, 1331, 1449, 1572, 1700, 1833, 1971, 2114, 2262, 2415, 2573, 2736, 2904, 3077, 3255, 3438, 3626, 3819, 4017, 4220, 4428, 4641, 4859, 5082, 5310, 5543, 5781, 6024, 6272, 6525
Offset: 0

Views

Author

Bruno Berselli, Dec 22 2016

Keywords

Crossrefs

Second bisection of A165720.
The first differences are in A016885.
Cf. similar sequences provided by P(s,m)+s*m, where P(s,m) = ((s-2)*m^2-(s-4)*m)/2 is the m-th s-gonal number: A008585 (s=2), A055999 (s=3), A028347 (s=4), A140091 (s=5), A033537 (s=6), this sequence (s=7), A067725 (s=8).

Programs

  • Magma
    [n*(5*n+11)/2: n in [0..60]];
  • Mathematica
    Table[n (5 n + 11)/2, {n, 0, 60}]
    LinearRecurrence[{3,-3,1},{0,8,21},60] (* Harvey P. Dale, Nov 14 2022 *)
  • PARI
    vector(60, n, n--; n*(5*n+11)/2)
    
  • Python
    [n*(5*n+11)/2 for n in range(60)]
    
  • Sage
    [n*(5*n+11)/2 for n in range(60)]
    

Formula

O.g.f.: x*(8 - 3*x)/(1 - x)^3.
E.g.f.: x*(16 + 5*x)*exp(x)/2.
a(n+h) - a(n-h) = h*A017281(n+1), with h>=0. A particular case:
a(n) - a(-n) = 11*n = A008593(n).
a(n+h) + a(n-h) = 2*a(n) + A033429(h), with h>=0. A particular case:
a(n) + a(-n) = A033429(n).
a(n) - a(n-2) = A017281(n) for n>1. Also:
40*a(n) + 121 = A017281(n+1)^2.
a(n) = A000566(n) + 7*n, also a(n) = A000566(n) + A008589(n). - Michel Marcus, Dec 22 2016

A095668 Sixth column (m=5) of (1,4)-Pascal triangle A095666.

Original entry on oeis.org

4, 21, 66, 161, 336, 630, 1092, 1782, 2772, 4147, 6006, 8463, 11648, 15708, 20808, 27132, 34884, 44289, 55594, 69069, 85008, 103730, 125580, 150930, 180180, 213759, 252126, 295771, 345216, 401016, 463760, 534072, 612612, 700077, 797202, 904761
Offset: 0

Views

Author

Wolfdieter Lang, Jun 11 2004

Keywords

Comments

If Y is a 4-subset of an n-set X, then, for n >= 8, a(n-8) is the number of 5-subsets of X having at most one element in common with Y. - Milan Janjic, Dec 08 2007

Crossrefs

Programs

  • Magma
    [(n+20)*Binomial(n+4, 4)/5: n in [0..30]]; // G. C. Greubel, Nov 25 2017
  • Maple
    A095668:=n->(n+20)*binomial(n+4, 4)/5: seq(A095668(n), n=0..80); # Wesley Ivan Hurt, Nov 25 2017
  • Mathematica
    Table[(n + 20)*Binomial[n + 4, 4]/5, {n, 0, 50}] (* G. C. Greubel, Nov 25 2017 *)
  • PARI
    for(n=0,30, print1((n+20)*binomial(n+4, 4)/5, ", ")) \\ G. C. Greubel, Nov 25 2017
    

Formula

G.f.: (4-3*x)/(1-x)^6.
a(n) = (n+20)*binomial(n+4, 4)/5.
a(n) = 4*b(n) - 3*b(n-1), with b(n) = binomial(n+5, 5) = A000389(n+5, 5).
E.g.f.: (480 + 2040*x + 1680*x^2 + 440*x^3 + 40*x^4 + x^5)*exp(x)/120. - G. C. Greubel, Nov 25 2017
a(n) = Sum_{i=0..n+1} A000217(i)*A055999(n+2-i). - Bruno Berselli, Mar 05 2018

A209274 Table T(n,k) = n*(n+2^k-1)/2, n, k > 0 read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 9, 10, 16, 17, 15, 14, 15, 32, 33, 27, 22, 20, 21, 64, 65, 51, 38, 30, 27, 28, 128, 129, 99, 70, 50, 39, 35, 36, 256, 257, 195, 134, 90, 63, 49, 44, 45, 512, 513, 387, 262, 170, 111, 77, 60, 54, 55, 1024, 1025, 771, 518, 330, 207, 133, 92, 72, 65, 66
Offset: 1

Views

Author

Boris Putievskiy, Jan 15 2013

Keywords

Comments

Column number 1 A000217 n*(n+1)/2,
column number 2 A000096 n*(n+3)/2,
column number 3 A055999 n*(n+7)/2,
column number 4 A056121 n*(n+15)/2,
column number 5 A132758 n*(n+31)/2.
Row number 1 A000079 2^k,
row number 2 A000051 2^k + 1.

Examples

			The start of the sequence as table:
  1....2...4...8...16...32...64...
  3....5...9..17...33...65..129...
  6....9..15..27...51...99..195...
  10..14..22..38...70..134..262...
  15..20..30..50...90..170..330...
  21..27..39..63..111..207..399...
  28..35..49..77..133..245..469...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  2,3;
  4,5,6;
  8,9,9,10;
  16,17,15,14,15;
  32,33,27,22,20,21;
  64,65,51,38,30,27,28;
  . . .
Row number r contains r numbers.
		

Crossrefs

Programs

  • Mathematica
    b[n_] := n - d[n]*(d[n] + 1)/2; c[n_] := (d[n]^2 + 3*d[n] + 4)/2 - n; d[n_] := Floor[(-1 + Sqrt[8*n - 7])/2]; a[n_] := b[n]*(b[n] + 2^c[n] - 1)/2; Table[a[n], {n, 1, 50}] (* G. C. Greubel, Jan 04 2018 *)
  • PARI
    a(n, k) = n*(n+2^k-1)/2
    array(rows, cols) = for(x=1, rows, for(y=1, cols, print1(a(x, y), ", ")); print(""))
    /* Print initial 7 rows and 8 columns of table as follows */
    array(7, 8) \\ Felix Fröhlich, Jan 05 2018
  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    result = i*(i+2**j-1)/2
    

Formula

a(n) = A002260(n)*(A002260(n)+2^A004736(n)-1)/2.
a(n) = i*(i+2^j-1)/2,
where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A358269 a(n) is the position m of the last prime term in the sequence {b(m)} defined by b(1) = n, if b(m) is prime then b(m+1) = b(m) - m, else b(m+1) = b(m) + m.

Original entry on oeis.org

3, 1004, 3, 1004, 3, 1004, 30, 349, 30, 5, 19, 5, 30, 1004, 30, 8, 11, 8, 30, 5, 86, 17, 67, 17, 15, 9, 19, 9, 15, 9, 19, 484, 19, 13, 30, 9, 19, 9, 19, 13, 374, 13, 19, 13, 11, 484, 86, 484, 19, 13, 67, 16, 19, 16, 19, 484, 374, 484, 19, 484, 374, 24, 19, 13
Offset: 0

Views

Author

Samuel Harkness, Nov 06 2022

Keywords

Comments

A sequence {b(m)} is guaranteed to have no more primes when the m-th term "k" with value "s" is the sum of at least 3 consecutive positive integers where the sum is "s" and the last consecutive positive integer in the sum is k-1. Any number which is the sum of at least three consecutive positive integers is guaranteed to be composite. By the definition of the sequence, the next term k + 1 = s + k, and this term will be the sum of at least three consecutive positive integers with the last consecutive positive integer being k. This guarantees that this term is also guaranteed to be composite, and by induction, all future terms in {b(m)} will be composite.
In a sequence {b(m)}, if the m-th term k with value s satisfies c = (sqrt(-8*s + 4*k^2 - 4*k + 1) + 1)/2 for a positive integer c with s being nonprime and k > 3 then the value of all terms >= k will be composite.
It is unknown whether all initial conditions "n" guarantee a final prime. All terms up to n = 1000 have a final prime.
Treat negative numbers in the sequence {b(m)} as nonprime. The only n whose {b(m)} contain negative terms b(m) are 1, 3, 6, and 7.

Examples

			For n = 9: b(1) = 9. Nonprime, b(2) = 9 + 1 = 10. Nonprime, b(3) = 10 + 2 = 12. Nonprime, b(4) = 12 + 3 = 15. Nonprime, b(5) = 15 + 4 = 19. Prime, b(6) = 19 - 5 = 14. Note 14 = 2 + 3 + 4 + 5 and is nonprime, so b(7) = 2 + 3 + 4 + 5 + 6 and nonprime. All b(m) after this will be nonprime by the same pattern, thus the final prime for b(1) = 9 occurs at b(5), and a(9) = 5.
		

Crossrefs

Examples of sequences of the sum of consecutive positive integers, where the sum of at least three is guaranteed to be composite: A055999, A212427.

Programs

  • Mathematica
    T = {}; For[f = 0, f <= 63, f++, a = 0; t = f; q = 0; While[a == 0, q++; If[t < 0, t += q, If[PrimeQ[t], t -= q; If[t >= 0, If[q != 2 && q != 1 && ! PrimeQ[t], s = t; k = q + 1; z = (Sqrt[-8 s + 4 k^2 - 4 k + 1] + 1)/2; If[Element[z, Reals] && z > 0 && Mod[z, 1] == 0, AppendTo[T, q]; Break[]]]], t += q]]]]; Print[T]

A356754 Triangle read by rows: T(n,k) = ((n-1)*(n+2))/2 + 2*k.

Original entry on oeis.org

2, 4, 6, 7, 9, 11, 11, 13, 15, 17, 16, 18, 20, 22, 24, 22, 24, 26, 28, 30, 32, 29, 31, 33, 35, 37, 39, 41, 37, 39, 41, 43, 45, 47, 49, 51, 46, 48, 50, 52, 54, 56, 58, 60, 62, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87
Offset: 1

Views

Author

Torlach Rush, Aug 25 2022

Keywords

Comments

The first column of the triangle is the Lazy Caterer's sequence A000124.
Each subsequent column starts with A000124(n) + (2 * (n-1)).
The first downward diagonal is A046691(n).
Columns and downward diagonals of the triangle identify many sequences (possibly shifted) in the database. Examples can be found in crossrefs below.
The sum of the n-th upward diagonal of the triangle is A356288(n).

Examples

			Triangle T(n,k) begins:
  n\k   1   2   3   4   5   6   7   8   9  10  11  ...
   1:   2
   2:   4   6
   3:   7   9  11
   4:  11  13  15  17
   5:  16  18  20  22  24
   6:  22  24  26  28  30  32
   7:  29  31  33  35  37  39  41
   8:  37  39  41  43  45  47  49  51
   9:  46  48  50  52  54  56  58  60  62
  10:  56  58  60  62  64  66  68  70  72  74
  11:  67  69  71  73  75  77  79  81  83  85  87
  ...
		

Crossrefs

Programs

  • Mathematica
    Table[((n-1)(n+2))/2+2k,{n,20},{k,n}]//Flatten (* Harvey P. Dale, May 26 2023 *)
  • Python
    def T(n, k): return ((n-1) * (n+2))//2 + 2*k
    for n in range(1, 12):
        for k in range(1,(n+1)): print(T(n,k), end = ', ')
    
  • Python
    # Indexed as a linear sequence.
    def a000124(n): return n*(n+1)//2 + 1
    def a(n):
        l = m = 0
        for k in range(1,n):
            lc = a000124(k - 1)
            if n >= lc:
                l = lc
                m = k
            else: break
        return n + m + (n - l)

Formula

T(n,k) = ((n-1) * (n+2))/2 + 2*k.
T(n,k+1) = T(n,k) + 2, k < n.
Previous Showing 21-30 of 30 results.