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.

A053012 Platonic numbers: a(n) is a tetrahedral (A000292), cube (A000578), octahedral (A005900), dodecahedral (A006566) or icosahedral (A006564) number.

Original entry on oeis.org

1, 4, 6, 8, 10, 12, 19, 20, 27, 35, 44, 48, 56, 64, 84, 85, 120, 124, 125, 146, 165, 216, 220, 231, 255, 286, 343, 344, 364, 455, 456, 489, 512, 560, 670, 680, 729, 742, 816, 891, 969, 1000, 1128, 1140, 1156, 1330, 1331, 1469, 1540, 1629, 1728, 1771, 1834
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Feb 22 2000

Keywords

Comments

19, the 3rd octahedral number, is the only prime platonic number. - Jean-François Alcover, Oct 11 2012

Crossrefs

Numbers of partitions into Platonic numbers: A226748, A226749.

Programs

  • Haskell
    a053012 n = a053012_list !! (n-1)
    a053012_list = tail $ f
       [a000292_list, a000578_list, a005900_list, a006566_list, a006564_list]
       where f pss = m : f (map (dropWhile (<= m)) pss)
                     where m = minimum (map head pss)
    -- Reinhard Zumkeller, Jun 17 2013
    
  • Mathematica
    nn = 25; t1 = Table[n (n + 1) (n + 2)/6, {n, nn}]; t2 = Table[n^3, {n, nn}]; t3 = Table[(2*n^3 + n)/3, {n, nn}]; t4 = Table[n (3*n - 1) (3*n - 2)/2, {n, nn}]; t5 = Table[n (5*n^2 - 5*n + 2)/2, {n, nn}]; Select[Union[t1, t2, t3, t4, t5], # <= t1[[-1]] &] (* T. D. Noe, Oct 13 2012 *)
  • PARI
    listpoly(lim, poly[..])=my(v=List()); for(i=1,#poly, my(P=poly[i], x=variable(P), f=k->subst(P,x,k),n,t); while((t=f(n++))<=lim, listput(v, t))); Set(v)
    list(lim)=my(n='n); listpoly(lim, n*(n+1)*(n+2)/6, n^3, (2*n^3+n)/3, n*(3*n-1)*(3*n-2)/2, n*(5*n^2-5*n+2)/2) \\ Charles R Greathouse IV, Oct 11 2016