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

A260689 Table read by rows: numbers m such that (2*n-m, 2*n+m) is a prime pair.

Original entry on oeis.org

1, 1, 3, 5, 3, 7, 1, 5, 7, 3, 9, 3, 13, 1, 5, 11, 13, 3, 9, 17, 9, 15, 19, 5, 7, 13, 17, 19, 3, 15, 21, 9, 15, 25, 1, 7, 11, 13, 17, 23, 9, 15, 21, 27, 29, 3, 27, 5, 7, 17, 23, 25, 31, 9, 15, 21, 33, 35, 3, 21, 27, 33, 1, 5, 11, 19, 25, 29, 31, 37, 3, 15, 27
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Comments

1 <= T(n,k) <= 2*n-3; T(n,2) > 3 for n > 3; all terms are odd;
A264526(n) = T(n,1);
A264527(n) = T(n,A069360(n));
T(A040040(n),1) = 1;
T(A088763(n),1) = 3.

Examples

			.   n | T(n,k)          | (2*n-T(n,k), 2*n+T(n,k))       k=1..A069360(n)
. ----+-----------------+-----------------------------------------------
.   2 | 1               | (3,5)
.   3 | 1               | (5,7)
.   4 | 3,5             | (5,11) (3,13)
.   5 | 3,7             | (7,13) (3,17)
.   6 | 1,5,7           | (11,13) (7,17) (5,19)
.   7 | 3,9             | (11,17) (5,23)
.   8 | 3,13            | (13,19) (3,29)
.   9 | 1,5,11,13       | (17,19) (13,23) (7,29) (5,31)
.  10 | 3,9,17          | (17,23) (11,29) (3,37)
.  11 | 9,15,19         | (13,31) (7,37) (3,41)
.  12 | 5,7,13,17,19    | (19,29) (17,31) (11,37) (7,41) (5,43)
.  13 | 3,15,21         | (23,29) (11,41) (5,47)
.  14 | 9,15,25         | (19,37) (13,43) (3,53)
.  15 | 1,7,11,13,17,23 | (29,31) (23,37) (19,41) (17,43) (13,47) (7,53)
.  16 | 9,15,21,27,29   | (23,41) (17,47) (11,53) (5,59) (3,61)
.  17 | 3,27            | (31,37) (7,61)
.  18 | 5,7,17,23,25,31 | (31,41) (29,43) (19,53) (13,59) (11,61) (5,67)
.  19 | 9,15,21,33,35   | (29,47) (23,53) (17,59) (5,71) (3,73)
.  20 | 3,21,27,33      | (37,43) (19,61) (13,67) (7,73) .
		

Crossrefs

Cf. A069360 (row lengths), A010051, A264526, A264527.

Programs

  • Haskell
    a260689 n k = a260689_tabf !! (n-2) !! (k-1)
    a260689_row n = [m | m <- [1, 3 .. 2 * n - 3],
                         a010051' (2*n + m) == 1, a010051' (2*n - m) == 1]
    a260689_tabf = map a260689_row [2..]

A264526 Smallest number m such that both 2*n-m and 2*n+m are primes.

Original entry on oeis.org

1, 1, 3, 3, 1, 3, 3, 1, 3, 9, 5, 3, 9, 1, 9, 3, 5, 9, 3, 1, 3, 15, 5, 3, 9, 7, 3, 15, 1, 9, 3, 5, 15, 3, 1, 15, 3, 5, 9, 15, 5, 3, 9, 7, 9, 15, 7, 9, 3, 1, 3, 3, 1, 3, 15, 13, 15, 9, 7, 9, 15, 13, 21, 21, 5, 3, 27, 1, 9, 15, 5, 33, 9, 1, 15, 3, 7, 9, 3, 5
Offset: 2

Views

Author

Reinhard Zumkeller, Nov 17 2015

Keywords

Crossrefs

Programs

  • Haskell
    a264526 = head . a260689_row
    
  • Mathematica
    snm[n_]:=Module[{m=1},While[!PrimeQ[2n-m]||!PrimeQ[2n+m],m=m+2];m]; Array[ snm,90,2] (* Harvey P. Dale, Aug 13 2017, optimized by Ivan N. Ianakiev, Mar 16 2018 *)
  • PARI
    a(n) = {my(m=1); while(!(isprime(2*n-m) && isprime(2*n+m)), m+=2); m;} \\ Michel Marcus, Mar 18 2018

Formula

a(n) = A260689(n,1);
a(A040040(n)) = 1;
a(A014574(n)/2) = 1;
a(A088763(n)) = 3.
a(n) = A082467(2n). - Ivan N. Ianakiev, Oct 27 2021
Showing 1-2 of 2 results.