login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A296304 Numbers whose absolute difference from a square is never a prime. 1

%I #19 Jan 18 2018 04:33:07

%S 0,169,289,625,784,1024,1444,1849,2116,2209,3364,3481,3600,3721,3844,

%T 4489,5041,5184,5329,5929,6400,7225,7744,8464,8649,8836,10201,10404,

%U 10609,10816,11449,11664,11881,12100,13924,14884,15129,15376,16129,16900,17689,18769

%N Numbers whose absolute difference from a square is never a prime.

%C 0 and the squares of numbers k such that 2k+1 and 2k-1 are not primes; i.e., 0 and the squares of the terms of A104278.

%H Muniru A Asiru, <a href="/A296304/b296304.txt">Table of n, a(n) for n = 1..20000</a>

%F a(1) = 0; for n > 1, A104278(n-1)^2.

%e The absolute difference between any square j^2 and 169 is |j^2 - 169| = |(j-13)*(j+13)| = |j-13|*|j+13|, which cannot be a prime unless one of the two factors |j-13| and |j+13| is 1, i.e., j is -14, -12, 12, or 14; however, in each case, the other factor is nonprime (-27, -25, 25, or 27, respectively), so |j^2 - 169| is not a prime for any integer j. Thus, 169 is in the sequence.

%e 49 - 6^2 = 49 - 36 = 13 (a prime), so 49 is not in the sequence.

%t Join[{0}, Select[Range[200], CompositeQ[2# + 1] && CompositeQ[2# - 1]&]^2] (* _Jean-François Alcover_, Dec 21 2017 *)

%o (GAP) o := [];; for n in [1..10^4] do if not IsPrime(2*n-1) and not IsPrime(2*n+1) then Add(o,n^2); fi; od;

%o sequence := Concatenation([0],o); # _Muniru A Asiru_, Jan 01 2018

%Y Cf. A104278.

%Y Cf. A292990 (Numbers whose absolute difference from a triangular number is never a prime).

%K nonn

%O 1,2

%A _Jon E. Schoenfield_, Dec 10 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 8 08:13 EDT 2024. Contains 372319 sequences. (Running on oeis4.)