OFFSET
1,2
COMMENTS
No other terms found for n < 2000000. - Colin Barker, Apr 13 2014
No other terms with n < 10^17. - Charles R Greathouse IV, Apr 14 2014
All terms > 4 must be odd, since otherwise n - 2*1^2 is composite. The initial terms 1 and 2 satisfy the condition voidly (no k^2 < n/2 exists). They could be excluded explicitly, but including them can only improve search results. - M. F. Hasler, Apr 16 2014
EXAMPLE
91 is in this sequence because 91-2*1^2 = 89, 91-2*2^2 = 83, 91-2*3^2 = 73, 91-2*4^2 = 59, 91-2*5^2 = 41, 91-2*6^2 = 19 where 89, 83, 73, 59, 41, 19 are all primes.
PROG
(PARI) isOK(n) = k=1; until(k^2>=n/2, if(!isprime(n-2*k^2), return(0)); k++); 1;
for(n=1, 20000, if(isOK(n), print1(n, ", "))) \\ Colin Barker, Apr 14 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Lopatin and Juri-Stepan Gerasimov, Apr 13 2014
STATUS
approved