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

A014632 Odd pentagonal numbers.

Original entry on oeis.org

1, 5, 35, 51, 117, 145, 247, 287, 425, 477, 651, 715, 925, 1001, 1247, 1335, 1617, 1717, 2035, 2147, 2501, 2625, 3015, 3151, 3577, 3725, 4187, 4347, 4845, 5017, 5551, 5735, 6305, 6501, 7107, 7315, 7957, 8177, 8855, 9087, 9801, 10045, 10795, 11051, 11837
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1/8*(11+3*(-1)^(n+1)-12*(n+1))*(3+(-1)^(n+1)-4*(n+1)): n in [0..40]]; // Vincenzo Librandi, Aug 17 2011
  • Maple
    A014632:=n->(3*(-1)^n+12*n+1)*((-1)^n+4*n+1)/8: seq(A014632(n), n=0..100); # Wesley Ivan Hurt, Apr 28 2017
  • Mathematica
    Select[Table[n (3 n - 1)/2, {n,100}], OddQ]  (* Harvey P. Dale, Feb 03 2011 *)

Formula

a(n) = a(n-1) +2*a(n-2) -2*a(n-3) -a(n-4) +a(n-5).
a(n) = 48+2*a(n-2)-a(n-4). - Ant King, Aug 16 2011
G.f.: (1+4*x+28*x^2+8*x^3+7*x^4)/((1+x)^2*(1-x)^3). - R. J. Mathar, Jul 25 2009
a(n) = (3*(-1)^n+12*n+1)*((-1)^n+4*n+1)/8. - Ant King, Aug 16 2011
Sum_{n>=0} 1/a(n) = Pi/4 + 3*log(3)/2 + sqrt(3)*log(2-sqrt(3))/2. - Amiram Eldar, Jan 13 2024

Extensions

More terms from Patrick De Geest

A193866 Even pentagonal numbers divided by 2.

Original entry on oeis.org

0, 6, 11, 35, 46, 88, 105, 165, 188, 266, 295, 391, 426, 540, 581, 713, 760, 910, 963, 1131, 1190, 1376, 1441, 1645, 1716, 1938, 2015, 2255, 2338, 2596, 2685, 2961, 3056, 3350, 3451, 3763, 3870, 4200, 4313, 4661, 4780, 5146, 5271, 5655, 5786, 6188
Offset: 0

Views

Author

Omar E. Pol, Aug 18 2011

Keywords

Crossrefs

Programs

  • Magma
    [1/16*(1-3*(-1)^n+12*n)*(1-(-1)^n+4*n): n in [0..60]]; // Vincenzo Librandi, Jun 20 2015
  • Mathematica
    Table[(1/16 (1 - 3 (-1)^n + 12 n) (1 - (-1)^n + 4 n)), {n, 0, 50}] (* Vincenzo Librandi, Jun 20 2015 *)
    Select[PolygonalNumber[5,Range[0,100]],EvenQ]/2 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 13 2018 *)
  • PARI
    a(n)=3*n^2+if(n%2,5*n+1,-n)/2 \\ Charles R Greathouse IV, Aug 18 2011
    

Formula

a(n) = 1/16*(1-3*(-1)^n+12*n)*(1-(-1)^n+4*n).
a(n) = A014633(n)/2.
a(0)=0, a(1)=6, a(2)=11, a(3)=35, a(4)=46, a(n)=a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5). G.f.: x*(6+5*x+12*x^2+x^3)/(1-x-2*x^2+2*x^3+x^4-x^5). [Colin Barker, Jan 25 2012]

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)

A014770 Squares of even pentagonal numbers.

Original entry on oeis.org

0, 144, 484, 4900, 8464, 30976, 44100, 108900, 141376, 283024, 348100, 611524, 725904, 1166400, 1350244, 2033476, 2310400, 3312400, 3709476, 5116644, 5664400, 7573504, 8305924, 10824100, 11778624, 15023376, 16240900, 20340100
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A014633.
Even terms of A100255.

Formula

a(n) = A014633(n)^2. - Sean A. Irvine, Nov 20 2018
From Chai Wah Wu, Jan 23 2020: (Start)
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n > 8.
G.f.: -4*x*(x^7 + 168*x^6 + 227*x^5 + 1428*x^4 + 551*x^3 + 960*x^2 + 85*x + 36)/((x - 1)^5*(x + 1)^4). (End)

Extensions

More terms from Erich Friedman.
a(0)=0 inserted for consistency with A014633 by Sean A. Irvine, Nov 20 2018

A114409 Length of all-prime chain of prime[n] + successive even pentagonal numbers.

Original entry on oeis.org

1, 2, 3, 2, 1, 2, 4, 1, 2, 4, 1, 2, 1, 2, 1, 2, 4, 4, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 4, 1, 2, 2, 1, 3, 1, 1, 2, 1, 2, 2, 1, 1, 1, 2, 4, 1, 2, 3, 1, 2, 1, 2, 2, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 3, 1, 1, 1, 2, 4, 1, 4, 2, 4, 2, 1, 1, 1, 2, 1
Offset: 2

Views

Author

Jonathan Vos Post, Feb 11 2006

Keywords

Comments

a(1) is undefined, as prime(1) is the only even prime, for which the length-5 chain is of 2 + successive odd pentagonal numbers A014632: 2 prime, 2+1 = 3 prime, 2+5 = 7 prime, 2+35 = 37 prime, 2+51 = 53 prime, but 2+117 = 119 = 7 * 17 nonprime. Pentagonal numbers A000326 = n*(3*n-1)/2 = 0, 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, ... Even pentagonal numbers A014633 = 12, 22, 70, 92, 176, 210, 330, 376, 532, 590, 782, 852, 1080, ...

Examples

			a(2) = 1 because prime(2) = 3 is prime, but prime(2) + EvenPent(1) = 3 + 12 = 15 = 3 * 5 is nonprime, giving a chain of just 1 successive prime.
a(3) = 2 because 5 is prime, prime(3) + EvenPent(1) = 5 + 12 = 17 is prime, but prime(3) + EvenPent(2) = 5 + 22 = 27 = 3^3 is nonprime, giving a chain of 2 successive primes.
a(4) = 3 because 7 is prime, 7+12 = 19 is prime, 7+22 = 29 is prime, but 7+70 = 77 = 7*11 is nonprime, for a chain of 3 successive primes.
		

Crossrefs

Programs

  • Mathematica
    evp = Select[#*(3*# - 1)/2 &@ Range[200], EvenQ]; a[n_] := Block[{s = Prime@n, c = 1}, While[PrimeQ[s + evp[[c]]], c++]; c]; a /@ Range[2, 90] (* Giovanni Resta, Jun 14 2016 *)

Formula

a(n) = k = length of chain prime[n] + A014633(1) + ... + A014633(k) such that each term in the chain is prime.

Extensions

Corrected and extended by Giovanni Resta, Jun 14 2016
Showing 1-5 of 5 results.