OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
EXAMPLE
a(7) = 17 because a(6) = 11, pentagonal numbers already in the sequence are 1 and 5, and 11+1+5 = 17.
PROG
(PARI) vector(100, n, if(n==1, a_n_1=sum_=1, a_n_1+=sum_; if(ispolygonal(a_n_1, 5), sum_+=a_n_1)); a_n_1)
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Feb 19 2015
STATUS
approved