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