A106546 a(n) = n^2 if n^2 is the difference of two primes, otherwise a(n) = 0.
1, 4, 9, 16, 0, 36, 0, 64, 81, 100, 0, 144, 0, 196, 225, 256, 0, 324, 0, 400, 441, 484, 0, 576, 0, 676, 0, 784, 0, 900, 0, 1024, 1089, 1156, 0, 1296, 0, 1444, 1521, 1600, 0, 1764, 0, 1936, 2025, 2116, 0, 2304, 0, 2500, 0, 2704, 0, 2916, 0, 3136, 3249, 3364, 0, 3600, 0
Offset: 1
Examples
a(6) = 6^2 = 36 = 41-5 (two primes). a(5) = 0 and a(7) = 0 because 5^2+2 =27 = 3*3*3 and 7^2+2 =51 = 3*17 are composite.
Formula
n^2 - A106546 gives perfect squares which are not the difference of two primes (otherwise 0).
Extensions
Edited and extended by Klaus Brockhaus and Ray Chandler, May 12 2005
Comments