OFFSET
1,1
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
Wikipedia, Polygonal number.
EXAMPLE
28 is a term because it's both a triangular number and the sum of the first 5 primes (2 + 3 + 5 + 7 + 11).
58 is a term because it's both an octagonal number and the sum of the first 7 primes (2 + 3 + 5 + 7 + 11 + 13 + 17).
MATHEMATICA
A364693Q[n_]:=With[{d=Divisors[2n]}, Catch[For[i=3, i<Length[d]-1, i++, If[Divisible[2n/d[[i]]-2, d[[i]]-1], Throw[True]]]; False]]; (* After Jianing Song in A090466 *)
A364694list[kmax_]:=Select[Accumulate[Prime[Range[kmax]]], A364693Q]; A364694list[100]
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo Xausa, Aug 03 2023
STATUS
approved