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.

A071407 Least k such that k*prime(n) + 1 and k*prime(n) - 1 are twin primes.

Original entry on oeis.org

2, 2, 6, 6, 18, 24, 6, 12, 6, 12, 42, 54, 30, 24, 6, 120, 18, 258, 24, 18, 84, 132, 54, 48, 114, 42, 6, 6, 48, 24, 144, 30, 6, 12, 12, 78, 24, 36, 30, 54, 132, 18, 90, 36, 66, 18, 42, 30, 120, 30, 36, 42, 18, 18, 54, 84, 60, 12, 210, 12, 6, 60, 150, 102, 6, 210, 30, 24, 6
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Note that 6 divides a(n) for n > 2. - T. D. Noe, Jan 07 2013

Examples

			n=4: prime(4)=7, a(4)=6 because 6*prime(4)=42 and {41,43} are primes.
		

Crossrefs

Cf. A071558 (k at every integer).
Cf. A220141, A220142 (record values).

Programs

  • Haskell
    a071407 n = head [k | k <- [2,4..], let x = k * a000040 n,
                          a010051' (x - 1) == 1, a010051' (x + 1) == 1]
    -- Reinhard Zumkeller, Feb 14 2013
  • Mathematica
    Table[fl=1; Do[s=(Prime[j])*k; If[PrimeQ[s-1]&&PrimeQ[s+1]&&Equal[fl, 1], Print[{j, k}]; fl=0], {k, 1, 2*j^2}], {j, 0, 100}]

Formula

From Amiram Eldar, Aug 25 2025: (Start)
a(n) = A090530(n) / prime(n).
a(n) = 6 * A294731(n) for n >= 3. (End)

A220141 Prime numbers p that yield a new record for the least number k such that p*k + 1 and p*k - 1 are twin primes.

Original entry on oeis.org

2, 5, 11, 13, 31, 37, 53, 61, 433, 3023, 3989, 4079, 9967, 10789, 76943, 81439, 121763, 233969, 491333, 495931, 795659, 1653901, 2623969, 3516277, 6274823, 10536689, 11313839, 12023191, 16268899, 22829309, 38968109, 41230733, 45057577, 76384717, 98566373, 552843883
Offset: 1

Views

Author

T. D. Noe, Jan 08 2013

Keywords

Comments

These are the primes at which A071407 reaches a new record. The corresponding values of k are in A220142.

Crossrefs

Programs

  • Mathematica
    t = {{2, 2}}; Do[k = 1; While[! (PrimeQ[k*n - 1] && PrimeQ[k*n + 1]), k++]; If[k > t[[-1, 2]], AppendTo[t, {n, k}]], {n, Prime[Range[2, 1000]]}]; Transpose[t][[1]]

Extensions

More terms from Amiram Eldar, Dec 30 2019
Showing 1-2 of 2 results.