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-6 of 6 results.

A019298 Number of balls in pyramid with base either a regular hexagon or a hexagon with alternate sides differing by 1 (balls in hexagonal pyramid of height n taken from hexagonal close-packing).

Original entry on oeis.org

0, 1, 4, 11, 23, 42, 69, 106, 154, 215, 290, 381, 489, 616, 763, 932, 1124, 1341, 1584, 1855, 2155, 2486, 2849, 3246, 3678, 4147, 4654, 5201, 5789, 6420, 7095, 7816, 8584, 9401, 10268, 11187, 12159, 13186
Offset: 0

Views

Author

Eric E Blom (eblom(AT)REM.re.uokhsc.edu)

Keywords

Comments

Alternately add and subtract successively longer sets of integers: 0; 1 = 0+1; -4 = 1-2-3; 11 = -4+4+5+6; -23 = 11-7-8-9-10; 42 = -23+11+12+13+14+15; -69 = 42-16-17-18-19-20-21; ... then take absolute values. - Walter Carlini, Aug 28 2003
Number of 3 X 3 symmetric matrices with nonnegative integer entries, such that every row (and column) sum equals n-1.
Equals Sum_{0..n} of "three-quarter squares" sequence (A077043). - Philipp M. Buluschek (kitschen(AT)romandie.com), Aug 12 2007
a(n) is the sum of the n-th row in A220075, n > 0. - Reinhard Zumkeller, Dec 03 2012
Sum of all the smallest parts in the partitions of 3n into three parts (see example). - Wesley Ivan Hurt, Jan 23 2014
For n > 0, a(n) is the number of (nonnegative integer) magic labelings of the prism graph Y_3 with magic sum n - 1. - L. Edson Jeffery, Sep 09 2017
Or number of magic labelings of LOOP X C_3 with magic sum n - 1, where LOOP is the 1-vertex, 1-loop-edge graph, as Y_k = I X C_k and LOOP X C_k have the same numbers of magic labelings when k is odd. - David J. Seal, Sep 13 2017
a(n) is the number of triples of integers in [1,n]^3 such that each pair has sum larger than n. - Bob Zwetsloot, Jul 23 2020

Examples

			Add last column for a(n) (n > 0).
                                               13 + 1 + 1
                                               12 + 2 + 1
                                               11 + 3 + 1
                                               10 + 4 + 1
                                                9 + 5 + 1
                                                8 + 6 + 1
                                                7 + 7 + 1
                                   10 + 1 + 1  11 + 2 + 2
                                    9 + 2 + 1  10 + 3 + 2
                                    8 + 3 + 1   9 + 4 + 2
                                    7 + 4 + 1   8 + 5 + 2
                                    6 + 5 + 1   7 + 6 + 2
                        7 + 1 + 1   8 + 2 + 2   9 + 3 + 3
                        6 + 2 + 1   7 + 3 + 2   8 + 4 + 3
                        5 + 3 + 1   6 + 4 + 2   7 + 5 + 3
                        4 + 4 + 1   5 + 5 + 2   6 + 6 + 3
            4 + 1 + 1   5 + 2 + 2   6 + 3 + 3   7 + 4 + 4
            3 + 2 + 1   4 + 3 + 2   5 + 4 + 3   6 + 5 + 4
1 + 1 + 1   2 + 2 + 2   3 + 3 + 3   4 + 4 + 4   5 + 5 + 5
   3(1)        3(2)        3(3)        3(4)        3(5)     ..   3n
---------------------------------------------------------------------
    1           4           11          23          42      ..  a(n)
		

References

  • R. P. Stanley, Enumerative Combinatorics, Wadsworth, Vol. 1, 1986; see Prop. 4.6.21, p. 235, G_3(lambda).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.14(a), p. 452.

Crossrefs

Cf. A053493, A077043 (first differences), A002717.
Cf. A061927, A244497, A292281, A244873, A289992 (# of magic labelings of prism graph Y_k = I X C_k, for k = 4,5,6,7,8, up to an offset).
Cf. A006325, A244879, A244880 (# of magic labelings of LOOP X C_k, for k = 4,6,8, up to an offset).

Programs

  • Magma
    [Floor((n^2+1)*(2*n+3)/8): n in [0..80]]; // Vincenzo Librandi, Jul 28 2013
    
  • Maple
    series(x*(x^2+x+1)/(x+1)/(x-1)^4,x,80);
  • Mathematica
    Table[ Ceiling[3*n^2/4], {n, 0, 37}] // Accumulate (* Jean-François Alcover, Dec 20 2012, after Philipp M. Buluschek's comment *)
    CoefficientList[Series[x (x^2 + x + 1) / ((x + 1) (x - 1)^4), {x, 0, 40}], x] (* Vincenzo Librandi, Jul 28 2013 *)
    LinearRecurrence[{3, -2, -2, 3, -1}, {0, 1, 4, 11, 23}, 38] (* L. Edson Jeffery, Sep 09 2017 *)
  • PARI
    a(n)=(n^2+1)*(2*n+3)\8 \\ Charles R Greathouse IV, Apr 04 2013
    
  • Python
    def A019298(n): return n*(n*(2*n+3)+2)+3>>3 # Chai Wah Wu, Jun 07 2025

Formula

a(n) = floor((n^2+1)(2n+3)/8).
G.f.: x*(x^2+x+1)/((x+1)*(x-1)^4).
a(n) = floor((2n^3 + 3n^2 + 2n)/8); also nearest integer to ((n+1)^4 - n^4)/16.
a(n) = (4n^3 + 6n^2 + 4n+1 - (-1)^n)/16. - Wesley Petty (Wesley.Petty(AT)mail.tamucc.edu), Mar 06 2004
a(n) = Sum_{i=1..n} i^2 - floor(i^2/4) = Sum_{i=1..n} i * (2n - 2i + 1 - floor((n - i + 1)/2) ). - Wesley Ivan Hurt, Jan 23 2014
E.g.f.: (1/16)*(-exp(-x) + exp(x)*(1 + 14*x + 18*x^2 + 4*x^3)). - Stefano Spezia, Nov 29 2019
a(2*n) = (1/2)*( n*(n + 1)^3 - (n - 1)*n^3 ); a(2*n-1) = (1/2)*( (n + 1)*n^3 - n*(n - 1)^3 ) (note: replacing the exponent 3 with 2 throughout gives the sequence of generalized pentagonal numbers A001318). - Peter Bala, Aug 11 2021
a(2n-1) = A213772(n). - R. J. Mathar, Mar 02 2025
(n-2)*a(n) -3*a(n-1) -(n+1)*a(n-2) +2*n-1 =0. - R. J. Mathar, Mar 09 2025

Extensions

Error in n=8 term corrected May 15 1997

A244497 Number of magic labelings of the prism graph I X C_5 with magic sum n.

Original entry on oeis.org

1, 11, 57, 197, 533, 1223, 2494, 4654, 8105, 13355, 21031, 31891, 46837, 66927, 93388, 127628, 171249, 226059, 294085, 377585, 479061, 601271, 747242, 920282, 1123993, 1362283, 1639379, 1959839, 2328565, 2750815, 3232216, 3778776, 4396897, 5093387, 5875473, 6750813, 7727509, 8814119
Offset: 0

Views

Author

N. J. A. Sloane, Jul 07 2014

Keywords

Comments

This sequence is also the number of magic labelings of the cycle-of-loops graph LOOP X C_5 with magic sum n, where LOOP is the 1-vertex, 1-loop-edge graph. A similar identity holds between the sequences for I X C_k and LOOP X C_k for all odd k. - David J. Seal, Sep 14 2017

Crossrefs

Cf. A019298, A061927, A292281, A244873, A289992 (analogs for prism graphs I X C_k, k = 3,4,6,7,8).
Cf. A006325, A244879, A244880 (analogs for LOOP X C_k, k = 4,6,8).

Programs

  • Maple
    A244497:=n->(3*(63+(-1)^n) + 576*n + 720*n^2 + 460*n^3 + 150*n^4 + 20*n^5) / 192: seq(A244497(n), n=0..50); # Wesley Ivan Hurt, Sep 16 2017
  • Mathematica
    CoefficientList[Series[(1 + 6 x + 11 x^2 + 6 x^3 + x^4)/((1 - x)^6*(1 + x)), {x, 0, 37}], x] (* Michael De Vlieger, Sep 15 2017 *)
    LinearRecurrence[{5,-9,5,5,-9,5,-1},{1,11,57,197,533,1223,2494},40] (* Harvey P. Dale, Aug 04 2021 *)
  • PARI
    Vec((1+6*x+11*x^2+6*x^3+x^4) / ((1-x)^6*(1+x)) + O(x^40)) \\ Colin Barker, Jan 13 2017

Formula

G.f.: (1 + 6*x + 11*x^2 + 6*x^3 + x^4) / ((1 - x)^6*(1 + x)).
From Colin Barker, Jan 13 2017: (Start)
a(n) = (3*(63+(-1)^n) + 576*n + 720*n^2 + 460*n^3 + 150*n^4 + 20*n^5) / 192.
a(n) = 5*a(n-1) - 9*a(n-2) + 5*a(n-3) + 5*a(n-4) - 9*a(n-5) + 5*a(n-6) - a(n-7) for n>6.
(End)

A244873 Number of magic labelings of the prism graph I X C_7 with magic sum n.

Original entry on oeis.org

1, 29, 289, 1640, 6604, 21122, 57271, 137155, 298184, 599954, 1132942, 2029229, 3475465, 5728289, 9132418, 14141618, 21342771, 31483251, 45501823, 64563278, 90097018, 123839804, 167882881, 224723693, 297322402, 389163424, 504322196, 647537387, 824288767, 1040880947, 1304533204
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2014

Keywords

Comments

The graph is the 5th one shown in the link. This sequence is also the number of magic labelings of the cycle-of-loops graph LOOP X C_7 with magic sum n, where LOOP is the 1-vertex, 1-loop-edge graph. A similar identity holds between the sequences for I X C_k and LOOP X C_k for all odd k. - David J. Seal, Sep 14 2017

Crossrefs

Cf. A019298, A061927, A244497, A292281, A289992 (analogs for prism graphs I X C_k, k = 3,4,5,6,8).
Cf. A006325, A244879, A244880 (analogs for LOOP X C_k, k = 4,6,8).

Programs

  • Mathematica
    Table[61 n^7/1440 + 427 n^6/960 + 1463 n^5/720 + 2009 n^4/384 + 11809 n^3/1440 + 1253 n^2/160 + 169 n/40 + (-1)^n/256 + 255/256, {n, 0, 30}] (* Bruno Berselli, Jul 08 2014 *)
    LinearRecurrence[{7,-20,28,-14,-14,28,-20,7,-1},{1,29,289,1640,6604,21122,57271,137155,298184},40] (* Harvey P. Dale, Aug 09 2017 *)

Formula

G.f.: (1+22*x+106*x^2+169*x^3+106*x^4+22*x^5+x^6)/((1-x)^8*(1+x)).
a(n) = 61*n^7/1440 + 427*n^6/960 + 1463*n^5/720 + 2009*n^4/384 + 11809*n^3/1440 + 1253*n^2/160 + 169*n/40 + (-1)^n/256 + 255/256. [Bruno Berselli, Jul 08 2014]

Extensions

Name made more self-contained by David J. Seal, Sep 14 2017

A244879 Number of magic labelings of the cycle-of-loops graph LOOP X C_6 having magic sum n, where LOOP is the 1-vertex, 1-loop-edge graph.

Original entry on oeis.org

1, 18, 129, 571, 1884, 5103, 11998, 25362, 49347, 89848, 154935, 255333, 404950, 621453, 926892, 1348372, 1918773, 2677518, 3671389, 4955391, 6593664, 8660443, 11241066, 14433030, 18347095, 23108436, 28857843, 35752969, 43969626, 53703129, 65169688, 78607848
Offset: 0

Views

Author

N. J. A. Sloane, Jul 08 2014

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1 + 11 x + 24 x^2 + 11 x^3 + x^4)/(1 - x)^7, {x, 0, 31}], x] (* Michael De Vlieger, Sep 15 2017 *)
    LinearRecurrence[{7,-21,35,-35,21,-7,1},{1,18,129,571,1884,5103,11998},40] (* Harvey P. Dale, Jul 30 2019 *)
  • PARI
    Vec((1 + 11*x + 24*x^2 + 11*x^3 + x^4) / (1 - x)^7 + O(x^40)) \\ Colin Barker, Jan 11 2017

Formula

G.f.: (1 + 11*x + 24*x^2 + 11*x^3 + x^4) / (1 - x)^7.
From Colin Barker, Jan 11 2017: (Start)
a(n) = (120 + 438*n + 677*n^2 + 570*n^3 + 275*n^4 + 72*n^5 + 8*n^6) / 120.
a(n) = 7*a(n-1) - 21*a(n-2) + 35*a(n-3) - 35*a(n-4) + 21*a(n-5) - 7*a(n-6) + a(n-7) for n > 6.
(End)

Extensions

Name corrected by David J. Seal, Sep 13 2017

A061927 a(n) = n*(n+1)*(2*n+1)*(n^2+n+3)/30.

Original entry on oeis.org

0, 1, 9, 42, 138, 363, 819, 1652, 3060, 5301, 8701, 13662, 20670, 30303, 43239, 60264, 82280, 110313, 145521, 189202, 242802, 307923, 386331, 479964, 590940, 721565, 874341, 1051974, 1257382, 1493703, 1764303, 2072784, 2422992, 2819025
Offset: 0

Views

Author

Henry Bottomley, May 17 2001

Keywords

Comments

Also number of magic labelings of the cubical graph of magic sum n-1 [Ahmed]. - R. J. Mathar, Jan 25 2007
If Y_i (i=1,2,3) are 2-blocks of a (n+3)-set X then a(n-4) is the number of 8-subsets of X intersecting each Y_i (i=1,2,3). - Milan Janjic, Oct 28 2007
The cube graph is also the prism graph I X C_4, so this is related to the number of magic labelings of other prism & related graphs. - David J. Seal, Sep 13 2017

Crossrefs

Cf. A006325, A019298, A244497, A244873, A289992, A292281, partial sums of A014820, A006975 (binomial transform shifted left).

Programs

  • Mathematica
    Table[n (n + 1) (2 n + 1) (n^2 + n + 3)/30, {n, 0, 33}] (* or *)
    CoefficientList[Series[x (1 + x)^3/(-1 + x)^6, {x, 0, 33}], x] (* Michael De Vlieger, Sep 15 2017 *)
    LinearRecurrence[{6,-15,20,-15,6,-1},{0,1,9,42,138,363},40] (* Harvey P. Dale, Apr 18 2018 *)
  • PARI
    a(n) = { n*(n + 1)*(2*n + 1)*(n^2 + n + 3)/30 } \\ Harry J. Smith, Jul 29 2009

Formula

a(n) = a(n-1) + A014820(n) = A061926(9, n).
G.f.: x*(1+x)^3/(-1+x)^6 = 20/(-1+x)^5 + 1/(-1+x)^2 + 7/(-1+x)^3 + 18/(-1+x)^4 + 8/(-1+x)^6. - R. J. Mathar, Nov 18 2007

A289992 Number of magic labelings of the prism graph I X C_8 having magic sum n.

Original entry on oeis.org

1, 49, 746, 6122, 34067, 144963, 506772, 1524628, 4074949, 9898229, 22220990, 46695870, 92769495, 175610631, 318756136, 557659432, 944355593, 1553488697, 2489980818, 3898657938, 5976186139, 8985711691, 13274641084, 19296041660, 27634190285
Offset: 0

Views

Author

David J. Seal, Sep 13 2017

Keywords

Crossrefs

Formula

a(n) = A244880(n) + 2*Sum_{i=0..n-1} A244880(i).
From Colin Barker, Sep 13 2017: (Start)
G.f.: (1 + x)*(1 + 6*x + x^2)*(1 + 32*x + 70*x^2 + 32*x^3 + x^4) / (1 - x)^10.
a(n) = 10*a(n-1) - 45*a(n-2) + 120*a(n-3) - 210*a(n-4) + 252*a(n-5) - 210*a(n-6) + 120*a(n-7) - 45*a(n-8) + 10*a(n-9) - a(n-10) for n>9. (End)
[Proof of the g.f. follows from the convolution formula and insertion of the g.f. A244880(x): Sum_{n>=0} a(n)x^n = Sum_{n>=0} A244880(n)*x^n +2*Sum_{n>=0} Sum_{i=0..n-1} A244880(i)*x^n = A244880(x) +2*Sum_{i>=0} Sum_{n>=i+1} A244880(i)*x^n = A244880(x) +2*Sum_{i>=0} A244880(i)*x^(i+1) Sum_{n>=0} x^n = A244880(x)+2*A244880(x)*x/(1+x) = A244880(x)*(1+2*x/(1-x)). R. J. Mathar, Mar 09 2025]
Showing 1-6 of 6 results.