login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
1, 7913, 8923, 24943, 34009, 35437, 42533, 52783, 60113, 83437, 100727, 105953, 116437, 120521, 126631, 132211, 133241, 137171, 145589, 164729, 172331, 181645, 183671, 192173, 196633, 199513, 203069, 204013, 215113, 215279, 218503, 220523, 253519, 254329, 254587
OFFSET
1,2
LINKS
PROG
(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;
(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
CROSSREFS
Subsequence of A255967.
A256237 gives the primes.
Sequence in context: A115426 A206069 A237969 * A171111 A155178 A031922
KEYWORD
nonn
AUTHOR
STATUS
approved