OFFSET
0
COMMENTS
Dodecahedral numbers are of the form m(3m-1)(3m-2)/2.
LINKS
FORMULA
For n > 0, a(n) = floor(t(n) + 1/(27 * t(n)) + 1/3) - floor(t(n-1) + 1/(27 * t(n-1)) + 1/3), where t(n) = ( sqrt(243*n^2-1)/(3^(9/2)) + n/9 )^(1/3).
MATHEMATICA
With[{ddn=Table[m(3m-1)(3m-2)/2, {m, 0, 10}]}, Table[If[MemberQ[ddn, n], 1, 0], {n, 0, 100}]] (* Harvey P. Dale, Oct 18 2015 *)
PROG
(PARI)
A006566(n) = (n*(3*n-1)*(3*n-2)/2);
A256433(n) = { my(i=0); while(A006566(i) < n, i++); return(A006566(i) == n); }; \\ Antti Karttunen, Aug 05 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Mikael Aaltonen, Mar 28 2015
STATUS
approved