OFFSET
1,4
EXAMPLE
a(1..3)=0 since P(1),P(2),P(3) cannot be written as difference of 2 other pentagonal numbers > 0.
a(4)=7 since P(7)=70 is the least pentagonal number > P(4)=22 such that their sum is again a pentagonal number, P(8).
PROG
(PARI) P(n)=n*(3*n-1)>>1 /* a.k.a. A000326 */ /* newline */ isPent(t)=P(sqrtint(t<<1\3)+1)==t /* newline */ for(i=1, 99, for(j=i+1, (P(i)-1)\3, isPent(P(i)+P(j))&print1(j", ")|next(2)); print1(0", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 15 2007
STATUS
approved