|
|
A366269
|
|
Hexagonal numbers which are the sum of the first k primes, for some k >= 0.
|
|
4
|
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
28 is a term because it's both a hexagonal number and the sum of the first five primes (2 + 3 + 5 + 7 + 11).
|
|
MATHEMATICA
|
A366269list[kmax_]:=Module[{p=0}, Join[{0}, Table[If[IntegerQ[(Sqrt[8(p+=Prime[k])+1]+1)/4], p, Nothing], {k, kmax}]]]; A366269list[10^5]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,hard,more
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|