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!)
A256163 Odd numbers n such that for all 2^k < n the numbers n + 2^k, n - 2^k, n*2^k + 1, and n*2^k - 1 are composite. 4

%I #23 Sep 08 2022 08:46:11

%S 1,7913,8923,24943,34009,35437,42533,52783,60113,83437,100727,105953,

%T 116437,120521,126631,132211,133241,137171,145589,164729,172331,

%U 181645,183671,192173,196633,199513,203069,204013,215113,215279,218503,220523,253519,254329,254587

%N Odd numbers n such that for all 2^k < n the numbers n + 2^k, n - 2^k, n*2^k + 1, and n*2^k - 1 are composite.

%H Felix Fröhlich, <a href="/A256163/b256163.txt">Table of n, a(n) for n = 1..10000</a>

%o (Magma) lst:=[]; for n in [1..254587 by 2] do t:=0; k:=0; while 2^k lt n do if IsPrime(n-2^k) or IsPrime(n+2^k) or IsPrime(n*2^k-1) or IsPrime(n*2^k+1) then t:=1; break; end if; k+:=1; end while; if IsZero(t) then Append(~lst, n); end if; end for; lst;

%o (PARI) for(n=1, 1e6, if(n%2==1, k=0; prim=0; while(2^k < n, if(ispseudoprime(n+2^k) || ispseudoprime(n-2^k) || ispseudoprime(n*2^k+1) || ispseudoprime(n*2^k-1), prim++; break({1})); k++); if(prim==0, print1(n, ", ")))) \\ _Felix Fröhlich_, Apr 01 2015

%Y Cf. A006285, A076335.

%Y Subsequence of A255967.

%Y A256237 gives the primes.

%K nonn

%O 1,2

%A _Arkadiusz Wesolowski_, Mar 17 2015

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 April 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)