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-3 of 3 results.

A256164 Number of terms in A256163 less than 10^n.

Original entry on oeis.org

0, 1, 1, 1, 3, 10, 161, 2342, 27216, 317155, 3505277, 38127106
Offset: 0

Views

Author

Arkadiusz Wesolowski, Mar 17 2015

Keywords

Crossrefs

Programs

  • PARI
    isA256163(m) = if(!(m % 2), 0, my(pow = 2); while(pow < m && !isprime(m - pow) && !isprime(m + pow) && !isprime(m*pow - 1) && !isprime(m*pow + 1), pow *= 2); pow > m);
    list(len) = {my(pow = 10, c = 0); print1(0, ", "); for(k = 1, 10^len, if(isA256163(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

A255967 Odd numbers m that are neither of the form p + 2^k nor of the form p - 2^k with 2^k < m, k >= 1, and p prime.

Original entry on oeis.org

1, 1973, 3181, 3967, 4889, 5617, 7747, 7913, 8363, 8587, 8923, 11437, 11993, 12517, 13285, 13973, 14101, 14231, 14489, 16117, 16769, 16849, 18391, 18611, 19583, 19819, 21289, 21683, 21701, 21893, 22147, 22817, 22949, 23651, 24943, 25829, 27197, 27437
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 12 2015

Keywords

Comments

Odd numbers m such that for all 2^k < m the numbers m + 2^k and m - 2^k are composite, with k >= 1.

Crossrefs

Cf. A076335.
Subsequence of A006285. Supersequence of A256163.
A153352 gives the primes.

Programs

  • Magma
    lst:=[]; for n in [1..27437 by 2] do t:=0; k:=0; while 2^k lt n do if IsPrime(n-2^k) or IsPrime(n+2^k) 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], pow *= 2]; pow > m]]; Select[Range[30000], q] (* Amiram Eldar, Jul 19 2025 *)
  • PARI
    isok(m) = if(!(m % 2), 0, my(pow = 2); while(pow < m && !isprime(m - pow) && !isprime(m + pow), pow *= 2); pow > m); \\ Amiram Eldar, Jul 19 2025

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-3 of 3 results.