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.

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