OFFSET
1,3
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Centered Pentagonal Number
MAPLE
L:= [seq((5*n^2+5*n+2)/2, n=0..30)]: N:= L[-1]:
S:=[0, op(ListTools:-PartialSums(L))]:
R:=select(`<=`, {0, seq(seq(S[n]-S[m], m=1..n-1), n=1..nops(S))}, N):
sort(convert(R, list)); # Robert Israel, Mar 19 2023
MATHEMATICA
terms = 59;
nmax = 16; kmax = 9; (* empirical *)
T = Table[(5n^2 + 5n + 2)/2, {n, 0, nmax}];
Union[{0}, T, Table[k MovingAverage[T, k], {k, 2, kmax}] // Flatten][[1 ;; terms]] (* Jean-François Alcover, Dec 26 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Dec 21 2018
STATUS
approved