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.

A176132 Lesser of twin primes p0 such that 30*p0 -+ 1 and 30*p1 -+ 1 are twin primes, p1 = p0 + 2.

Original entry on oeis.org

41, 69257, 98909, 185681, 413069, 626009, 741467, 1064951, 1096829, 1107791, 1149917, 1582811, 1819271, 1823051, 2202311, 2221379, 2748059, 3177257, 3606287, 3958457, 4275809, 4786697, 5129039, 5903897, 6533981, 6541079
Offset: 1

Views

Author

Keywords

Examples

			41 is a term since (41, 43) are twin primes, 30*41 - 1 = 1229 and 30*41 + 1=1231 are twin primes, and 30*43 - 1 = 1289 and 30*43 + 1 = 1291 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];If[p1-p0==2&&PrimeQ[p2=p0*30-1]&&PrimeQ[p3=p0*30+1]&&PrimeQ[p4=p1*30-1]&&PrimeQ[p5=p1*30+1],AppendTo[lst,p0]],{n,5*9!}];lst
    ltpQ[{a_,b_}]:=b-a==2&&AllTrue[{30a+1,30a-1,30b+1,30b-1},PrimeQ]; Select[ Partition[ Prime[Range[450000]],2,1],ltpQ][[All,1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 27 2019 *)

A176133 Pythagorean primes p (primes of form 4*k + 1) such that 6*p -+ 1 are twin primes.

Original entry on oeis.org

5, 17, 137, 313, 373, 397, 577, 593, 653, 773, 1033, 1117, 1433, 1613, 2137, 2153, 2293, 2333, 2677, 3257, 3413, 3593, 3673, 4153, 4217, 4597, 4657, 5197, 5693, 5717, 6373, 6673, 6857, 6997, 7297, 8377, 8573, 9277, 9413, 9433, 10357, 10973, 11813
Offset: 1

Views

Author

Keywords

Examples

			5 is a term since 5 = 4*1 + 1, and 6*5 - 1 = 29 and 6*5 + 1 = 31 are twin primes.
		

Crossrefs

Programs

  • Mathematica
    lst={};Do[If[PrimeQ[p=4*n+1]&&PrimeQ[6*p-1]&&PrimeQ[6*p+1],AppendTo[lst,p]],{n,0,8!}];lst
    Select[4*Range[3000]+1,AllTrue[{#,6#+1,6#-1},PrimeQ]&] (* Harvey P. Dale, May 29 2025 *)

A358202 Lower twin primes p such that 6*p-1 and 6*p+1 are twin primes and (p+1)/6 is prime.

Original entry on oeis.org

17, 137, 23537, 92957, 157217, 318677, 326657, 440177, 510617, 521537, 558497, 577937, 617717, 651017, 661097, 861437, 969257, 1093997, 1152077, 1168337, 1177157, 1260317, 1299917, 1356077, 1463177, 1514657, 1600097, 1617437, 1768757, 1773977, 1957937, 2065577, 2271497, 2335637, 2382557, 2450597
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Nov 03 2022

Keywords

Examples

			a(2) = 137 is a term because 137 and 139 are twin primes, 6*137-1 = 821 and 6*137+1 = 823 are twin primes, and (137+1)/6 = 23 is a prime.
		

Crossrefs

Intersection of A060213 and A176131.

Programs

  • Maple
    P:= select(isprime, {seq(i,i=5..2*10^7,2)}):
    T:= P intersect map(`-`,P,2):
    R:=T intersect map(t -> (t+1)/6, T):
    sort(convert(select(t -> isprime((t+1)/6), R),list));
  • Mathematica
    Select[Prime[Range[180000]], PrimeQ[# + 2] && PrimeQ[6*# - 1] && PrimeQ[6*# + 1] && PrimeQ[(# + 1)/6] &] (* Amiram Eldar, Nov 03 2022 *)
    Select[Prime[Range[180000]],AllTrue[{#+2,6#+1,6#-1,(#+1)/6},PrimeQ]&] (* Harvey P. Dale, Jan 29 2023 *)

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
Showing 1-4 of 4 results.