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 15 results. Next

A002817 Doubly triangular numbers: a(n) = n*(n+1)*(n^2+n+2)/8.

Original entry on oeis.org

0, 1, 6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796, 32131, 38226, 45150, 52975, 61776, 71631, 82621, 94830, 108345, 123256, 139656, 157641, 177310, 198765, 222111, 247456, 274911, 304590
Offset: 0

Views

Author

Keywords

Comments

Number of inequivalent ways to color vertices of a square using <= n colors, allowing rotations and reflections. Group is dihedral group D_8 of order 8 with cycle index (1/8)*(x1^4 + 2*x4 + 3*x2^2 + 2*x1^2*x2); setting all x_i = n gives the formula a(n) = (1/8)*(n^4 + 2*n + 3*n^2 + 2*n^3).
Number of semi-magic 3 X 3 squares with a line sum of n-1. That is, 3 X 3 matrices of nonnegative integers such that row sums and column sums are all equal to n-1. - [Gupta, 1968, page 653; Bell, 1970, page 279]. - Peter Bertok (peter(AT)bertok.com), Jan 12 2002. See A005045 for another version.
Also the coefficient h_2 of x^{n-3} in the shelling polynomial h(x)=h_0*x^n-1 + h_1*x^n-2 + h_2*x^n-3 + ... + h_n-1 for the independence complex of the cycle matroid of the complete graph K_n on n vertices (n>=2) - Woong Kook (andrewk(AT)math.uri.edu), Nov 01 2006
If X is an n-set and Y a fixed 3-subset of X then a(n-4) is equal to the number of 5-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Starting with offset 1 = binomial transform of [1, 5, 10, 9, 3, 0, 0, 0, ...]. - Gary W. Adamson, Aug 05 2009
Starting with "1" = row sums of triangle A178238. - Gary W. Adamson, May 23 2010
The equation n*(n+1)*(n^2 + n + 2)/8 may be arrived at by solving for x in the following equality: (n^2+n)/2 = (sqrt(8x+1)-1)/2. - William A. Tedeschi, Aug 18 2010
Partial sums of A006003. - Jeremy Gardiner, Jun 23 2013
Doubly triangular numbers are revealed in the sums of row sums of Floyd's triangle.
1, 1+5, 1+5+15, ...
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
- Tony Foster III, Nov 14 2015
From Jaroslav Krizek, Mar 04 2017: (Start)
For n>=1; a(n) = sum of the different sums of elements of all the nonempty subsets of the sets of numbers from 1 to n.
Example: for n = 6; nonempty subsets of the set of numbers from 1 to 3: {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}; sums of elements of these subsets: 1, 2, 3, 3, 4, 5, 6; different sums of elements of these subsets: 1, 2, 3, 4, 5, 6; a(3) = (1+2+3+4+5+6) = 21, ... (End)
a(n) is also the number of 4-cycles in the (n+4)-path complement graph. - Eric W. Weisstein, Apr 11 2018

Examples

			G.f. = x + 6*x^2 + 21*x^3 + 55*x^4 + 120*x^5 + 231*x^6 + 406*x^7 + 666*x^8 + ...
		

References

  • A. Björner, The homology and shellability of matroids and geometric lattices, in Matroid Applications (ed. N. White), Encyclopedia of Mathematics and Its Applications, 40, Cambridge Univ. Press 1992.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 124, #25, Q(3,r).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Cf. A006003 (first differences), A165211 (mod 2).
Multiple triangular: A000217, A064322, A066370.
Cf. A006528 (square colorings).
Cf. A236770 (see crossrefs).
Row n=3 of A257493 and row n=2 of A331436 and A343097.
Cf. A000332.
Cf. A000292 (3-cycle count of \bar P_{n+4}), A060446 (5-cycle count of \bar P_{n+3}), A302695 (6-cycle count of \bar P_{n+5}).

Programs

  • Maple
    A002817 := n->n*(n+1)*(n^2+n+2)/8;
  • Mathematica
    a[ n_] := n (n + 1) (n^2 + n + 2) / 8; (* Michael Somos, Jul 24 2002 *)
    LinearRecurrence[{5,-10,10,-5,1}, {0,1,6,21,55},40] (* Harvey P. Dale, Jul 18 2011 *)
    nn=50;Join[{0},With[{c=(n(n+1))/2},Flatten[Table[Take[Accumulate[Range[ (nn(nn+1))/2]], {c,c}],{n,nn}]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    {a(n) = n * (n+1) * (n^2 + n + 2) / 8}; /* Michael Somos, Jul 24 2002 */
    
  • PARI
    concat(0, Vec(x*(1+x+x^2)/(1-x)^5 + O(x^50))) \\ Altug Alkan, Nov 15 2015
    
  • Python
    def A002817(n): return (m:=n*(n+1))*(m+2)>>3 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = 3*binomial(n+2, 4) + binomial(n+1, 2).
G.f.: x*(1 + x + x^2)/(1-x)^5. - Simon Plouffe (in his 1992 dissertation); edited by N. J. A. Sloane, May 13 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 3. - Warut Roonguthai, Dec 13 1999
a(n) = 5a(n-1) - 10a(n-2) + 10a(n-3) - 5a(n-4) + a(n-5) = A000217(A000217(n)). - Ant King, Nov 18 2010
a(n) = Sum(Sum(1 + Sum(3*n))). - Xavier Acloque, Jan 21 2003
a(n) = A000332(n+1) + A000332(n+2) + A000332(n+3), with A000332(n) = binomial(n, 4). - Mitch Harris, Oct 17 2006 and Bruce J. Nicholson, Oct 22 2017
a(n) = Sum_{i=1..C(n,2)} i = C(C(n,2) + 1, 2) = A000217(A000217(n+1)). - Enrique Pérez Herrero, Jun 11 2012
Euler transform of length 3 sequence [6, 0, -1]. - Michael Somos, Nov 19 2015
E.g.f.: x*(8 + 16*x + 8*x^2 + x^3)*exp(x)/8. - Ilya Gutkovskiy, Apr 26 2016
Sum_{n>=1} 1/a(n) = 6 - 4*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = 1.25269064911978447... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A000217(n)*A000124(n)/2.
a(n) = ((n-1)^4 + 3*(n-1)^3 + 2*(n-1)^2 + 2*n))/8. - Bruce J. Nicholson, Apr 05 2017
a(n) = (A016754(n)+ A007204(n)- 2) / 32. - Bruce J. Nicholson, Apr 14 2017
a(n) = a(-1-n) for all n in Z. - Michael Somos, Apr 17 2017
a(n) = T(T(n)) where T are the triangular numbers A000217. - Albert Renshaw, Jan 05 2020
a(n) = 2*n^2 - n + 6*binomial(n, 3) + 3*binomial(n, 4). - Ryan Jean, Mar 20 2021
a(n) = (A008514(n) - 1)/16. - Charlie Marion, Dec 20 2024

Extensions

More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 29 1999

A054247 Number of n X n binary matrices under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 2, 6, 102, 8548, 4211744, 8590557312, 70368882591744, 2305843028004192256, 302231454921524358152192, 158456325028538104598816096256, 332306998946229005407670289177772032, 2787593149816327892769293535238052808491008
Offset: 0

Views

Author

Vladeta Jovovic, May 04 2000

Keywords

Comments

Arises in the enumeration of "water patterns" in magic squares. [Knecht]

Examples

			There are 6 nonisomorphic 2 X 2 matrices under action of D_4:
[0 0] [0 0] [0 0] [0 1] [0 1] [1 1]
[0 0] [0 1] [1 1] [1 0] [1 1] [1 1].
		

Crossrefs

Column k=2 of A343097.

Programs

  • Mathematica
    f[n_]:=With[{n2=n^2},If[EvenQ[n],(2^n2+2(2^(n2/4))+3(2^(n2/2))+ 2(2^((n2+n)/2)))/8,(2^n2+2(2^((n2+3)/4))+2^((n2+1)/2)+ 4(2^((n2+n)/2)))/8]]; Array[f,15,0] (* Harvey P. Dale, Apr 14 2012 *)
  • PARI
    a(n)=(2^n^2+2^((n^2+7)\4)+if(n%2,2^((n^2+1)/2)+2^((n^2+n+4)/2),3*2^(n^2/2)+2^((n^2+n+2)/2)))/8 \\ Charles R Greathouse IV, May 27 2014
    
  • Python
    def a(n):
        return 2**(n**2-3)+2**((n**2-8)/4)+2**((n**2-6)/2)+2**((n**2-4)/2)+2**((n**2+n-4)/2) if n % 2 == 0 else 2**(n**2-3)+2**((n**2-5)/4)+2**((n**2-5)/2)+2**((n**2+n-2)//2) # Peter E. Francis, Apr 12 2020

Formula

a(n) = (1/8)*(2^(n^2)+2*2^(n^2/4)+3*2^(n^2/2)+2*2^((n^2+n)/2)) if n is even and a(n) = (1/8)*(2^(n^2)+2*2^((n^2+3)/4)+2^((n^2+1)/2)+4*2^((n^2+n)/2)) if n is odd.

Extensions

More terms from Harvey P. Dale, Apr 14 2012

A343095 Array read by antidiagonals: T(n,k) is the number of k-colorings of an n X n grid, up to rotational symmetry.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 3, 6, 1, 0, 1, 4, 24, 140, 1, 0, 1, 5, 70, 4995, 16456, 1, 0, 1, 6, 165, 65824, 10763361, 8390720, 1, 0, 1, 7, 336, 489125, 1073758336, 211822552035, 17179934976, 1, 0, 1, 8, 616, 2521476, 38147070625, 281474993496064, 37523658921114744, 140737496748032, 1, 0
Offset: 0

Views

Author

Andrew Howroyd, Apr 14 2021

Keywords

Examples

			Array begins:
====================================================================
n\k | 0 1       2            3               4                 5
----+---------------------------------------------------------------
  0 | 1 1       1            1               1                 1 ...
  1 | 0 1       2            3               4                 5 ...
  2 | 0 1       6           24              70               165 ...
  3 | 0 1     140         4995           65824            489125 ...
  4 | 0 1   16456     10763361      1073758336       38147070625 ...
  5 | 0 1 8390720 211822552035 281474993496064 74505806274453125 ...
  ...
		

Crossrefs

Programs

  • Mathematica
    {{1}}~Join~Table[Function[n, (k^(n^2) + 2*k^((n^2 + 3 #)/4) + k^((n^2 + #)/2))/4 &[Mod[n, 2] ] ][m - k + 1], {m, 0, 8}, {k, m + 1, 0, -1}] // Flatten (* Michael De Vlieger, Nov 30 2023 *)
  • PARI
    T(n,k) = (k^(n^2) + 2*k^((n^2 + 3*(n%2))/4) + k^((n^2 + (n%2))/2))/4

Formula

T(n,k) = (k^(n^2) + 2*k^((n^2 + 3*(n mod 2))/4) + k^((n^2 + (n mod 2))/2))/4.

A054739 Number of inequivalent n X n matrices over GF(3) under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 3, 21, 2862, 5398083, 105918450471, 18761832172500795, 29912416165371498901002, 429210477536602279123636967061, 55428311030379722725246681652572022523, 64422190091501416379601522735200323789074174081, 673878862467911703904942451533575765568815772023224550102
Offset: 0

Views

Author

Vladeta Jovovic, May 15 2000

Keywords

Crossrefs

Column k=3 of A343097.
Cf. A054247.

Programs

  • Mathematica
    Join[{1, 3}, Table[CycleIndexPolynomial[
        GraphData[{"Grid", {n, n}}, "AutomorphismGroup"],
        Table[Subscript[s, i], {i, 1, 4}]] /.
    Table[Subscript[s, i] -> 3, {i, 1, 4}], {n, 2, 10}]]
    (* Geoffrey Critzer, Aug 09 2016 *)

Formula

a(n) = (1/8)*(3^(n^2) + 2*3^(n^2/4) + 3*3^(n^2/2) + 2*3^((n^2+n)/2)) if n is even;
a(n) = (1/8)*(3^(n^2) + 2*3^((n^2+3)/4) + 3^((n^2+1)/2) + 4*3^((n^2+n)/2)) if n is odd. [corrected by Chris Hallstrom, Mar 22 2021]

Extensions

Terms a(10) and beyond from Andrew Howroyd, Apr 15 2021

A054751 Number of inequivalent n X n matrices over GF(4) under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 4, 55, 34960, 537157696, 140738033618944, 590295811483987148800, 39614081257168338331296071680, 42535295865117309120430975675097153536, 730750818665451459102461990840694008379514814464, 200867255532373784442745261867639247948787687313041365401600
Offset: 0

Views

Author

Vladeta Jovovic, May 15 2000

Keywords

Crossrefs

Column k=4 of A343097.
Cf. A054247.

Programs

  • Mathematica
    Table[If[EvenQ[n],(4^n^2+2*4^(n^2/4)+3*4^(n^2/2)+2*4^((n^2+n)/2))/8,(4^n^2+2*4^((n^2+3)/4)+4^((n^2+1)/2)+4*4^((n^2+n)/2))/8],{n,0,10}] (* Harvey P. Dale, Aug 16 2021 *)

Formula

a(n) = 1/8*(4^(n^2) + 2*4^(n^2/4) + 3*4^(n^2/2) + 2*4^((n^2+n)/2)) if n is even;
a(n) = 1/8*(4^(n^2) + 2*4^((n^2+3)/4) + 4^((n^2+1)/2) + 4*4^((n^2+n)/2)) if n is odd.

Extensions

Terms a(10) and beyond from Andrew Howroyd, Apr 15 2021

A054752 Number of inequivalent n X n matrices over GF(5) under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 5, 120, 252375, 19076074375, 37252918396015625, 1818989403666496277343750, 2220446049250331744551658935546875, 67762635780344027129112510010600128173828125, 51698788284564229679463057470911735435947895050048828125
Offset: 0

Views

Author

Vladeta Jovovic, May 15 2000

Keywords

Crossrefs

Column k=5 of A343097.
Cf. A054247.

Formula

a(n) = 1/8*(5^(n^2) + 2*5^(n^2/4) + 3*5^(n^2/2) + 2*5^((n^2+n)/2)) if n is even;
a(n) = 1/8*(5^(n^2) + 2*5^((n^2+3)/4) + 5^((n^2+1)/2) + 4*5^((n^2+n)/2)) if n is odd.

Extensions

Terms a(9) and beyond from Andrew Howroyd, Apr 15 2021

A283033 Number of inequivalent 5 X 5 matrices with entries in {1,2,3,...,n} up to rotations and reflections.

Original entry on oeis.org

0, 1, 4211744, 105918450471, 140738033618944, 37252918396015625, 3553786240466361696, 167633579843887699759, 4722366500530551259136, 89737248564744874067889, 1250000000501250002500000, 13543382431328404683826391, 119245270812803151147085824
Offset: 0

Views

Author

David Nacin, Feb 27 2017

Keywords

Comments

Cycle index of dihedral group D4 acting on the 25 entries is (2*s(4)^6*s(1) + s(2)^{12}*s(1) + 4*s(2)^10*s(1)^5 + s(1)^25)/8.

Examples

			For n=2 we get a(2)=4211744 inequivalent 5 X 5 binary matrices up to rotations and reflections.
		

Crossrefs

Row n=5 of A343097.
Cf. A217338 (4 X 4 version), A217331 (3 X 3 version), A002817 (2 X 2 version).

Programs

  • GAP
    List([0..20], n -> n^7*(n^18+4*n^8+n^6+2)/8); # G. C. Greubel, Dec 07 2018
  • Magma
    [n^7*(n^18+4*n^8+n^6+2)/8: n in [0..20]]; // G. C. Greubel, Dec 07 2018
    
  • Maple
    [n^7*(n^18+4*n^8+n^6+2)/8$n=0..16]; # Muniru A Asiru, Dec 07 2018
  • Mathematica
    Table[n^7 (n^18 + 4 n^8 + n^6 + 2)/8, {n, 0, 16}]
  • PARI
    a(n) = n^7*(n^18 + 4*n^8 + n^6 + 2)/8; \\ Indranil Ghosh, Feb 27 2017
    
  • Python
    def A283033(n): return n**7*(n**18 + 4*n**8 + n**6 + 2)/8 # Indranil Ghosh, Feb 27 2017
    
  • Sage
    [n^7*(n^18+4*n^8+n^6+2)/8 for n in range(20)] # G. C. Greubel, Dec 07 2018
    

Formula

a(n) = n^7*(n^18 + 4*n^8 + n^6 + 2)/8.
From Chai Wah Wu, Dec 07 2018: (Start)
a(n) = 26*a(n-1) - 325*a(n-2) + 2600*a(n-3) - 14950*a(n-4) + 65780*a(n-5) - 230230*a(n-6) + 657800*a(n-7) - 1562275*a(n-8) + 3124550*a(n-9) - 5311735*a(n-10) + 7726160*a(n-11) - 9657700*a(n-12) + 10400600*a(n-13) - 9657700*a(n-14) + 7726160*a(n-15) - 5311735*a(n-16) + 3124550*a(n-17) - 1562275*a(n-18) + 657800*a(n-19) - 230230*a(n-20) + 65780*a(n-21) - 14950*a(n-22) + 2600*a(n-23) - 325*a(n-24) + 26*a(n-25) - a(n-26) for n > 25.
G.f.: x*(x^24 + 4211718*x^23 + 105808945452*x^22 + 137985522720898*x^21 + 33628142067806706*x^20 + 2630674898090394666*x^19 + 86978000386844370748*x^18 + 1424113432167998385342*x^17 + 12744486540004851097263*x^16 + 66464282669989885009756*x^15 + 210673587611186802329496*x^14 + 416826570643036689533748*x^13 + 522455888740564118388412*x^12 + 416826570643036689533748*x^11 + 210673587611186802329496*x^10 + 66464282669989885009756*x^9 + 12744486540004851097263*x^8 + 1424113432167998385342*x^7 + 86978000386844370748*x^6 + 2630674898090394666*x^5 + 33628142067806706*x^4 + 137985522720898*x^3 + 105808945452*x^2 + 4211718*x + 1)/(x - 1)^26. (End)

A286392 Number of inequivalent n X n matrices over an alphabet of size 6 under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 6, 231, 1284066, 352654485156, 3553786240466361696, 1289303099816839265917858176, 16839193280515921004090301582258640896, 7917535832871659713272867459049024690729209839616
Offset: 0

Views

Author

María Merino, Imanol Unanue, Yosu Yurramendi, May 08 2017

Keywords

Comments

Computed using Burnside's orbit-counting lemma.

Crossrefs

Column k=6 of A343097.

Programs

  • Mathematica
    Table[1/8*(6^(n^2) + 2*6^((n^2 + 3 #)/4) + (3 - 2 #)*6^((n^2 + #)/2) + (2 + 2 #)*6^((n^2 + n)/2)) &@ Boole[OddQ@ n], {n, 10}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = (1/8)*(6^(n^2) + 2*6^(n^2/4) + 3*6^(n^2/2) + 2*6^((n^2 + n)/2)) if n is even;
a(n) = (1/8)*(6^(n^2) + 2*6^((n^2 + 3)/4) + 6^((n^2 + 1)/2) + 4*6^((n^2 + n)/2)) if n is odd.

A217331 Number of inequivalent ways to color a 3 X 3 checkerboard using at most n colors allowing rotations and reflections.

Original entry on oeis.org

0, 1, 102, 2862, 34960, 252375, 1284066, 5105212, 16912512, 48700845, 125512750, 295649706, 646497072, 1328022787, 2586463530, 4811211000, 8598455296, 14835732057, 24812155062, 40359796390, 64032402000
Offset: 0

Views

Author

Geoffrey Critzer, Sep 30 2012

Keywords

Comments

Cycle index of symmetry group is (s(1)^9 + s(1)*s(2)^4 + 2*s(1)*s(4)^2 + 4*s(1)^3*s(2)^3)/8.

Crossrefs

Row n=3 of A343097.
Cf. A002817 (2 x 2 checkerboard).

Programs

  • Mathematica
    Table[(n^9+n^5+2*n^3+4*n^6)/8, {n,0,20}]

Formula

a(n) = (n^9 + n^5 + 2*n^3 + 4*n^6)/8.
G.f.: x*(38*x^7+1753*x^6+11244*x^5+19535*x^4+10810*x^3+1887*x^2+92*x+1)/(x-1)^10. - Colin Barker, Oct 04 2012

A286393 Number of inequivalent n X n matrices over GF(7) under action of dihedral group of the square D_4.

Original entry on oeis.org

1, 7, 406, 5105212, 4154189102413, 167633579843887699759, 331466355732596931093508048522, 32115447190132359991237336502881651018804, 152470060954479462517322396167243320349298407119379801
Offset: 0

Views

Author

María Merino, Imanol Unanue, Yosu Yurramendi, May 08 2017

Keywords

Comments

Burnside's orbit-counting lemma

Crossrefs

Column k=7 of A343097.

Formula

a(n) = (1/8)*(7^(n^2) + 2*7^(n^2/4) + 3*7^(n^2/2) + 2*7^((n^2 + n)/2)) if n is even;
a(n) = (1/8)*(7^(n^2) + 2*7^((n^2 + 3)/4) + 7^((n^2 + 1)/2) + 4*7^((n^2 + n)/2)) if n is odd.
Showing 1-10 of 15 results. Next