A309009 Numbers that are both triangular and octahedral.
0, 1, 6, 231
Offset: 1
Crossrefs
Programs
-
Mathematica
triQ[n_] := IntegerQ[Sqrt[8n + 1]]; oct[n_] := n(2n^2 + 1)/3 ; Select[oct@Range[0, 10], triQ] (* Amiram Eldar, Jul 15 2019 *)
-
PARI
lista(nn) = for (n=0, nn, if (ispolygonal(k=n*(2*n^2 + 1)/3, 3), print1(k, ", "))); \\ Michel Marcus, Jul 06 2019
Extensions
Keyword "full" added by Max Alekseyev, Feb 12 2024
Comments