OFFSET
1,1
COMMENTS
Central polygonal numbers are those of the form n^2-n+1, or equivalently n^2+n+1. We exclude factorizations where one of the factors is 1.
EXAMPLE
21 = 4^2+4+1 = 7*3 = (2^2+2+1)*(1^2+1+1), so 21 is in the sequence.
PROG
(PARI) iscpn(n)=local(r=sqrtint(n-1)); n==r^2+r+1
iscpnprod(n)=local(x, y); for(i=1, n, x=i^2+i+1; y=n\x; if(x>y, return(0)); if(n==x*y&&iscpn(y), return(1))); 0
ap(n)=for(k=1, n, if(iscpnprod(k^2+k+1), print1(k^2+k+1", ")))
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Dec 30 2011
STATUS
approved