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

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

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, Aug 29 2011

Keywords

Comments

Fred Cohen and J. L. Selfridge showed that a(n) = -1 infinitely often.
a(n) = 0 iff n is in A045718.

Examples

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

Crossrefs

Cf. A217892 and A194600 (indices and values of the records).

Programs

  • Mathematica
    Table[k = 0; While[! PrimeQ[n*2^k - 1] && ! PrimeQ[n*2^k + 1], k++]; k, {n, 100}] (* T. D. Noe, Aug 29 2011 *)

Formula

If a(n)>0, then a(2n)=a(n)-1.

A194600 Record values in A194591.

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, Aug 30 2011

Keywords

Comments

Indices of records are given by A217892.

Examples

			A194591(59) = 5 since A194591(109) = 6 is the next record value.
		

References

  • Wilfrid Keller, personal communication, 2010.

Crossrefs

Programs

  • Mathematica
    l = -1; Flatten[Table[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 *)

Extensions

a(23)=A194637(22) from Wilfrid Keller, added by Max Alekseyev, Oct 18 2014

A194635 Indices of records in A194591 restricted to prime indices.

Original entry on oeis.org

2, 5, 13, 47, 59, 109, 241, 631, 1109, 1373, 1447, 16229, 52267, 56543, 838441, 16935761, 270704167, 3296757029
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 31 2011

Keywords

Comments

Integers for which the smallest k in A194591 such that prime(n)*2^k - 1 or prime(n)*2^k + 1 is prime (A194608) increases.
a(19) > 10^10.
A194607 gives the record values of A194606.

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; p, {}], {n, 10^4}]] (* Arkadiusz Wesolowski, Sep 04 2011 *)

Extensions

a(17) was found in 2000 by Wilfrid Keller
a(18) was found in 2003 by Patrick De Geest
Edited by Max Alekseyev, Oct 14 2012
Edited by Arkadiusz Wesolowski, Sep 11 2013

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
Showing 1-4 of 4 results.