%I #17 Oct 07 2023 21:38:11
%S 0,28,54047322253,14756071005948636,600605016143706003,
%T 41181981873797476176,240580227206205322973571
%N Hexagonal numbers which are the sum of the first k primes, for some k >= 0.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Hexagonal_number">Hexagonal number</a>.
%H <a href="/index/Pol#polygonal_numbers">Index to sequences related to polygonal numbers</a>
%F a(n) = A007504(A366270(n)).
%e 28 is a term because it's both a hexagonal number and the sum of the first five primes (2 + 3 + 5 + 7 + 11).
%t 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]
%Y Intersection of A000384 with A007504.
%Y Subsequence of A066527.
%Y Cf. A061890, A364691, A364694, A366270 (corresponding k values).
%K nonn,hard,more
%O 1,2
%A _Paolo Xausa_, Oct 06 2023