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.

A298397 Pentagonal numbers divisible by 4.

This page as a plain text file.
%I A298397 #26 Sep 08 2022 08:46:20
%S A298397 0,12,92,176,376,532,852,1080,1520,1820,2380,2752,3432,3876,4676,5192,
%T A298397 6112,6700,7740,8400,9560,10292,11572,12376,13776,14652,16172,17120,
%U A298397 18760,19780,21540,22632,24512,25676,27676,28912,31032,32340,34580,35960,38320,39772,42252
%N A298397 Pentagonal numbers divisible by 4.
%C A298397 If b(n) is the n-th octagonal number multiple of 32 then a(n) = b(n)/8.
%H A298397 Colin Barker, <a href="/A298397/b298397.txt">Table of n, a(n) for n = 1..1000</a>
%H A298397 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A298397 O.g.f.: 4*x^2*(3 + 20*x + 15*x^2 + 10*x^3)/((1 + x)^2*(1 - x)^3).
%F A298397 E.g.f.: (33 - 32*x + 24*x^2)*exp(x) + (7 + 6*x)*exp(-x) - 40.
%F A298397 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
%F A298397 a(n) = 8*n*(3*n - 7) - (6*n - 7)*(-1)^n + 33.
%F A298397 From _Colin Barker_, Jan 20 2018: (Start)
%F A298397 a(n) = 24*n^2 - 62*n + 40 for n even.
%F A298397 a(n) = 24*n^2 - 50*n + 26 for n odd. (End)
%e A298397 A000326(8) = 92 is in the sequence because 92 = 4*23.
%p A298397 P:=proc(n) local x; x:=n*(3*n-1)/2; if x mod 4=0 then x; fi; end:
%p A298397 seq(P(i),i=0..2*10^2); # _Paolo P. Lava_, Jan 19 2018
%t A298397 Table[8 n (3 n - 7) - (6 n - 7) (-1)^n + 33, {n, 1, 50}]
%t A298397 (* Second program (using definition): *)
%t A298397 Select[Table[k*(3*k - 1)/2, {k, 0, 200}], Divisible[#, 4]&] (* _Jean-François Alcover_, Jan 19 2018 *)
%o A298397 (PARI) vector(50, n, nn; 8*n*(3*n-7)-(6*n-7)*(-1)^n+33)
%o A298397 (Sage) [8*n*(3*n-7)-(6*n-7)*(-1)^n+33 for n in (1..50)]
%o A298397 (Maxima) makelist(8*n*(3*n-7)-(6*n-7)*(-1)^n+33, n, 1, 50);
%o A298397 (Magma) [8*n*(3*n-7)-(6*n-7)*(-1)^n+33: n in [1..50]];
%o A298397 (GAP) List([1..50], n -> 8*n*(3*n-7)-(6*n-7)*(-1)^n+33);
%o A298397 (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
%Y A298397 Cf. A000326, A000567.
%Y A298397 Subsequence of A047217, A047388.
%Y A298397 Cf. pentagonal numbers divisible by k: A014633 (k=2), A268351 (k=3), this sequence (k=4), A117793 (k=5).
%K A298397 nonn,easy
%O A298397 1,2
%A A298397 _Bruno Berselli_, Jan 18 2018