cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A106546 a(n) = n^2 if n^2 is the difference of two primes, otherwise a(n) = 0.

This page as a plain text file.
%I A106546 #5 Mar 31 2012 14:11:37
%S A106546 1,4,9,16,0,36,0,64,81,100,0,144,0,196,225,256,0,324,0,400,441,484,0,
%T A106546 576,0,676,0,784,0,900,0,1024,1089,1156,0,1296,0,1444,1521,1600,0,
%U A106546 1764,0,1936,2025,2116,0,2304,0,2500,0,2704,0,2916,0,3136,3249,3364,0,3600,0
%N A106546 a(n) = n^2 if n^2 is the difference of two primes, otherwise a(n) = 0.
%C A106546 For odd n, n^2 is odd so the two primes must be opposite in parity. Lesser prime must be 2 and greater prime must be n^2+2. Thus for odd n, n^2 is the difference of two primes iff n^2+2 is prime.
%C A106546 An odd difference can be obtained only by subtracting 2 from some prime > 2, hence a(n) = 0 if n is odd and n^2+2 is composite.
%F A106546 n^2 - A106546 gives perfect squares which are not the difference of two primes (otherwise 0).
%e A106546 a(6) = 6^2 = 36 = 41-5 (two primes).
%e A106546 a(5) = 0 and a(7) = 0 because 5^2+2 =27 = 3*3*3 and 7^2+2 =51 = 3*17 are composite.
%Y A106546 Cf. A106544-A106548, A106562-A106564, A106571, A106573-A106575, A106577.
%K A106546 easy,nonn
%O A106546 1,2
%A A106546 _Alexandre Wajnberg_, May 08 2005
%E A106546 Edited and extended by _Klaus Brockhaus_ and _Ray Chandler_, May 12 2005