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 31-40 of 59 results. Next

A213821 Rectangular array: (row n) = b**c, where b(h) = 3*h-1, c(h) = n-1+h, n>=1, h>=1, and ** = convolution.

Original entry on oeis.org

2, 9, 4, 24, 16, 6, 50, 39, 23, 8, 90, 76, 54, 30, 10, 147, 130, 102, 69, 37, 12, 224, 204, 170, 128, 84, 44, 14, 324, 301, 261, 210, 154, 99, 51, 16, 450, 424, 378, 318, 250, 180, 114, 58, 18, 605, 576, 524, 455, 375, 290, 206
Offset: 1

Views

Author

Clark Kimberling, Jul 04 2012

Keywords

Comments

Principal diagonal: A033431.
Antidiagonal sums: A176060.
Row 1, (2,5,8,11,…)**(1,2,3,4,…): A006002.
Row 2, (2,5,8,11,…)**(2,3,4,5,…): (k^3 + 5*k^2 + 2*k)/2.
Row 3, (1,2,3,4,…)**(8,11,14,17,…): (k^3 + 8*k^2 + 3*k)/2.
For a guide to related arrays, see A212500.

Examples

			Northwest corner (the array is read by falling antidiagonals):
2….9….24…50….90
4….16…39…76…130
6….23…54…102…170
8….30…69…128…210
10…37…84…154…250
12…44…99…180…290
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=3n-1;c[n_]:=n;
    t[n_,k_]:=Sum[b[k-i]c[n+i],{i,0,k-1}]
    TableForm[Table[t[n,k],{n,1,10},{k,1,10}]]
    Flatten[Table[t[n-k+1,k],{n,12},{k,n,1,-1}]]
    r[n_]:=Table[t[n,k],{k,1,60}] (* A213821 *)
    Table[t[n,n],{n,1,40}] (* A033431 *)
    s[n_]:=Sum[t[i,n+1-i],{i,1,n}]
    Table[s[n],{n,1,50}] (* A176060 *)

Formula

T(n,k) = 4*T(n,k-1)-6*T(n,k-2)+4*T(n,k-3)-T(n,k-4).
G.f. for row n: f(x)/g(x), where f(x) = x*(2*n - (n-2)*x - (n-1)*x^2) and g(x) = (1-x)^4.

A085788 Partial sums of n 3-spaced triangular numbers beginning with t(3), e.g., a(2) = t(3)+t(6) = 6+21 = 27.

Original entry on oeis.org

6, 27, 72, 150, 270, 441, 672, 972, 1350, 1815, 2376, 3042, 3822, 4725, 5760, 6936, 8262, 9747, 11400, 13230, 15246, 17457, 19872, 22500, 25350, 28431, 31752, 35322, 39150, 43245, 47616, 52272, 57222, 62475, 68040, 73926, 80142, 86697, 93600, 100860, 108486
Offset: 1

Views

Author

Jon Perry, Jul 23 2003

Keywords

Crossrefs

Row sums of triangle A001283.
Cf. A254407. - Bruno Berselli, Jan 30 2015

Programs

  • Maple
    a:=n->sum(sum(sum(j-k+1, j=1..n), k=0..n),m=0..n): seq(a(n), n=1..45); # Zerinvary Lajos, May 30 2007
  • Mathematica
    LinearRecurrence[{4,-6,4,-1},{6,27,72,150},50] (* Harvey P. Dale, Dec 14 2017 *)
  • PARI
    v=vector(40,i,i*(i+1)/2); s=0; forstep(i=3,40,3,s+=v[i]; print1(s","))

Formula

a(n) = (3/2)*n*(n+1)^2 = 3*A006002(n).
a(n) = Sum_{j=1..n} (j+n+1)*(n+1). - Zerinvary Lajos, Sep 10 2006
From Colin Barker, Mar 17 2014: (Start)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
G.f.: 3*x*(x+2)/(x-1)^4. (End)
E.g.f.: 3*exp(x)*x*(1 + x)*(4 + x)/2. - Elmo R. Oliveira, Aug 14 2025

Extensions

Edited and more terms from Michel Marcus, Mar 17 2014

A114364 a(n) = n*(n+1)^2.

Original entry on oeis.org

4, 18, 48, 100, 180, 294, 448, 648, 900, 1210, 1584, 2028, 2548, 3150, 3840, 4624, 5508, 6498, 7600, 8820, 10164, 11638, 13248, 15000, 16900, 18954, 21168, 23548, 26100, 28830, 31744, 34848, 38148, 41650, 45360, 49284, 53428, 57798, 62400
Offset: 1

Views

Author

Cino Hilliard, Feb 09 2006

Keywords

Comments

Former name was "Numbers k such that k*x^3 + x + 1 is not prime."
Theorem: y = k*x^3 + x + 1 is not prime for k = 4, 18, 48, ..., n*(n+1)^2. Proof: n*(n+1)^2*x^3 + x + 1 = ((n+1)*x + 1)*((n^2+n)*x^2 - n*x + 1). Thus (n+1)*x + 1 divides y. This could possibly be used as a pre-test for compositeness. This sequence is the same as beginning with the third term of A045991.

Crossrefs

Cf. A045991.
Equals twice A006002.

Programs

  • Maple
    seq(2*binomial(n,2)*n, n=2..40); # Zerinvary Lajos, Apr 25 2007
  • Mathematica
    CoefficientList[Series[(2 (2 + x))/(-1 + x)^4, {x, 0, 38}], x] (* or *)
    Array[# (# + 1)^2 &, 39] (* Michael De Vlieger, Feb 03 2019 *)
  • PARI
    g2(n) = for(x=1,n,y=x*(x+1)^2;print1(y","))

Formula

a(n) = n*(n+1)^2.
G.f.: 2 * (2 + x)/(-1 + x)^4. - Michael De Vlieger, Feb 03 2019
From Amiram Eldar, Jan 02 2021: (Start)
Sum_{n>=1} 1/a(n) = 2 - Pi^2/6.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 +2*log(2) - 2. (End)
E.g.f.: exp(x)*x*(4 + 5*x + x^2). - Stefano Spezia, May 20 2021

Extensions

Name changed by Jon E. Schoenfield, Feb 03 2019

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.

A362007 Fourth Lie-Betti number of a path graph on n vertices.

Original entry on oeis.org

0, 0, 3, 16, 48, 107, 203, 347, 551, 828, 1192, 1658, 2242, 2961, 3833, 4877, 6113, 7562, 9246, 11188, 13412, 15943, 18807, 22031, 25643, 29672, 34148, 39102, 44566, 50573, 57157, 64353, 72197, 80726, 89978, 99992, 110808
Offset: 1

Views

Author

Samuel J. Bevins, Apr 05 2023

Keywords

Comments

Sequence T(n,4) in A360571.

Crossrefs

Cf. A360571 (path graph triangle), A088459 (second Lie-Betti number of path graphs), A361230.

Programs

  • Python
    def A362007(n):
        values = [0,0,3]
        for i in range(4, n+1):
            result = (i**4 + 18*i**3 - 97*i**2 + 174*i - 168)/24
            values.append(int(result))
        return values

Formula

a(1) = a(2) = 0, a(3) = 3, a(n) = (n^4 + 18*n^3 - 97*n^2 + 174*n - 168)/24 for n >= 4.
a(n) = A011379(n-3) + A006002(n-4) + A001105(n-3) + A056106(n-2) + A000027(n-3) + A000332(n-3) + A000217(n-5) + A000027(n-4) for n >= 5.
From Stefano Spezia, Mar 02 2025: (Start)
G.f.: x^2*(3 + x - 2*x^2 - 3*x^3 + 3*x^4 - x^5)/(1 - x)^5.
E.g.f.: (12*(6 + 4*x + x^2) - exp(x)*(72 - 24*x - 36*x^2 - 28*x^3 - x^4))/24. (End)

Extensions

a(34) and Python program corrected by Robert C. Lyons, Apr 17 2023

A008670 Molien series for Weyl group F_4.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 5, 6, 7, 9, 11, 12, 16, 18, 20, 24, 28, 30, 36, 40, 44, 50, 56, 60, 69, 75, 81, 90, 99, 105, 117, 126, 135, 147, 159, 168, 184, 196, 208, 224, 240, 252, 272, 288, 304, 324, 344, 360, 385, 405, 425, 450, 475, 495, 525, 550, 575, 605, 635, 660, 696, 726, 756
Offset: 0

Views

Author

Keywords

Comments

Number of partitions of n into parts 1, 3, 4 and 6. - Ilya Gutkovskiy, May 24 2017

References

  • Coxeter and Moser, Generators and Relations for Discrete Groups, Table 10.
  • L. Smith, Polynomial Invariants of Finite Groups, Peters, 1995, p. 199 (No. 28).

Crossrefs

Programs

  • Magma
    MolienSeries(CoxeterGroup("F4")); // Sergei Haller (sergei(AT)sergei-haller.de), Dec 21 2006
    
  • Magma
    R:=PowerSeriesRing(Integers(), 70); Coefficients(R!( 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^6)) )); // G. C. Greubel, Sep 08 2019
    
  • Maple
    a:= proc(n) local m, r; m := iquo (n, 12, 'r'); r:= r+1; ([4, 5, 6, 8, 10, 11, 14, 16, 18, 21, 24, 26][r]+ (6+r+4*m)*m)*m+ [1$3, 2, 3$2, 5, 6, 7, 9, 11, 12][r] end: seq(a(n), n=0..100); # Alois P. Heinz, Oct 06 2008
  • Mathematica
    Take[CoefficientList[Series[1/((1-x^2)(1-x^6)(1-x^8)(1-x^12)),{x,0,130}], x], {1,-1,2}] (* or *) LinearRecurrence[ {1,0,1,0,-1,1,-2,1,-1,0,1,0,1,-1},{1,1,1,2,3,3,5,6,7,9,11,12,16,18},70] (* Harvey P. Dale, Feb 07 2012 *)
  • PARI
    my(x='x+O('x^70)); Vec(1/((1-x)*(1-x^3)*(1-x^4)*(1-x^6))) \\ G. C. Greubel, Sep 08 2019
    
  • Sage
    def A008670_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P(1/((1-x)*(1-x^3)*(1-x^4)*(1-x^6))).list()
    A008670_list(70) # G. C. Greubel, Sep 08 2019

Formula

G.f.: 1/((1-x)*(1-x^3)*(1-x^4)*(1-x^6)). [Corrected by Ralf Stephan, Apr 29 2014]
a(n) = a(n-1) + a(n-3) - a(n-5) + a(n-6) - 2*a(n-7) + a(n-8) - a(n-9) + a(n-11) + a(n-13) - a(n-14), with a(0)=1, a(1)=1, a(2)=1, a(3)=2, a(4)=3, a(5)=3, a(6)=5, a(7)=6, a(8)=7, a(9)=9, a(10)=11, a(11)=12, a(12)=16, a(13)=18. - Harvey P. Dale, Feb 07 2012
a(n) ~ (1/432)*n^3. - Ralf Stephan, Apr 29 2014
a(n) = (120*floor(n/6)^3 + 60*(m+7)*floor(n/6)^2 + 2*(m^5-15*m^4+75*m^3-135*m^2+134*m+240)*floor(n/6) + 3*(m^5-15*m^4+75*m^3-135*m^2+84*m+70) + (m^5-15*m^4+75*m^3-135*m^2+44*m+30)*(-1)^floor(n/6))/240 where m = (n mod 6). - Luce ETIENNE, Aug 14 2018
a(n) = 1 + floor((2*n^3 + 42*n^2 + n*(279 + 9*(-1)^n - 48*[(n mod 3)=2]))/864) where [] is the Iverson bracket. - Hoang Xuan Thanh, Jun 22 2025

A086754 Pascal's square pyramid read by slices, each slice being read by rows. Each entry in slice n is the sum of the 4 entries above it in slice n-1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 1, 2, 4, 2, 1, 2, 1, 1, 3, 3, 1, 3, 9, 9, 3, 3, 9, 9, 3, 1, 3, 3, 1, 1, 4, 6, 4, 1, 4, 16, 24, 16, 4, 6, 24, 36, 24, 6, 4, 16, 24, 16, 4, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 5, 25, 50, 50, 25, 5, 10, 50, 100, 100, 50, 10, 10, 50, 100, 100, 50, 10, 5, 25, 50, 50, 25, 5, 1, 5, 10
Offset: 1

Views

Author

Jon Perry, Jul 31 2003

Keywords

Comments

Element (i,j) of slice n is the coefficient of x^i * y^j in the expansion of ((1+x)*(1+y))^n. - Eitan Y. Levine, Sep 03 2023

Examples

			The first 4 slices are
  1..1 1..1 2 1..1 3 3 1
  ...1 1..2 4 2..3 9 9 3
  ........1 2 1..3 9 9 3
  ...............1 3 3 1
		

Crossrefs

Consider the sequence s[i, j](n) obtained by considering the (i, j)-th entry of the n-th slice. Then if [i, j]= [3, 2] we get A006002, if [3, 3] we get A000537, if [4, 2] we get A004320, if [4, 3] we get A004282.
Cf. A046816.

Programs

  • Haskell
    a086754 n = a086754_list !! (n-1)
    a086754_list = concat $ concat $ iterate ([[1,1],[1,1]] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
  • Maple
    p:=n->seq(seq(binomial(n,i)*binomial(n,j),j=0..n),i=0..n): seq(p(n),n=0..5); # Emeric Deutsch, Nov 18 2004
  • Mathematica
    A[m_]:=Module[{pt=Table[ConstantArray[1,{i,i}],{i,m}]},For[i=3,i<=m,i++,For[j=2,j<=i-1,j++,pt[[i,j,1]]=pt[[i-1,j-1,1]]+pt[[i-1,j,1]];pt[[i,1,j]]=pt[[i,j,1]];pt[[i,i,j]]=pt[[i,j,1]];pt[[i,j,i]]=pt[[i,j,1]];];For[j=2,j<=i-1,j++,For[k=2,k<=i-1,k++,pt[[i,j,k]]=pt[[i-1,j,k]]+pt[[i-1,j,k-1]]+pt[[i-1,j-1,k]]+pt[[i-1,j-1,k-1]];];];];pt//Flatten]; A[6] (* Robert P. P. McKone, Sep 14 2023, made from the PARI code *)
  • PARI
    { pt=vector(10,i,matrix(i,i,j,k,1)); for (i=3,10, for (j=2,i-1, pt[i][j,1]=pt[i-1][j-1,1]+pt[i-1][j,1]; pt[i][1,j]=pt[i][j,1]; pt[i][i,j]=pt[i][j,1]; pt[i][j,i]=pt[i][j,1]; ); for(j=2,i-1, for (k=2,i-1, pt[i][j,k]=pt[i-1][j,k]+pt[i-1][j,k-1]+pt[i-1][j-1,k]+pt[i-1][j-1,k-1]))); pt }
    

Formula

From Eitan Y. Levine, Sep 03 2023: (Start)
C(n,i)*C(n,j) gives the (i,j) element in slice n, where C(n,k) are the binomial coefficients A007318.
G.f.: 1/(1-z(1+x)(1+y)) = Sum_{n>=0,i=0..n,j=0..n} T(n,i,j) * z^n * x^i * y^j
G.f. for slice n: ((1+x)*(1+y))^n = Sum_{i=0..n,j=0..n} T(n,i,j) * x^i * y^j (End)

Extensions

More terms from Emeric Deutsch, Nov 18 2004

A144945 Number of ways to place 2 queens on an n X n chessboard so that they attack each other.

Original entry on oeis.org

0, 6, 28, 76, 160, 290, 476, 728, 1056, 1470, 1980, 2596, 3328, 4186, 5180, 6320, 7616, 9078, 10716, 12540, 14560, 16786, 19228, 21896, 24800, 27950, 31356, 35028, 38976, 43210, 47740, 52576, 57728, 63206, 69020, 75180, 81696, 88578, 95836, 103480, 111520
Offset: 1

Views

Author

Paolo Bonzini, Sep 26 2008

Keywords

Comments

a(n) gives the number of edges on a graph with n X n nodes where each node corresponds to a square on an n X n chessboard and there is an edge between two nodes if two queens placed on the corresponding squares attack each other.
In other words, number of edges in the n X n queen graph. - Eric W. Weisstein, Jun 19 2017
Number of ways to place two queens on the same row or column = A006002: b(n) = n*C(n,2) = n^2*(n-1)/2; number of ways to place two queens on the same diagonal (either SW-NE or NE-SW) = A000330 shifted by one: c(n) = n(n-1)*(2*n-1)/6; total: a(n) = 2*b(n)+2*c(n) = n*(5*n-1)*(n-1)/3.
Starting with "6" = binomial transform of [6, 22, 26, 10, 0, 0, 0, ...]. - Gary W. Adamson, Aug 12 2009
Also the Harary index of the n X n king graph. - Eric W. Weisstein, Jun 20 2017

Examples

			Example: For n=2 there are two rows, two columns and two diagonals. Each of these can be filled with two queens, giving a(2)=6.
For n=3 there are C(3,2) = 3 ways to place two queens on the same rows or column, giving C(3,2)*3 = 9 ways to place two queens on the same rows and 9 ways to place two queens on the same column. There are three nontrivial SW-NE diagonals, two of length two (each giving 1 way to place two attacking queens) and one of length three (giving 3 ways to place two attacking queens): total 3+1+1=5. There are also 5 ways to place two queens on the same NW-SE diagonal, giving a total of 9+9+5+5 = 28.
		

Crossrefs

Programs

Formula

a(n) = (n-1)*n*(5*n-1)/3.
From Bruno Berselli, Sep 27 2011: (Start)
G.f.: 2*x^2*(3+2*x)/(1-x)^4.
a(-n) = -A174814(n).
a(n) = a(n-1) + 2*A005475(n-1).
Sum_{i=1..n} a(i) = (n-1)*n*(n+1)*(5*n+2)/12. (End)
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4; a(1)=0, a(2)=6, a(3)=28, a(4)=76. - Harvey P. Dale, Oct 15 2011
a(n) = Sum_{i=1..n-1} i*(5*i+1), with a(0)=0, a(1)=6. - Bruno Berselli, Feb 10 2014
E.g.f.: x^2*(9+5*x)*exp(x)/3. - Robert Israel, Nov 02 2014

Extensions

More terms from Harvey P. Dale, Oct 15 2011

A187163 Number of 2-step self-avoiding walks on an n X n X n cube summed over all starting positions.

Original entry on oeis.org

0, 24, 108, 288, 600, 1080, 1764, 2688, 3888, 5400, 7260, 9504, 12168, 15288, 18900, 23040, 27744, 33048, 38988, 45600, 52920, 60984, 69828, 79488, 90000, 101400, 113724, 127008, 141288, 156600, 172980, 190464, 209088, 228888, 249900, 272160
Offset: 1

Views

Author

R. H. Hardin, Mar 06 2011

Keywords

Comments

Row 2 of A187162.

Examples

			A solution for 2 X 2 X 2:
  0  0     0  0
  1  0     2  0
		

Crossrefs

Formula

a(n) = 6*n^3 - 6*n^2.
From Colin Barker, Apr 20 2018: (Start)
G.f.: 12*x^2*(2 + x) / (1 - x)^4.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4.
(End)
a(n) = 12 * A006002(n-1). - Alois P. Heinz, Feb 28 2022

A210646 Primes which are the sum of two numbers of the form k*(k+1)^2/2.

Original entry on oeis.org

2, 11, 59, 149, 197, 233, 607, 829, 929, 1283, 1619, 1879, 2459, 2917, 3251, 3299, 3359, 3947, 4523, 5821, 5843, 5869, 6043, 6143, 6269, 6833, 7229, 8573, 8597, 9479, 9619, 11699, 11783, 11789, 12379, 14639, 15881, 16477, 18869, 19121, 20849, 21149, 21617
Offset: 1

Views

Author

Gerasimov Sergey, Mar 26 2012

Keywords

Examples

			149 is in the sequence because 149 is prime and 149 = 2*(2+1)^2/2 + 6*(6+1)^2/2.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n (n + 1)^2/2; t = Table[f[n], {n, 0, 40}]; Select[Union[Flatten[Outer[Plus, t, t]]], # < t[[-1]] && PrimeQ[#] &] (* T. D. Noe, Apr 03 2012 *)

Extensions

Terms checked by R. J. Mathar, Mar 28 2012
Previous Showing 31-40 of 59 results. Next