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!)
A067528 Numbers n such that n - 4^k is a prime or 1 for all k > 0 and n > 4^k. 5

%I #18 May 25 2017 04:18:40

%S 5,6,7,9,11,15,17,21,23,27,33,35,45,47,57,63,75,77,83,87,105,117,143,

%T 153,167,195,215,227,243,245,255,287,297,413,437,447,483,495,507,525,

%U 573,635,657,677,755,825,1113,1133,1295,1487,1515,1547,1617,1623,2015

%N Numbers n such that n - 4^k is a prime or 1 for all k > 0 and n > 4^k.

%C Is the sequence finite?

%C The last term appears to be 5833497. - _T. D. Noe_, Nov 23 2004

%C A less strict version of A039669, n - 2^k is prime for 0 < k < log_2 k. If a number is in that sequence, then obviously it is also in this sequence. As of this writing, 105 is believed to be the last term of that sequence. - _Alonso del Arte_, May 24 2017

%H T. D. Noe, <a href="/A067528/b067528.txt">Table of n, a(n) for n=1..102</a> (no others < 2*10^9)

%e 167 is a term as 167 - 4 = 163, 167 - 16 = 151, 167 - 64 = 103 are primes.

%p filter:= proc(n) local k, t;

%p for k from 1 do

%p if 4^k >= n-1 then return true

%p elif not isprime(n-4^k) then return false

%p fi

%p od

%p end proc:

%p select(filter, [$5..3000]); # _Robert Israel_, May 24 2017

%t A067528 = {}; Do[k = 1; While[p = n - 4^k; p > 0 && (p == 1 || PrimeQ[p]), k++]; If[p <= 0, AppendTo[A067528, n]], {n, 5, 10^7}]; A067528 (* _T. D. Noe_ *)

%Y Cf. A067526.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Feb 17 2002

%E More terms from _Sascha Kurz_, Mar 19 2002

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 March 29 09:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)