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

A227327 Number of non-equivalent ways to choose two points in an equilateral triangle grid of side n.

Original entry on oeis.org

0, 1, 4, 10, 22, 41, 72, 116, 180, 265, 380, 526, 714, 945, 1232, 1576, 1992, 2481, 3060, 3730, 4510, 5401, 6424, 7580, 8892, 10361, 12012, 13846, 15890, 18145, 20640, 23376, 26384, 29665, 33252, 37146, 41382, 45961, 50920, 56260, 62020, 68201, 74844
Offset: 1

Views

Author

Heinrich Ludwig, Jul 07 2013

Keywords

Comments

The sequence is an alternating composition of A178073 and A071244: a(n) = 2*A071244((n+1)/2) if n is odd, otherwise a(n) = A178073(n/2).

Examples

			for n = 3 there are the following 4 choices of 2 points (X) (rotations and reflections being ignored):
     X         X         X         .
    X .       . .       . .       X X
   . . .     X . .     . X .     . . .
		

Crossrefs

Corresponding questions about the number of ways in a square grid are treated by A083374 (2 points) and A178208 (3 points).

Programs

  • Mathematica
    Table[b = n^4 + 2*n^3 + 8*n^2; If[EvenQ[n], c = b - 8*n, c = b - 2*n - 9]; c/48, {n, 43}] (* T. D. Noe, Jul 09 2013 *)
    CoefficientList[Series[-x (x^3 - x^2 + x + 1) / ((x - 1)^5  (x + 1)^2), {x, 0, 50}], x] (* Vincenzo Librandi, Aug 02 2013 *)
    LinearRecurrence[{3,-1,-5,5,1,-3,1},{0,1,4,10,22,41,72},50] (* Harvey P. Dale, May 11 2019 *)

Formula

a(n) = (n^4 + 2*n^3 + 8*n^2 - 8*n )/48; if n even.
a(n) = (n^4 + 2*n^3 + 8*n^2 - 2*n - 9)/48; if n odd.
G.f.: -x^2*(x^3-x^2+x+1) / ((x-1)^5*(x+1)^2). - Colin Barker, Jul 12 2013

A071245 a(n) = n*(n-1)*(2*n^2 + 1)/6.

Original entry on oeis.org

0, 0, 3, 19, 66, 170, 365, 693, 1204, 1956, 3015, 4455, 6358, 8814, 11921, 15785, 20520, 26248, 33099, 41211, 50730, 61810, 74613, 89309, 106076, 125100, 146575, 170703, 197694, 227766, 261145, 298065, 338768, 383504, 432531, 486115, 544530, 608058
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

Comments

The first differences are given in A277228. - J. M. Bergot, Sep 14 2016

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Cf. A071238, A071244, A277228 (first differences).

Programs

  • Magma
    [n*(n-1)*(2*n^2+1)/6: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    Table[n (n - 1) (2 n^2 + 1)/6, {n, 0, 37}] (* or *)
    CoefficientList[Series[(-3 x^2 - 4 x^3 - x^4)/(-1 + x)^5, {x, 0, 37}], x] (* Michael De Vlieger, Sep 14 2016 *)
  • PARI
    a(n)=n*(n-1)*(2*n^2+1)/6; \\ Joerg Arndt, Sep 04 2013
    
  • SageMath
    def A071245(n): return binomial(n,2)*(2*n^2+1)//3
    [A071245(n) for n in range(41)] # G. C. Greubel, Aug 07 2024

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 4; a(0)=0, a(1)=0, a(2)=3, a(3)=19, a(4)=66. - Yosu Yurramendi, Sep 03 2013
G.f.: x^2*(3 + 4*x + x^2)/(1-x)^5. - Michael De Vlieger, Sep 14 2016
E.g.f.: (1/6)*x^2*(9 + 10*x + 2*x^2)*exp(x). - G. C. Greubel, Sep 23 2016

A071246 a(n) = n*(n - 1)*(2*n^2 + n + 2)/6.

Original entry on oeis.org

0, 0, 4, 23, 76, 190, 400, 749, 1288, 2076, 3180, 4675, 6644, 9178, 12376, 16345, 21200, 27064, 34068, 42351, 52060, 63350, 76384, 91333, 108376, 127700, 149500, 173979, 201348, 231826, 265640, 303025, 344224, 389488, 439076, 493255, 552300, 616494
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Programs

  • Magma
    [n*(n-1)*(2*n^2+n+2)/6: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    CoefficientList[Series[-(4x^2 + 3x^3 + x^4)/(x - 1)^5, {x, 0, 50}], x] (* or *) Table[n*(n - 1)*(2*n^2 + n + 2)/6, {n, 0, 50}] (* Indranil Ghosh, Apr 05 2017 *)
  • PARI
    a(n) = n*(n - 1)*(2*n^2 + n + 2)/6; \\ Indranil Ghosh, Apr 05 2017
    
  • Python
    def a(n): return n*(n - 1)*(2*n**2 + n + 2)/6 # Indranil Ghosh, Apr 05 2017
    
  • SageMath
    def A071246(n): return binomial(n,2)*(2+n+2*n^2)//3
    [A071246(n) for n in range(41)] # G. C. Greubel, Aug 07 2024

Formula

a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5), n > 4, a(0)=0, a(1)=0, a(2)=4, a(3)=23, a(4)=76. - Yosu Yurramendi, Sep 03 2013
From Indranil Ghosh, Apr 05 2017: (Start)
G.f.: x^2*(4 + 3*x + x^2)/(1 - x)^5.
E.g.f.: exp(x)*x^2*(4+x)*(3+2*x)/6. (End)

A071252 a(n) = n*(n - 1)*(n^2 + 1)/2.

Original entry on oeis.org

0, 0, 5, 30, 102, 260, 555, 1050, 1820, 2952, 4545, 6710, 9570, 13260, 17927, 23730, 30840, 39440, 49725, 61902, 76190, 92820, 112035, 134090, 159252, 187800, 220025, 256230, 296730, 341852, 391935, 447330, 508400, 575520, 649077, 729470, 817110, 912420
Offset: 0

Views

Author

N. J. A. Sloane, Jun 12 2002

Keywords

References

  • T. A. Gulliver, Sequences from Arrays of Integers, Int. Math. Journal, Vol. 1, No. 4, pp. 323-332, 2002.

Crossrefs

Programs

  • Magma
    [n*(n-1)*(n^2+1)/2: n in [0..40]]; // Vincenzo Librandi, Jun 14 2011
    
  • Mathematica
    f[n_] := n (n - 1) (n^2 + 1)/2 (* Or *) f[n_] := Floor[n^5/(n + 1)]/2; Array[f, 38, 0] (* Robert G. Wilson v, Apr 01 2012 *)
  • PARI
    a(n)=n*(n-1)*(n^2+1)/2; \\ Joerg Arndt, Sep 04 2013
    
  • Python
    def a(n): return  n*(n - 1)*(n**2 + 1)/2 # Indranil Ghosh, Apr 05 2017
    
  • SageMath
    def A071252(n): return binomial(n,2)*(1+n^2)
    [A071252(n) for n in range(41)] # G. C. Greubel, Aug 07 2024

Formula

a(n) = floor(n^5/(n+1))/2. - Gary Detlefs, Mar 31 2011
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) n>4, a(0)=0, a(1)=0, a(2)=5, a(3)=30, a(4)=102. - Yosu Yurramendi, Sep 03 2013
G.f.: x^2*(5+5*x+2*x^2)/(1-x)^5. - Joerg Arndt, Sep 04 2013
From Indranil Ghosh, Apr 05 2017: (Start)
a(n) = A002378(n) * A002522(n) / 2.
E.g.f.: exp(x)*x^2*(5 + 5*x + x^2)/2.
(End)
Showing 1-4 of 4 results.