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.

A298397 Pentagonal numbers divisible by 4.

Original entry on oeis.org

0, 12, 92, 176, 376, 532, 852, 1080, 1520, 1820, 2380, 2752, 3432, 3876, 4676, 5192, 6112, 6700, 7740, 8400, 9560, 10292, 11572, 12376, 13776, 14652, 16172, 17120, 18760, 19780, 21540, 22632, 24512, 25676, 27676, 28912, 31032, 32340, 34580, 35960, 38320, 39772, 42252
Offset: 1

Views

Author

Bruno Berselli, Jan 18 2018

Keywords

Comments

If b(n) is the n-th octagonal number multiple of 32 then a(n) = b(n)/8.

Examples

			A000326(8) = 92 is in the sequence because 92 = 4*23.
		

Crossrefs

Subsequence of A047217, A047388.
Cf. pentagonal numbers divisible by k: A014633 (k=2), A268351 (k=3), this sequence (k=4), A117793 (k=5).

Programs

  • GAP
    List([1..50], n -> 8*n*(3*n-7)-(6*n-7)*(-1)^n+33);
    
  • Magma
    [8*n*(3*n-7)-(6*n-7)*(-1)^n+33: n in [1..50]];
    
  • Maple
    P:=proc(n) local x; x:=n*(3*n-1)/2; if x mod 4=0 then x; fi; end:
    seq(P(i),i=0..2*10^2); # Paolo P. Lava, Jan 19 2018
  • Mathematica
    Table[8 n (3 n - 7) - (6 n - 7) (-1)^n + 33, {n, 1, 50}]
    (* Second program (using definition): *)
    Select[Table[k*(3*k - 1)/2, {k, 0, 200}], Divisible[#, 4]&] (* Jean-François Alcover, Jan 19 2018 *)
  • Maxima
    makelist(8*n*(3*n-7)-(6*n-7)*(-1)^n+33, n, 1, 50);
    
  • PARI
    vector(50, n, nn; 8*n*(3*n-7)-(6*n-7)*(-1)^n+33)
    
  • PARI
    concat(0, Vec(4*x^2*(3 + 20*x + 15*x^2 + 10*x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Jan 20 2018
  • Sage
    [8*n*(3*n-7)-(6*n-7)*(-1)^n+33 for n in (1..50)]
    

Formula

O.g.f.: 4*x^2*(3 + 20*x + 15*x^2 + 10*x^3)/((1 + x)^2*(1 - x)^3).
E.g.f.: (33 - 32*x + 24*x^2)*exp(x) + (7 + 6*x)*exp(-x) - 40.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = 8*n*(3*n - 7) - (6*n - 7)*(-1)^n + 33.
From Colin Barker, Jan 20 2018: (Start)
a(n) = 24*n^2 - 62*n + 40 for n even.
a(n) = 24*n^2 - 50*n + 26 for n odd. (End)

A299646 a(n) = Sum_{k = n..2*n+1} k^2.

Original entry on oeis.org

1, 14, 54, 135, 271, 476, 764, 1149, 1645, 2266, 3026, 3939, 5019, 6280, 7736, 9401, 11289, 13414, 15790, 18431, 21351, 24564, 28084, 31925, 36101, 40626, 45514, 50779, 56435, 62496, 68976, 75889, 83249, 91070, 99366, 108151, 117439, 127244, 137580, 148461, 159901
Offset: 0

Views

Author

Bruno Berselli, Feb 20 2018

Keywords

Comments

Inverse binomial transform is 1, 13, 27, 14, 0, 0, 0, ... (0 continued).

Crossrefs

Subsequence of A008854, A047388, A174070 (after 1).
Cf. A050409: Sum_{k = n..2*n} k^2; A050410: Sum_{k = n..2*n-1} k^2.

Programs

  • GAP
    List([0..50], n -> (n+2)*(14*n^2+11*n+3)/6);
    
  • Magma
    [(n+2)*(14*n^2+11*n+3)/6: n in [0..50]];
    
  • Maple
    seq((n + 2)*(14*n^2 + 11*n + 3)/6, n=0..50); # Peter Luschny, Feb 21 2018
  • Mathematica
    Table[(n + 2) (14 n^2 + 11 n + 3)/6, {n, 0, 50}]
    (* Second program: *)
    LinearRecurrence[{4, -6, 4, -1}, {1, 14, 54, 135}, 41] (* Jean-François Alcover, Feb 21 2018 *)
  • Maxima
    makelist((n+2)*(14*n^2+11*n+3)/6, n, 0, 50);
    
  • PARI
    a(n)=(n+2)*(14*n^2+11*n+3)/6 \\ Charles R Greathouse IV, Feb 21 2018
    
  • PARI
    Vec((1 + 10*x + 4*x^2 - x^3)/(1 - x)^4 + O(x^60)) \\ Colin Barker, Feb 22 2018
  • Sage
    [(n+2)*(14*n^2+11*n+3)/6 for n in (0..50)]
    

Formula

O.g.f.: (1 + 10*x + 4*x^2 - x^3)/(1 - x)^4.
E.g.f.: (6 + 78*x + 81*x^2 + 14*x^3)*exp(x)/6.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = (n + 2)*(14*n^2 + 11*n + 3)/6. Therefore:
a(6*k + r) = 504*k^3 + 18*(14*r + 13)*k^2 + (42*r^2 + 78*r + 25)*k + a(r), with 0 <= r <= 5. Example: for r=5, a(6*k + 5) = (6*k + 7)*(84*k^2 + 151*k + 68).
Showing 1-2 of 2 results.