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.

A299412 Pentagonal pyramidal numbers divisible by 3.

Original entry on oeis.org

0, 6, 18, 75, 126, 288, 405, 726, 936, 1470, 1800, 2601, 3078, 4200, 4851, 6348, 7200, 9126, 10206, 12615, 13950, 16896, 18513, 22050, 23976, 28158, 30420, 35301, 37926, 43560, 46575, 53016, 56448, 63750, 67626, 75843, 80190, 89376, 94221, 104430, 109800, 121086, 127008, 139425, 145926, 159528, 166635
Offset: 0

Views

Author

Justin Gaetano, Feb 20 2018

Keywords

Examples

			The first 6 pentagonal pyramidal numbers are 0, 1, 6, 18, 40, 75; of these, 0, 6, 18, 75 are divisible by 3.
		

Crossrefs

Programs

  • Magma
    [IsEven(n) select (3*n/2)^2*(3*n/2+1)/2 else ((3*n+1)/2)^2*((3*n+1)/2+1)/2: n in [0..50] ]; // Vincenzo Librandi, Mar 14 2018
  • Maple
    f:= proc(n) if n::even then (3*n/2)^2*(3*n/2+1)/2 else
    ((3*n+1)/2)^2*((3*n+1)/2+1)/2 fi end proc:
    map(f, [$0..100]); # Robert Israel, Feb 28 2018
  • Mathematica
    Array[((3 #1 + #2)/2)^2*((3 #1 + #2)/2 + 1)/2 & @@ {#, Boole@ OddQ@ #} &, 47, 0] (* Michael De Vlieger, Feb 21 2018 *)
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,6,18,75,126,288,405},50] (* Harvey P. Dale, Jul 16 2021 *)
  • PARI
    lista(nn) = {for (n=0, nn, if (!(n^2*(n+1)/2 % 3), print1(n^2*(n+1)/2, ", ")););} \\ Michel Marcus, Feb 21 2018
    
  • PARI
    x='x+O('x^99); concat(0, Vec(3*x*(3*x^4+5*x^3+13*x^2+4*x+2)/((x-1)^4*(x+1)^3))) \\ Altug Alkan, Mar 14 2018
    

Formula

a(n) = A007494(n)*A117748(n).
a(n) = (3*n/2)^2*(3*n/2+1)/2 if n even.
a(n) = ((3*n+1)/2)^2*((3*n+1)/2+1)/2 if n odd.
From Omar E. Pol, Feb 21 2018: (Start)
a(n) = 3*A001318(n)*A007494(n).
a(n) = A001318(n)*abs(A269416(n-1)), n >= 1. (End)
G.f.: 3*x*(3*x^4 + 5*x^3 + 13*x^2 + 4*x + 2)/((x-1)^4*(x+1)^3). - Robert Israel, Feb 28 2018

A069499 Triangular numbers of the form 21*k.

Original entry on oeis.org

0, 21, 105, 210, 231, 378, 630, 861, 903, 1176, 1596, 1953, 2016, 2415, 3003, 3486, 3570, 4095, 4851, 5460, 5565, 6216, 7140, 7875, 8001, 8778, 9870, 10731, 10878, 11781, 13041, 14028, 14196, 15225, 16653, 17766, 17955, 19110, 20706, 21945, 22155, 23436, 25200
Offset: 1

Views

Author

Amarnath Murthy, Mar 30 2002

Keywords

Comments

Intersection of A000217 and A008603. - Michel Marcus, Sep 17 2013
Let F(r) = Product_{n >= 0} 1 - q^(21*(14*n+r)). The sequence terms occur as the exponents in the expansion of (1 - q^21)*F(5)*F(6)*F(7)*F(8)*F(9)*F(13)*F(14)*F(15) = 1 - q^21 - q^105 + q^210 + q^231 - q^378 - q^630 + + - - ... (by the quintuple product identity). - Peter Bala, Dec 23 2024

Crossrefs

Programs

  • Maple
    a[0] := 0:a[1] := 6:a[2] := 14:a[3] := 20:a[4] := 21:a[5] := 27:a[6] := 35:a[7] := 41:seq((42*(floor(i/8))+a[i mod 8])*(42*(floor(i/8))+a[i mod 8]+1)/2,i=0..100);
    # alternative program
    A := proc (q) local n: for n from 0 to q do if type((1/21)*n*(n+1)/2, integer) then print(n*(n+1)/2) fi; od; end: A(250); # Peter Bala, Dec 24 2024
  • Mathematica
    Select[21Range[1100],OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Aug 16 2021 *)
    Select[Accumulate[Range[0,300]],IntegerQ[#/21]&] (* Harvey P. Dale, Jun 12 2022 *)

Formula

G.f.: -21*x^2*(x^2-x+1)*(x^4+5*x^3+9*x^2+5*x+1) / ((x-1)^3*(x+1)^2*(x^2+1)^2). - Colin Barker, Sep 23 2013
From Peter Bala, Dec 24 2025: (Start)
a(n) is quasi-polynomial in n:
a(4*n) = 21 * n*(21*n - 1)/2; a(4*n+1) = 21 * n*(21*n + 1)/2;
a(4*n+2) = 21 * (3*n + 1)*(7*n + 2)/2; a(4*n+3) = 21 * (3*n + 2)*(7*n + 5)/2. (End)

Extensions

More terms from Sascha Kurz, Apr 01 2002
a(1)=0 added and edited by Alois P. Heinz, Aug 19 2021
Showing 1-2 of 2 results.