login
A056897
Smallest square where a(n)+n is prime.
4
1, 0, 0, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 49, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 9, 4, 1, 0, 1, 0, 9, 16, 1, 0, 25, 4, 9, 16, 1, 0, 25, 4, 81, 4, 1, 0, 1, 0, 9, 4, 9, 36, 1, 0, 81, 4, 1, 0, 1, 0, 9, 4, 25, 36, 1, 0, 9, 16, 1, 0, 25, 4, 81, 16, 1, 0, 49, 16, 9, 4, 9
OFFSET
0,8
LINKS
FORMULA
a(n) =A056896(n)-n =A056898(n)^2
EXAMPLE
a(8)=9 since 9 is a square and 9+8=7 which is a prime
MATHEMATICA
With[{sqs=Range[0, 20]^2}, Table[SelectFirst[sqs, PrimeQ[n+#]&], {n, 100}]] (* The program uses the SelectFirst function from Mathematica version 10 *) (* Harvey P. Dale, May 07 2016 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Jul 05 2000
STATUS
approved