OFFSET
1,1
COMMENTS
A071330(a(n)) = 1.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(Haskell)
a095841 n = a095841_list !! (n-1)
a095841_list = filter ((== 1) . a071330) a000961_list
(PARI) is(n)=sum(i=2, n\2, isprimepower(i)&&isprimepower(n-i))+isprimepower(n-1)==1 || n==2 \\ naive; Charles R Greathouse IV, Nov 21 2014
(PARI) is(n)=my(s); forprime(p=2, n\2, if(isprimepower(n-p) && s++>1, return(0))); for(e=2, log(n)\log(2), forprime(p=2, sqrtnint(n\2, e), if(isprimepower(n-p^e) && s++>1, return(0)))); s+(!!isprimepower(n-1))==1 || n==2 \\ faster; Charles R Greathouse IV, Nov 21 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jan 11 2013
STATUS
approved