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

A174350 Square array: row n >= 1 lists the primes p for which the next prime is p+2n; read by antidiagonals.

Original entry on oeis.org

3, 5, 7, 11, 13, 23, 17, 19, 31, 89, 29, 37, 47, 359, 139, 41, 43, 53, 389, 181, 199, 59, 67, 61, 401, 241, 211, 113, 71, 79, 73, 449, 283, 467, 293, 1831, 101, 97, 83, 479, 337, 509, 317, 1933, 523, 107, 103, 131, 491, 409, 619, 773, 2113, 1069, 887
Offset: 1

Views

Author

Clark Kimberling, Mar 16 2010

Keywords

Comments

Every odd prime p = prime(i), i > 1, occurs in this array, in row (prime(i+1) - prime(i))/2. Polignac's conjecture states that each row contains an infinite number of indices. In case this does not hold, we can use the convention to continue finite rows with 0's, to ensure the sequence is well defined. - M. F. Hasler, Oct 19 2018
A permutation of the odd primes (A065091). - Robert G. Wilson v, Sep 13 2022

Examples

			Upper left hand corner of the array:
     3     5    11    17    29    41    59    71   101 ...
     7    13    19    37    43    67    79    97   103 ...
    23    31    47    53    61    73    83   131   151 ...
    89   359   389   401   449   479   491   683   701 ...
   139   181   241   283   337   409   421   547   577 ...
   199   211   467   509   619   661   797   997  1201 ...
   113   293   317   773   839   863   953  1409  1583 ...
  1831  1933  2113  2221  2251  2593  2803  3121  3373 ...
   523  1069  1259  1381  1759  1913  2161  2503  2861 ...
  (...)
Row 1: p(2) = 3, p(3) = 5, p(5) = 11, p(7) = 17,... these being the primes for which the next prime is 2 greater: (lesser of) twin primes A001359.
Row 2: p(4) = 7, p(6) = 13, p(8) = 19,... these being the primes for which the next prime is 4 greater: (lesser of) cousin primes A029710.
		

Crossrefs

Rows 35, 40, 45, 50, ...: A204792, A126722, A204764, A050434 (row 50), A204801, A204672, A204802, A204803, A126724 (row 75), A184984, A204805, A204673, A204806, A204807 (row 100); A224472 (row 150).
Column 1: A000230.
Column 2: A046789.

Programs

  • Mathematica
    rows = 10; t2 = {}; Do[t = {}; p = Prime[2]; While[Length[t] < rows - off + 1, nextP = NextPrime[p]; If[nextP - p == 2*off, AppendTo[t, p]]; p = nextP]; AppendTo[t2, t], {off, rows}]; Table[t2[[b, a - b + 1]], {a, rows}, {b, a}] (* T. D. Noe, Feb 11 2014 *)
    t[r_, 0] = 2; t[r_, c_] := Block[{p = NextPrime@ t[r, c - 1], q}, q = NextPrime@ p; While[ p + 2r != q, p = q; q = NextPrime@ q]; p]; Table[ t[r - c + 1, c], {r, 10}, {c, r, 1, -1}] (* Robert G. Wilson v, Nov 06 2020 *)
  • PARI
    A174350_row(g, N=50, i=0, p=prime(i+1), L=[])={g*=2; forprime(q=1+p, , i++; if(p+g==p=q, L=concat(L, q-g); N--||return(L)))} \\ Returns the first N terms of row g. - M. F. Hasler, Oct 19 2018

Formula

a(n) = A000040(A174349(n)). - Michel Marcus, Mar 30 2016

Extensions

Definition corrected and other edits by M. F. Hasler, Oct 19 2018

A320704 Indices of primes followed by a gap (distance to next larger prime) of 12.

Original entry on oeis.org

46, 47, 91, 97, 114, 121, 139, 168, 197, 203, 214, 232, 239, 240, 242, 267, 278, 280, 290, 312, 317, 342, 357, 363, 376, 381, 404, 423, 437, 439, 449, 452, 461, 470, 472, 489, 499, 511, 546, 550, 562, 565, 599, 600, 617, 633, 634, 647, 653, 657, 675, 680, 692, 698, 716, 728
Offset: 1

Views

Author

M. F. Hasler, Oct 19 2018

Keywords

Comments

Indices of the primes given in A031930.

Crossrefs

Equals A000720 o A031930.
Row 6 of A174349.
Indices of 12's in A001223.
Cf. A029707, A029709, A320701, A320702, ..., A320720 (analog for gaps 2, 4, 6, 8, ..., 44), A116493 (gap 70), A116496 (gap 100), A116497 (gap 200), A116495 (gap 210).

Programs

  • Magma
    [n: n in [1..1000] | NthPrime(n+1) - NthPrime(n) eq 12]; // Vincenzo Librandi, Mar 21 2019
  • Mathematica
    Select[Range[1000], Prime[#] + 12 == Prime[# + 1] &] (* Vincenzo Librandi, Mar 21 2019 *)
  • PARI
    A320704_vec(N=100,g=12,p=2,i=primepi(p)-1,L=List())={forprime(q=1+p,,i++; if(p+g==p=q, listput(L,i); N--||break));Vec(L)} \\ returns the list of first N terms of the sequence
    

Formula

a(n) = A000720(A031930(n)).
A320704 = { i > 0 | prime(i+1) = prime(i) + 12 }.

A379239 Numbers k for which A003961(k)-sigma(k) is prime, where A003961 is fully multiplicative with a(prime(i)) = prime(i+1), and sigma is the sum of divisors function.

Original entry on oeis.org

4, 6, 7, 10, 12, 13, 15, 19, 21, 22, 23, 28, 31, 33, 34, 35, 37, 39, 43, 45, 47, 48, 51, 53, 55, 58, 61, 67, 73, 76, 77, 79, 82, 83, 84, 89, 95, 97, 103, 105, 109, 111, 112, 113, 115, 118, 123, 124, 127, 129, 131, 141, 142, 143, 145, 148, 151, 153, 155, 156, 157, 159, 161, 163, 165, 167, 173, 185, 187, 192, 193, 199
Offset: 1

Views

Author

Antti Karttunen, Dec 23 2024

Keywords

Examples

			10 is included as A003961(10)-sigma(10) = 21-18 = 3 which is prime.
13 is included as A003961(13)-sigma(13) = 17-14 = 3 which is prime.
23 is included as A003961(23)-sigma(23) = 29-24 = 5 which is prime.
		

Crossrefs

Cf. A000203, A003961, A286385, A379238 (characteristic function).
Subsequences: A023200, A031924, A031926, A031930, A031932, A031936, A031938, etc, i.e., all primes for which the gap to the next prime is one more than some prime.
Cf. also A349165.

Programs

A231609 Table whose n-th row consists of primes p such that p + 2n is the next prime, read by antidiagonals.

Original entry on oeis.org

3, 7, 5, 23, 13, 11, 89, 31, 19, 17, 139, 359, 47, 37, 29, 199, 181, 389, 53, 43, 41, 113, 211, 241, 401, 61, 67, 59, 1831, 293, 467, 283, 449, 73, 79, 71, 523, 1933, 317, 509, 337, 479, 83, 97, 101, 887, 1069, 2113, 773, 619, 409, 491, 131, 103, 107
Offset: 1

Views

Author

T. D. Noe, Nov 26 2013

Keywords

Comments

The plot has an unusual gap near 10^5. Why?

Examples

			The following sequences are read by antidiagonals
{   3,    5,   11,   17,   29,   41,   59,   71,  101,  107, ...}
{   7,   13,   19,   37,   43,   67,   79,   97,  103,  109, ...}
{  23,   31,   47,   53,   61,   73,   83,  131,  151,  157, ...}
{  89,  359,  389,  401,  449,  479,  491,  683,  701,  719, ...}
{ 139,  181,  241,  283,  337,  409,  421,  547,  577,  631, ...}
{ 199,  211,  467,  509,  619,  661,  797,  997, 1201, 1237, ...}
{ 113,  293,  317,  773,  839,  863,  953, 1409, 1583, 1847, ...}
{1831, 1933, 2113, 2221, 2251, 2593, 2803, 3121, 3373, 3391, ...}
{ 523, 1069, 1259, 1381, 1759, 1913, 2161, 2503, 2861, 3803, ...}
{ 887, 1637, 3089, 3413, 3947, 5717, 5903, 5987, 6803, 7649, ...}
...
		

Crossrefs

Cf. A000230 (numbers in first column).

Programs

  • Mathematica
    nn = 10; t = Table[{}, {nn}]; complete = 0; lastP = 3; While[complete < nn, p = NextPrime[lastP]; diff = p - lastP; If[diff <= 2*nn && Length[t[[diff/2]]] < nn - diff/2 + 1, AppendTo[t[[diff/2]], lastP]; If[Length[t[[diff/2]]] == nn - diff/2 + 1, complete++]]; lastP = p]; t2 = PadRight[t, {nn, nn}, 0]; Table[t2[[n-j+1, j]], {n, nn}, {j, n}]

A052258 Last filtering prime (A052180) of primes p such that next prime is p+12.

Original entry on oeis.org

11, 13, 11, 11, 17, 23, 17, 19, 17, 29, 13, 13, 19, 37, 29, 29, 11, 23, 31, 31, 11, 11, 29, 31, 29, 43, 11, 29, 43, 37, 19, 31, 13, 47, 17, 31, 43, 19, 31, 13, 61, 11, 53, 11, 47, 43, 37, 17, 19, 13, 71, 11, 41, 23, 61, 37, 19, 17, 41, 61, 19, 17, 59, 13, 47, 79, 37, 13, 71
Offset: 1

Views

Author

Labos Elemer, Feb 02 2000

Keywords

Crossrefs

A368640 a(0) = 2; for n > 0, a(n) is the smallest prime that differs from the next prime by 2n and is not part of a run of 3 or more consecutive primes in arithmetic progression, or -1 if no such prime exists.

Original entry on oeis.org

2, 11, 7, 23, 89, 139, 467, 113, 1831, 523, 887, 1129, 1669, 2477, 2971, 4297, 5591, 1327, 9551, 30593, 19333, 16141, 15683, 81463, 28229, 31907, 19609, 35617, 82073, 44293, 43331, 34061, 89689, 162143, 134513, 173359, 31397, 404597, 212701, 188029, 542603, 265621
Offset: 0

Views

Author

Jon E. Schoenfield, Jan 01 2024

Keywords

Comments

Equivalently, a(0) = 2, and for n > 0, a(n) is the smallest prime p such that NextPrime(p) - p = 2n but neither p - PreviousPrime(p) nor NextPrime(NextPrime(p)) - NextPrime(p) is equal to 2n, or -1 if no such prime p exists.
Stated yet another way: define an array A such that A(i,j) is the smallest prime that is at the start of a run of exactly i consecutive prime gaps of size exactly j, or -1 if no such prime exists; then a(0) = 2 and, for n > 0, a(n) = A(1,2n).
Conjecture: a(n) is never -1.

Examples

			a(1) is the smallest prime that differs from the next prime by 2 and is not part of a run of 3 or more consecutive primes in arithmetic progression. (Thus a(1) is the smallest prime p that is the lesser of a twin prime pair (p,q) (cf. A001359) where neither p nor q is part of another twin prime pair.) The primes 3, 5, 7 are in arithmetic progression with difference 2, so none of those primes is a(1); the smallest prime that meets the requirements is 11, so a(1) = 11.
a(6) is the smallest prime that differs from the next prime by 12 and is not part of a run of 3 or more consecutive primes in arithmetic progression. Primes that differ from the next prime by 12 are 199, 211, 467, 509, 619, ... (cf. A031930), but 199 and 211 are part of a run of three consecutive primes in arithmetic progression (199, 211, and 223). Thus, since PreviousPrime(467) != 455 and NextPrime(479) != 491, 467 is not in a run of three or more consecutive primes in arithmetic progression, so a(6) = 467.
		

Crossrefs

Formula

a(n) >= A000230(n).
Previous Showing 11-16 of 16 results.