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.

A118534 a(n) is the largest k such that prime(n+1) = prime(n) + (prime(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 3, 0, 9, 9, 15, 15, 17, 27, 25, 33, 39, 39, 41, 47, 57, 55, 63, 69, 67, 75, 77, 81, 93, 99, 99, 105, 105, 99, 123, 125, 135, 129, 147, 145, 151, 159, 161, 167, 177, 171, 189, 189, 195, 187, 199, 219, 225, 225, 227, 237, 231, 245, 251, 257, 267, 265, 273, 279
Offset: 1

Views

Author

Rémi Eismann, Apr 18 2006, Feb 14 2008

Keywords

Comments

a(n) = prime(n) - g(n) or A000040(n) - A001223(n) if prime(n) - g(n) > g(n), 0 otherwise.
a(n) = 0 only for primes 2, 3 and 7.
Under the twin prime conjecture prime(n+1)-prime(n) = 2 infinitely often, and from that we can conclude that k=prime(n)-2 infinitely often. [Roderick MacPhee, Jul 24 2012]
a(n) = A062234(n) for 5 <= n <= 1000. - Georg Fischer, Oct 28 2018

Examples

			n=5: prime(5) = 11, prime(6) = 13, 13 = 11 + (11 mod 3) = 11 + (11 mod 9), so A117078(5) = 3, a(5) = 9 and A117563(5) = 9/3 = 3. Thus 11 has level 3 and so is a member of A117873.
		

Crossrefs

Cf. A062234, A117078; essentially the same as A117563.

Programs

  • Mathematica
    a[n_] := If[n == 1 || n == 2 || n == 4, 0, 2Prime[n] - Prime[n + 1]]; Array[a, 62] (* Robert G. Wilson v, May 09 2006 *)

Extensions

Edited by N. J. A. Sloane, May 07 2006
More terms from Robert G. Wilson v, May 09 2006

A118481 Primes for which the level is equal to 9 in A117563.

Original entry on oeis.org

29, 67, 89, 181, 293, 811, 919, 1153, 1801, 2017, 2053, 2113, 2647, 3373, 3469, 3583, 4057, 5153, 5581, 6481, 6553, 7727, 8209, 8447, 8467, 8543, 8867, 9887, 10009, 10477, 11027, 11743, 12601, 13249, 13421, 13729, 13789, 15017, 15391, 17011, 17123, 18919
Offset: 1

Views

Author

Rémi Eismann, May 05 2006

Keywords

Examples

			Prime(310) has level 9: prime(311) = prime(310)+prime(310) mod(227) = prime(310)+prime(310) mod(2043) = 2063
		

Crossrefs

Extensions

Edited by N. J. A. Sloane, May 14 2006
Term a(19) and beyond from b-file by Andrew Howroyd, Feb 05 2018

A118122 Least prime of level 2n-1 (cf. A117563).

Original entry on oeis.org

5, 11, 17, 509, 29, 83, 41, 79, 887, 59, 109, 71, 331, 193, 383, 190717, 101, 107, 787, 277, 1129, 911, 137, 1181, 149, 463, 1013, 839, 1087, 179, 433, 191, 197, 4093, 349, 503, 2423, 227, 701, 239, 5378731, 587, 601, 439, 269, 6491, 281, 1621, 877, 499
Offset: 1

Views

Author

Keywords

Examples

			The first occurrence of 1 in A117563 is a(3) which implies the third prime which is 5.
The first occurrence of 3 in A117562 is a(5) which implies the fifth prime which is 11.
The first occurrence of 5 in A117562 is a(7) which implies the seventh prime which is 17, etc.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[n == 1, 0, Block[{p = Prime@n, np = Prime[n + 1]}, (2p - np)/Min@Select[Divisors[2p - np], # >= np - p &]]]; t = Table[0, {100}]; Do[a = (f@n + 1)/2; If[a < 101 && t[[a]] == 0, t[[a]] = Prime@n; Print[{a, n, Prime@n}]], {n, 10^6}]

Formula

Levels of primes are defined in A117563. Conjecture: there are an infinite number of prime members at each level.

A118574 Primes for which the level is equal to 79 in A117563.

Original entry on oeis.org

239, 719, 1033, 1193, 2143, 2777, 3889, 5953, 15917879, 16427897, 16754483, 24597451, 24612613, 27756503, 28261307, 28863287, 30493373, 30953633, 33444023, 34346203, 41488301, 44980259, 45796943, 50146069, 50682479
Offset: 1

Views

Author

Rémi Eismann and Fabien Sibenaler, May 07 2006

Keywords

Examples

			1039 = 1033 + 1033 mod(13) = 1033 + 1033 mod(1027), 1033 has level 1027/13 = 79.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{p = Prime@n, np = Prime[n + 1]}, (2p - np)/Min@Select[Divisors[2p - np], # >= np - p &] == 79]; lst = {}; Do[ If[fQ@n, AppendTo[lst, Prime@n]], {n, 10^7}]; lst (* Robert G. Wilson v, May 09 2006 *)

Extensions

More terms from Robert G. Wilson v, May 09 2006
Showing 1-4 of 4 results.