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

A260810 a(n) = n^2*(3*n^2 - 1)/2.

Original entry on oeis.org

0, 1, 22, 117, 376, 925, 1926, 3577, 6112, 9801, 14950, 21901, 31032, 42757, 57526, 75825, 98176, 125137, 157302, 195301, 239800, 291501, 351142, 419497, 497376, 585625, 685126, 796797, 921592, 1060501, 1214550, 1384801, 1572352, 1778337, 2003926, 2250325, 2518776
Offset: 0

Views

Author

Bruno Berselli, Jul 31 2015

Keywords

Comments

Pentagonal numbers with square indices.
After 0, a(k) is a square if k is in A072256.

Crossrefs

Subsequence of A001318 and A245288 (see Formula field).
Cf. A000326, A193218 (first differences).
Cf. A000583 (squares with square indices), A002593 (hexagonal numbers with square indices).
Cf. A232713 (pentagonal numbers with pentagonal indices), A236770 (pentagonal numbers with triangular indices).

Programs

  • Magma
    [n^2*(3*n^2-1)/2: n in [0..40]];
    
  • Magma
    I:=[0,1,22,117,376]; [n le 5 select I[n] else 5*Self(n-1)-10*Self(n-2)+10*Self(n-3)-5*Self(n-4)+Self(n-5): n in [1..40]]; // Vincenzo Librandi, Aug 23 2015
  • Maple
    A260810:=n->n^2*(3*n^2 - 1)/2: seq(A260810(n), n=0..50); # Wesley Ivan Hurt, Apr 25 2017
  • Mathematica
    Table[n^2 (3 n^2 - 1)/2, {n, 0, 40}]
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 1, 22, 117, 376}, 40] (* Vincenzo Librandi, Aug 23 2015 *)
  • PARI
    vector(40, n, n--; n^2*(3*n^2-1)/2)
    
  • Sage
    [n^2*(3*n^2-1)/2 for n in (0..40)]
    

Formula

G.f.: x*(1 + x)*(1 + 16*x + x^2)/(1 - x)^5.
a(n) = a(-n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A245288(2*n^2).
a(n) = A001318(2*n^2-1) with A001318(-1) = 0.
From Amiram Eldar, Aug 25 2022: (Start)
Sum_{n>=1} 1/a(n) = 3 - Pi^2/3 - sqrt(3)*Pi*cot(Pi/sqrt(3)).
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi*cosec(Pi/sqrt(3)) - Pi^2/6 - 3. (End)

A245467 a(n) = ( 4*n^2 - 2*n + 1 - (2*n^2 - 6*n + 1) * (-1)^n )/16.

Original entry on oeis.org

0, 0, 1, 2, 3, 7, 6, 15, 10, 26, 15, 40, 21, 57, 28, 77, 36, 100, 45, 126, 55, 155, 66, 187, 78, 222, 91, 260, 105, 301, 120, 345, 136, 392, 153, 442, 171, 495, 190, 551, 210, 610, 231, 672, 253, 737, 276, 805, 300, 876, 325, 950, 351, 1027, 378, 1107, 406
Offset: 0

Views

Author

Wesley Ivan Hurt, Jul 23 2014

Keywords

Comments

For even n, the sequence gives the sum of the smallest parts of the partitions of n into two parts. For odd n, the sequence gives the sum of the largest parts of the partitions of n into two parts (see example).
Union of triangular numbers (A000217) and second pentagonal numbers (A005449). - Wesley Ivan Hurt, Oct 31 2015

Examples

			a(6) = 6; the partitions of 6 into two parts are: (5,1), (4,2), (3,3). Since 6 is even, we add the smallest parts in these partitions to get 6.
a(7) = 15; the partitions of 7 into two parts are: (6,1), (5,2), (4,3). Since 7 is odd, we add the largest parts in the partitions to get 15.
		

Crossrefs

Cf. A000217 (triangular numbers), A005449 (second pentagonal numbers).
Cf. A245288.

Programs

  • Magma
    [( 4*n^2-2*n+1-(2*n^2-6*n+1)*(-1)^n )/16 : n in [0..50]];
    
  • Maple
    A245467:=n->( 4*n^2-2*n+1-(2*n^2-6*n+1)*(-1)^n )/16: seq(A245467(n), n=0..50);
  • Mathematica
    Table[(4n^2 - 2n + 1 - (2n^2 - 6n + 1) (-1)^n)/16, {n, 0, 50}]
    CoefficientList[Series[- x^2 (x^3 + 2 x + 1)/((x - 1)^3 (x + 1)^3), {x, 0, 50}], x] (* Vincenzo Librandi, Jul 25 2014 *)
    LinearRecurrence[{0,3,0,-3,0,1},{0,0,1,2,3,7},60] (* Harvey P. Dale, May 11 2019 *)
  • PARI
    concat([0,0], Vec(-x^2*(x^3+2*x+1)/((x-1)^3*(x+1)^3) + O(x^100))) \\ Colin Barker, Jul 23 2014
    
  • PARI
    vector(100, n, n--; if(n%2==0, t=n/2; t*(t+1)/2, t*(3*t + 1)/2)) \\ Altug Alkan, Nov 01 2015

Formula

a(n) = floor(n/2) * (3*floor(n/2)+1) * (n mod 2)/2 + floor(n/2) * (floor(n/2)+1) * ((n+1) mod 2)/2.
From Colin Barker, Jul 23 2014: (Start)
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>5.
G.f.: -x^2*(x^3+2*x+1) / ((x-1)^3*(x+1)^3). (End)
a(2n) = A000217(n), a(2n+1) = A005449(n). - Wesley Ivan Hurt, Oct 31 2015
Sum_{n>=2} 1/a(n) = 8 - Pi/sqrt(3) - 3*log(3). - Amiram Eldar, Aug 25 2022
Showing 1-2 of 2 results.