A255971
Number of terms in A255967 less than 10^n.
Original entry on oeis.org
0, 1, 1, 1, 11, 168, 2356, 28321, 326831, 3678318, 39570252, 418509525
Offset: 0
-
isA255967(m) = if(!(m % 2), 0, my(pow = 2); while(pow < m && !isprime(m - pow) && !isprime(m + pow), pow *= 2); pow > m);
list(len) = {my(pow = 10, c = 0); print1(0, ", "); for(k = 1, 10^len, if(isA255967(k), c++); if(k == pow-1, print1(c, ", "); pow *= 10));} \\ Amiram Eldar, Jul 19 2025
A153352
K-bit primes p such that p-2^i and p+2^i are composite for 0<=i<=K-1.
Original entry on oeis.org
1973, 3181, 3967, 4889, 8363, 8923, 11437, 12517, 14489, 19583, 19819, 21683, 21701, 21893, 22147, 22817, 24943, 27197, 27437, 28057, 29101, 34171, 34537, 34919, 35201, 35437, 36151, 38873, 41947, 42169, 42533, 42943, 43103, 43759
Offset: 1
a(1)=1973 because 1973 has 11 bits, and 1973 +-1, 1973 +-2, 1973 +-4, 1973 +-8, 1973 +-16, 1973 +-32, 1973 +-64, 1973 +-128, 1973 +-256, 1973 +-512, and 1973 +-2^10 are all composite.
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
- Fred Cohen and J. L. Selfridge, Not every number is the sum or difference of two prime powers, Math. Comput. 29 (1975), pp. 79-81.
- Zhi-Wei Sun, On integers not of the form +-p^a +- q^b, Proceedings of the American Mathematical Society 128:4 (2000), pp. 997-1002.
- Terence Tao, A remark on primality testing and decimal expansions, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413.
- Terence Tao, A remark on primality testing and the binary expansion (blog entry)
-
cmpQ[p_]:=Module[{c=2^Range[0,(IntegerLength[p,2]-1)]},AllTrue[Flatten[p+{c,-c}],CompositeQ]]; Select[Prime[Range[5000]],cmpQ] (* Harvey P. Dale, Jun 04 2023 *)
-
f(p)={v=binary(p);k=#v;for(i=0,k-1,if(isprime(p+2^i)||isprime(p-2^i),return(0))); return(1)}; forprime(p=2, 43759,if(f(p),print1(p,", "))) \\ Washington Bomfim, Jan 18 2011
A256163
Odd numbers m such that for all 2^k < m the numbers m + 2^k, m - 2^k, m*2^k + 1, and m*2^k - 1 are composite, with k >= 1.
Original entry on oeis.org
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
-
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;
-
q[m_] := If[EvenQ[m], False, Module[{pow = 2},While[pow < m && !PrimeQ[m - pow] && !PrimeQ[m + pow] && !PrimeQ[m * pow - 1] && !PrimeQ[m * pow + 1], pow *= 2]; pow > m]]; Select[Range[300000], q] (* Amiram Eldar, Jul 19 2025 *)
-
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
A263644
Odd numbers that are neither of the form p + 2^k nor of the form p - 2^k with k > 0, and p prime.
Original entry on oeis.org
30666137, 31210219, 52109063, 52504261, 55414847, 55876981, 57816799, 60097043, 63723707, 68748319, 79933129, 87747827, 88486403, 93034073, 104218883, 131873509, 138385817, 152485283, 155269609, 158241023, 165795677, 166441831, 177702619, 197903207
Offset: 1
A256237
Primes p such that for all 2^k < p the numbers p + 2^k, p - 2^k, p*2^k + 1, and p*2^k - 1 are composite.
Original entry on oeis.org
8923, 24943, 35437, 42533, 52783, 83437, 105953, 116437, 126631, 133241, 145589, 164729, 172331, 192173, 204013, 215279, 254329, 304709, 308899, 398833, 430499, 436687, 454351, 476869, 479909, 483443, 497597, 522479, 527729, 529103, 545257, 561439, 562651
Offset: 1
Showing 1-5 of 5 results.
Comments