|
|
A255849
|
|
Characteristic function of pentagonal numbers.
|
|
2
|
|
|
1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
Pentagonal numbers are of the form (3*n^2-n)/2.
|
|
LINKS
|
|
|
FORMULA
|
For n > 0, a(n) = floor(sqrt(2*n/3+1/36)+1/6)-floor(sqrt(2*(n-1)/3+1/36)+1/6).
|
|
MATHEMATICA
|
Join[{1}, Table[If[IntegerQ[(1+Sqrt[1+24n])/6], 1, 0], {n, 100}]] (* Harvey P. Dale, Feb 25 2018 *)
Module[{nn=20, n5}, n5=PolygonalNumber[5, Range[0, nn]]; Table[If[MemberQ[ n5, n], 1, 0], {n, 0, n5[[-1]]}]] (* Harvey P. Dale, Dec 30 2021 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|