cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

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

Views

Author

Arkadiusz Wesolowski, Mar 12 2015

Keywords

Crossrefs

Programs

  • PARI
    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

Extensions

a(9)-a(11) from 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

Views

Author

Keywords

Comments

Sun showed that the sequence is of positive density in the primes; in particular, of relative density >= 7.9 * 10^-29 = 1/phi(66483034025018711639862527490).
Terry Tao gives this sequence explicitly (p. 1) and generalizes Sun's result.

Examples

			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.
		

Crossrefs

Cf. A065092.
Subsequence of A255967.

Programs

  • Mathematica
    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 *)
  • PARI
    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

Extensions

Edited by 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

Views

Author

Arkadiusz Wesolowski, Mar 17 2015

Keywords

Crossrefs

Subsequence of A255967.
A256237 gives the primes.

Programs

  • 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;
    
  • Mathematica
    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 *)
  • 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

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

Views

Author

Arkadiusz Wesolowski, Oct 22 2015

Keywords

Comments

Odd n such that for all k > 0 the numbers n + 2^k and n - 2^k are nonprimes.

Crossrefs

Cf. A006285, A076335, A076336. Subsequence of A255967. A263645 gives the primes.

Formula

A006285 INTERSECT A076336.

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

Views

Author

Arkadiusz Wesolowski, Mar 20 2015

Keywords

Crossrefs

Subsequence of A256163.

Programs

  • Magma
    lst:=[]; for p in [3..562651 by 2] do if IsPrime(p) then t:=0; k:=0; while 2^k lt p do if IsPrime(p-2^k) or IsPrime(p+2^k) or IsPrime(p*2^k-1) or IsPrime(p*2^k+1) then t:=1; break; end if; k+:=1; end while; if IsZero(t) then Append(~lst, p); end if; end if; end for; lst;
Showing 1-5 of 5 results.