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

A060212 Primes q such that 6*q-1 and 6*q+1 are twin primes. Proper subset of A002822.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 47, 103, 107, 137, 283, 313, 347, 373, 397, 443, 467, 577, 593, 653, 773, 787, 907, 1033, 1117, 1423, 1433, 1613, 1823, 2027, 2063, 2137, 2153, 2203, 2287, 2293, 2333, 2347, 2677, 2903, 3257, 3307, 3407, 3413, 3593, 3623, 3673, 3923
Offset: 1

Views

Author

Labos Elemer, Mar 20 2001

Keywords

Comments

Primes in A182521. Also all primes p for which A182481(p)=1. - Vladimir Shevelev, May 03 2012
Conjecture: a(n) ~ n*log(n)*log(n*log(n))*log(log(n)). - Carl R. White, Nov 16 2023

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[6*p-1] && PrimeQ[6*p+1], AppendTo[lst,p]], {n,100}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
  • PARI
    forprime(p=2, 9999, if(isprime(6*p+1) & isprime(6*p-1), print(p))) \\ David Radcliffe, Apr 02 2016
    
  • Python
    from sympy import *; print([p for p in primerange(2,9999) if isprime(6*p-1) and isprime(6*p+1)]) # David Radcliffe, Apr 02 2016

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)

A090530 Least multiple k of prime(n) such that (k-1,k+1) forms a twin prime pair, or 0 if no such number exists.

Original entry on oeis.org

4, 6, 30, 42, 198, 312, 102, 228, 138, 348, 1302, 1998, 1230, 1032, 282, 6360, 1062, 15738, 1608, 1278, 6132, 10428, 4482, 4272, 11058, 4242, 618, 642, 5232, 2712, 18288, 3930, 822, 1668, 1788, 11778, 3768, 5868, 5010, 9342, 23628, 3258, 17190
Offset: 1

Views

Author

Amarnath Murthy, Dec 07 2003

Keywords

Comments

a(n) is a multiple of 6*prime(n) for n>2. Conjecture: No term is zero.

Examples

			a(5) = 198 = 11*18, (197,199) forms a twin prime pair.
		

Crossrefs

Cf. A014574, A071407, A090531, A294731 [a(n)/(6*prime(n))].

Programs

  • Mathematica
    For[n = 1, n < 40, n++, a := Prime[n]; k := 2; While[Not[PrimeQ[k*a + 1] && PrimeQ[k*a - 1]], k += 2]; Print[k*a]] (* Stefan Steinerberger, Feb 17 2006 *)
  • PARI
    a(n) = { my(k = 2, p = prime(n)); while (! (isprime(k*p-1) && isprime(k*p+1)), k++); k*p;} \\ Michel Marcus, Nov 12 2017

Formula

a(n) = prime(n) * A071407(n). - Amiram Eldar, Aug 25 2025

Extensions

More terms from David Wasserman, Dec 21 2005
More terms from Stefan Steinerberger, Feb 17 2006

A386724 Twin primes p such that 6p+1, 6p-1 is a twin prime pair.

Original entry on oeis.org

3, 5, 7, 17, 103, 107, 137, 283, 313, 347, 1033, 2027, 3257, 3673, 4217, 4547, 5023, 9433, 9767, 11833, 14593, 15137, 15733, 18253, 19423, 20717, 20983, 23537, 25847, 26113, 28753, 32057, 32323, 33073, 35053, 37307, 38327, 39163, 43607, 44623, 46183, 46273, 47743, 48407
Offset: 1

Views

Author

Marc Morgenegg, Jul 31 2025

Keywords

Comments

{3,5} and {5,7} are the only twin prime pairs occurring in this since (6p-1)*(6p+1)*(6p+11)*(6p+13) is always divisible by 5. Therefore the smallest possible gaps for p>7 is 4 (cousin primes).

Crossrefs

Cf. A002822, A001359, A014574, A176131 (subsequence), A182481, A294731. Subset of A060212.

Programs

  • Maple
    q:= p-> isprime(p) and ormap(isprime, [p-2, p+2]) and andmap(isprime, [6*p-1, 6*p+1]):
    select(q, [2*i+1$i=1..25000])[];  # Alois P. Heinz, Jul 31 2025
  • Mathematica
    Select[Prime[Range[5000]], Or @@ PrimeQ[# + {-2, 2}] && And @@ PrimeQ[6*# + {-1, 1}] &] (* Amiram Eldar, Jul 31 2025 *)

Extensions

More terms from Pontus von Brömssen, Jul 31 2025

A387287 Primes in the order of their first appearance among the factors of the averages of twin prime pairs.

Original entry on oeis.org

2, 3, 5, 7, 17, 23, 11, 19, 47, 13, 29, 103, 107, 137, 43, 59, 41, 71, 31, 67, 139, 283, 149, 313, 37, 347, 373, 397, 443, 113, 467, 271, 181, 281, 577, 593, 199, 157, 653, 131, 101, 89, 241, 83, 251, 379, 773, 787, 167, 109, 907, 163, 73, 1033, 53, 223, 1117
Offset: 1

Views

Author

Tamas Sandor Nagy, Aug 25 2025

Keywords

Comments

Will every prime appear, so that this sequence is a permutation of the primes?
The answer is yes if A071256(n) exists for every n. - Robert Israel, Aug 25 2025

Examples

			a(1) = 2 because 2 appeared first as a prime factor of the average of a twin prime pair, namely of 4 = 2*2 = 2^2, the average of 3 and 5, the first twin prime pair.
a(2) = 3 because 3 appeared next as a prime factor of the average of a twin prime pair, here 6 = 2*3, of the twin primes 5 and 7.
a(3) = 5 because 5 appeared next as a prime factor of the average of a twin prime pair, this time of 30 = 2*3*5, between 29 and 30. The averages 12 and 18 are skipped as their factors, 2 and 3, already appeared.
a(5) = 17 following a(4) = 7, skipping the primes 11 and 13 in the order of appearances.
		

Crossrefs

Programs

  • Maple
    P:= select(isprime, {seq(i,i=3..10^4,2)}):
    TPA:= map(`+`, P intersect map(`-`,P,2),1):
    TPA:= sort(convert(TPA,list)):
    R:= NULL: S:= {}:
    for t in TPA do
      V:= numtheory:-factorset(t) minus S;
      if nops(V) > 1 then printf("t = %d: %a\n",t,V) fi;
      R:= R, op(sort(convert(V,list)));
      S:= S union V;
    od:
    R; # Robert Israel, Aug 25 2025
  • Mathematica
    With[{m = Select[Prime[Range[1000]], PrimeQ[# + 2] &] + 1}, DeleteDuplicates[Flatten[FactorInteger[#][[;; , 1]] & /@ m]]] (* Amiram Eldar, Aug 25 2025 *)
Showing 1-5 of 5 results.