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.

Previous Showing 11-20 of 26 results. Next

A194636 Least k >= 0 such that (2*n-1)*2^k - 1 or (2*n-1)*2^k + 1 is prime, or -1 if no such value exists.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 5, 3, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 3, 3, 1, 3, 6, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 5, 1, 3, 4, 1, 1, 1, 1, 2, 2, 1, 4, 1, 2
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2011

Keywords

Comments

Bisection of A194591: a(n) = A194591(2*n-1).
A194637 gives the record values.

Examples

			For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=1.
		

Crossrefs

Programs

  • Mathematica
    Table[n = 2*n - 1; k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)
    p[n_]:=Module[{c=2n-1,k=0},While[!Or@@PrimeQ[c*2^k+{1,-1}],k++];k]; Array[ p,90] (* Harvey P. Dale, Mar 08 2013 *)

A194638 Smallest prime either of the form (2*n-1)*2^k - 1 or (2*n-1)*2^k + 1, k >= 0, or 0 if no such prime exists.

Original entry on oeis.org

2, 2, 11, 13, 17, 23, 53, 29, 67, 37, 41, 47, 101, 53, 59, 61, 67, 71, 73, 79, 83, 173, 89, 751, 97, 101, 107, 109, 113, 1889, 487, 127, 131, 269, 137, 283, 293, 149, 307, 157, 163, 167, 1361, 173, 179, 181, 373, 191, 193, 197, 809, 823, 211, 857, 6977, 223, 227
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2011

Keywords

Comments

Bisection of A194603.
Primes arising from A194636 (or 0 if no such prime exists).

Examples

			For n=4, 7*2^0-1 and 7*2^0+1 are composite, but 7*2^1-1=13 is prime, so a(4)=13.
		

Crossrefs

Programs

  • Mathematica
    Table[n = 2*n - 1; k = 0; While[! PrimeQ[a = n*2^k - 1] && ! PrimeQ[a = n*2^k + 1], k++]; a, {n, 100}] (* Arkadiusz Wesolowski, Sep 04 2011 *)

A194639 Indices of records in A194591 when it is restricted to odd indices.

Original entry on oeis.org

1, 5, 13, 47, 59, 109, 241, 335, 1109, 1373, 1447, 14893, 52267, 56543, 649603, 838441, 8840101, 16935761, 100604513, 118373279, 270704167, 1355477231
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2011

Keywords

Comments

Integers for which the smallest k in A194591 such that (2*n-1)*2^k - 1 or (2*n-1)*2^k + 1 is prime (A194638) increases.
A194637 gives the record values of A194636.

References

  • Wilfrid Keller, personal communication, 2010.

Crossrefs

Cf. A217892 (indices of records of unrestricted A194591)

Programs

  • Mathematica
    l = -1; Flatten[Table[n = 2*n - 1; k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; If[k > l, l = k; n, {}], {n, 10^5}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)

Extensions

a(22) was found in 2002 by Wilfrid Keller.
Definition corrected by Max Alekseyev and Farideh Firoozbakht, Oct 16 2014

A194607 Record values in A194606.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 11, 17, 20, 28, 70, 99, 150, 726, 7431, 22394, 85461, 191207
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 30 2011

Keywords

Comments

The index sequence of this one is 1, 3, 6, 15, 17, 29, 53, 115, 186, 220, 229, 1886, 5344, 5736, 66774, 1087403, 14747671, 158018119.
a(17) was found in 2000 by Wilfrid Keller and a(18) was found in 2003 by Patrick De Geest.

Examples

			A194606(53) = 11 since A194606(115) = 17 is the next record value.
		

References

  • Wilfrid Keller, personal communication, 2010.

Crossrefs

Programs

  • Mathematica
    l = -1; Flatten[Table[p = Prime[n]; k = 0; While[! PrimeQ[p*2^k - 1] && ! PrimeQ[p*2^k + 1], k++]; If[k > l, l = k, {}], {n, 10^4}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)

A194637 Record values in A194636.

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 11, 18, 20, 28, 70, 106, 150, 726, 2906, 7431, 14073, 22394, 41422, 82587, 85461, 356981
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2011

Keywords

Comments

The index sequence is 1, 3, 7, 24, 30, 55, 121, 168, 555, 687, 724, 7447, 26134, 28272, 324802, 419221, 4420051, 8467881, 50302257, 59186640, 135352084, 677738616, ... given by formula (A194639(n)+1)/2.

Examples

			A194636(55) = 6 since A194636(121) = 11 is the next record value.
		

References

  • Wilfrid Keller, personal communication, 2010.

Crossrefs

Programs

  • Mathematica
    l = -1; Flatten[Table[n = 2*n - 1; k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; If[k > l, l = k, {}], {n, 10^5}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)

Formula

a(n) = A194591(A194639(n)) = A194636((A194639(n)+1)/2).

Extensions

a(22) was found in 2002 by Wilfrid Keller.

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

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.

A364413 Odd numbers m such that for every k >= 1, m*2^k + 1 has a divisor in the set {3, 7, 11, 19, 31, 37, 41, 61, 73, 109, 151, 331}.

Original entry on oeis.org

189035277393779, 212050850472529, 618127765127603, 777947701660121, 1171304921532749, 1358735367828947, 1834310020939021, 2357654372323739, 2638037471052913, 3025664372930897, 3935005074246167, 4688754513654559, 4996748200142999, 5425272498782051, 5455203077891285
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 23 2023

Keywords

Crossrefs

Formula

For n > 34560, a(n) = a(n-34560) + 10014447295554878022.

A263347 Odd numbers n such that for every k >= 1, n*2^k + 1 has a divisor in the set {3, 5, 13, 17, 97, 241, 257}.

Original entry on oeis.org

37158601, 1017439067, 1242117623, 1554424697, 1905955429, 2727763433, 4512543497, 4798554619, 4954643117, 4988327659, 5367644183, 5660978867, 6107173883, 7173264623, 7425967459, 8365215091, 8776906457, 9013226179, 9095014883, 9787717801, 10466795551
Offset: 1

Views

Author

Arkadiusz Wesolowski, Oct 15 2015

Keywords

Comments

Cohen and Selfridge showed that this sequence contains infinitely many numbers that are both Sierpiński and Riesel.
What is the smallest term of this sequence that belongs to A076335? Is it the smallest Brier number?
This sequence contains only numbers of the form 30*k + 1, 30*k + 17, 30*k + 19, and 30*k + 23.

Crossrefs

Subsequence of A076336.
A263560 gives the primes.

Formula

a(n) = a(n-96) + 39832304070 for n > 96.
Previous Showing 11-20 of 26 results. Next