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-10 of 26 results. Next

A173198 Number of pairs of sexy consecutive primes between (A031924(n))^2 and A031924(n)*A031925(n).

Original entry on oeis.org

10, 10, 12, 8, 11, 14, 12, 15, 18, 19, 21, 21, 25, 31, 19, 23, 32, 29, 27, 28, 43, 36, 36, 35, 42, 51, 52, 46, 43, 53, 45, 55, 41, 55, 51, 46, 71, 52, 66, 60, 54, 62, 75, 66, 56, 67, 91, 65, 78, 75, 77, 97, 62, 80, 90, 81, 68, 78, 89, 99, 86, 90, 98, 98, 106, 96, 90, 84, 105, 89
Offset: 1

Views

Author

Jaspal Singh Cheema, Feb 12 2010

Keywords

Comments

If you graph a(n) versus n, a clear pattern emerges.
As you go farther along the n-axis, greater are the number of consecutive sexy primes, on average, within each interval obtained.
If one could prove that there is at least one consecutive sexy prime within each interval, this would imply that consecutive sexy primes are infinite.
I suspect all numbers in the sequence are > 0.

Examples

			The first sexy prime pair with consecutive primes is (23,29) = A031924(1) and A031925(1). Square the first term, you get 529, then take the product of the two primes, you get 667.
Between these two numbers, namely (529,667), there are ten consecutive sexy primes: (541,547), (557,563), (563,569),
(571,577), (587,593), (593,599), (601,607), (607,613), (647,653), and (653 659).
Hence the very first term of the sequence is 10.
		

Crossrefs

Programs

  • Maple
    isA031924 := proc(p) return (isprime(p) and (nextprime(p)-p) = 6 ); end proc:
    A031924 := proc(n) local p; if n = 1 then 23; else p := nextprime(procname(n-1)) ; while not isA031924(p) do p := nextprime(p) ; end do ; return p ; end if ; end proc:
    A031925 := proc(n) A031924(n)+6 ; end proc:
    A173198 := proc(n) local ulim,llim,a,i ; llim := A031924(n)^2 ; ulim := A031924(n)*A031925(n) ; a := 0 ; for i from llim to ulim-6 do if isA031924(i) then a := a+1 ; end if; end do ; a ; end proc:
    seq(A173198(n),n=1..80) ; # R. J. Mathar, Feb 15 2010

Extensions

Comments condensed by R. J. Mathar, Feb 15 2010

A052247 Maximal value of smallest prime divisors of the 5 composite numbers between A031924(n) and A031925(n).

Original entry on oeis.org

5, 5, 7, 5, 5, 7, 5, 7, 5, 7, 13, 5, 5, 11, 7, 5, 5, 5, 5, 7, 13, 5, 19, 5, 5, 5, 13, 5, 5, 19, 5, 5, 13, 11, 5, 7, 17, 11, 5, 23, 13, 7, 11, 5, 5, 17, 11, 7, 5, 19, 7, 7, 29, 23, 5, 5, 5, 5, 5, 29, 37, 5, 31, 5, 7, 5, 7, 5, 5, 11, 5, 17, 7, 13, 5, 11, 23, 5, 11, 5, 5, 5, 47, 5, 29, 5, 5, 13, 5
Offset: 1

Views

Author

Labos Elemer, Feb 01 2000

Keywords

Examples

			The 5 composites between A031924(1) = 23 and A031925(1) = 29 are 24, 25, 26, 27, 28; their smallest prime divisors are 2 5 2 3 2; the maximal value is 5; so a(1) = 5.
		

Crossrefs

A031924 Primes followed by a gap of 6, i.e., next prime is p + 6.

Original entry on oeis.org

23, 31, 47, 53, 61, 73, 83, 131, 151, 157, 167, 173, 233, 251, 257, 263, 271, 331, 353, 367, 373, 383, 433, 443, 503, 541, 557, 563, 571, 587, 593, 601, 607, 647, 653, 677, 727, 733, 751, 941, 947, 971, 977, 991, 1013, 1033, 1063, 1097, 1103, 1117, 1123, 1181
Offset: 1

Views

Author

Keywords

Comments

Original name: Lower prime of a difference of 6 between consecutive primes.
Conjecture: The sequence is infinite and for every n >= 7746, a(n+1) < a(n)^(1+1/n). Namely for n >= 7746, a(n)^(1/n) is a strictly decreasing function of n (See comment lines of the sequence A248855). - Jahangeer Kholdi and Farideh Firoozbakht, Nov 29 2014

Examples

			23 is a term as the next prime 29 = 23 + 6.
		

Crossrefs

Cf. A001359, A023201, A031925; A031924 and A007529 together give A023201.

Programs

  • GAP
    P:=Filtered([1..1200],IsPrime);;
    List(Filtered([1..Length(P)-1],i->P[i+1]-P[i]=6),k->P[k]); # Muniru A Asiru, Jan 30 2019
  • Magma
    [p: p in PrimesUpTo(1200) | NextPrime(p)-p eq 6]; // Bruno Berselli, Apr 09 2013
    
  • Maple
    A031924 := proc(n)
        option remember;
        if n = 1 then
            return 23;
        else
            p := nextprime(procname(n-1)) ;
            q := nextprime(p) ;
            while q-p <> 6 do
                p := q ;
                q := nextprime(p) ;
            end do:
            return p;
        end if;
    end proc: # R. J. Mathar, Jan 23 2013
  • Mathematica
    Transpose[Select[Partition[Prime[Range[200]], 2, 1], Last[#] - First[#] == 6 &]][[1]] (* Bruno Berselli, Apr 09 2013 *)
  • PARI
    is(n)=isprime(n)&&nextprime(n+1)-n==6 \\ Charles R Greathouse IV, Mar 21 2013
    
  • PARI
    apply( A031924(n,p=2,show=0,g=6)={forprime(q=p+1,, p+g!=(p=q) || (show&&print1(p-g",")) || n-- || return(p-g))}, [1..99]) \\ Use nxt(p)=A031924(1,p) to get the term following p, use show=1 to print all a(1..n), g to select a different gap. - M. F. Hasler, Jan 02 2020
    

Extensions

New name from M. F. Hasler, Jan 02 2020

A160370 Smaller member p of a pair (p,p+6) of consecutive primes in different centuries.

Original entry on oeis.org

1097, 2897, 3797, 4597, 5297, 5897, 9397, 11497, 11897, 12197, 12497, 12697, 15797, 16097, 18797, 19597, 21997, 24097, 24197, 28597, 28697, 29297, 30097, 30197, 30697, 32497, 35597, 36997, 39097, 40897, 41597, 41897, 42397, 45497, 47297
Offset: 1

Views

Author

Ki Punches, May 11 2009

Keywords

Comments

Note that the smaller member of a pair of sexy primes with the same constraint on centuries defines a different sequence, since members of a sexy prime pair do not need to be *consecutive* primes.
The larger member in the pair is obtained by adding 6 to an entry.
Every a(n)+3 is a multiple of 100 such that neither a(n)+2 nor a(n)+4 are primes. It appears that every integer occurs as the difference round((a(n+1)-a(n))/100); all numbers 1..333 occur as these differences for a(n) < 1000000000. - Hartmut F. W. Hoft, May 18 2017

Examples

			30097 + 6 = 30103.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[5000]],2,1],#[[2]]-#[[1]] == 6 && Floor[#[[1]]/100]!=Floor[#[[2]]/100]&]][[1]] (* Harvey P. Dale, Apr 28 2012 *)
    a160370[n_] := Select[Range[97, n, 100], AllTrue[# + {0, 6}, PrimeQ] && NoneTrue[# + {2, 4}, PrimeQ]&]
    a160370[49000] (* data *) (* Hartmut F. W. Hoft, May 18 2017 *)

Formula

{A031924(n): [A031924(n)/100] <> [A031925(n)/100]} where [..]=floor(..).

Extensions

Edited by R. J. Mathar, May 14 2009

A134100 Primes p > 3 such that neither p-2 nor p-4 are prime.

Original entry on oeis.org

29, 37, 53, 59, 67, 79, 89, 97, 127, 137, 149, 157, 163, 173, 179, 191, 211, 223, 239, 251, 257, 263, 269, 277, 293, 307, 331, 337, 347, 359, 367, 373, 379, 389, 397, 409, 419, 431, 439, 449, 457, 479, 487, 499, 509, 521, 541, 547, 557, 563, 569, 577, 587
Offset: 1

Views

Author

Enoch Haga, Oct 08 2007

Keywords

Comments

Upper primes after a prime gap of 6 or larger (Union of A031925, A031927, A031929, ...) - R. J. Mathar, Mar 15 2012

Examples

			29 is a term because 29 follows the odd nonprime 27 which in turn follows the odd nonprime 25.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[5,1000,2],PrimeQ[#]&&!PrimeQ[#-2]&&!PrimeQ[#-4]&] (* Vladimir Joseph Stephan Orlovsky, Feb 03 2012 *)
  • PARI
    forprime(p=5,600,if(!isprime(p-2) && !isprime(p-4), print1(p,", "))); \\ Joerg Arndt, Oct 27 2021
    
  • PARI
    list(lim)=my(v=List(),p=23); forprime(q=29,lim, if(q-p>4, listput(v,q)); p=q); Vec(v) \\ Charles R Greathouse IV, Oct 27 2021

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Oct 27 2021

Extensions

Name corrected by Michel Marcus and Amiram Eldar, Oct 27 2021

A031931 Upper prime of a difference of 12 between consecutive primes.

Original entry on oeis.org

211, 223, 479, 521, 631, 673, 809, 1009, 1213, 1249, 1319, 1471, 1511, 1523, 1543, 1721, 1801, 1823, 1901, 2081, 2111, 2309, 2411, 2459, 2591, 2633, 2789, 2939, 3061, 3079, 3181, 3203, 3271, 3343, 3359, 3511, 3571, 3671, 3943, 4001, 4091, 4111, 4409, 4421
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A031925 (difference of 6).

Programs

  • Mathematica
    Select[Partition[Prime[Range[700]],2,1],#[[2]]-#[[1]]==12&][[All,2]] (* Harvey P. Dale, Dec 28 2018 *)
  • PARI
    isok(p) = isprime(p) && (p-precprime(p-1) == 12); \\ Michel Marcus, Jun 24 2022

Extensions

Corrected and extended by Harvey P. Dale, Dec 28 2018

A288021 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 4, and p1, p2 are in different decades.

Original entry on oeis.org

7, 19, 37, 67, 79, 97, 109, 127, 229, 277, 307, 349, 379, 397, 439, 457, 487, 499, 739, 757, 769, 859, 877, 907, 937, 967, 1009, 1087, 1279, 1297, 1429, 1447, 1489, 1549, 1567, 1579, 1597, 1609, 1867, 1999, 2137, 2239, 2269, 2347, 2377, 2389, 2437, 2539, 2617, 2659, 2689, 2707, 2749, 2797, 2857
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's or 9's.

Examples

			7 is in this sequence since pair (7,11) is the first with difference 4 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288021[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==4&]]
    a288021[3000] (* data *)

A288022 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 6, and p1, p2 are in different decades.

Original entry on oeis.org

47, 157, 167, 257, 367, 557, 587, 607, 647, 677, 727, 947, 977, 1097, 1117, 1187, 1217, 1367, 1657, 1747, 1777, 1907, 1987, 2207, 2287, 2417, 2467, 2677, 2837, 2897, 2957, 3307, 3407, 3607, 3617, 3637, 3727, 3797, 4007, 4357, 4457, 4507, 4597, 4657, 4937, 4987
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 7's.
Number of terms < 10^k: 0, 0, 1, 13, 81, 565, 4027, 30422, 237715, ... - Muniru A Asiru, Jan 09 2018

Examples

			47 is in the sequence since pair (47,53) is the first with difference 6 spanning a multiple of 10.
		

Crossrefs

Programs

  • GAP
    P:=Filtered([1..20000], IsPrime);
    P1:=List(Filtered(Filtered(List([1..Length(P)-1],n->[P[n],P[n+1]]),i->i[2]-i[1]=6),j->j[1] mod 5=2),k->k[1]); # Muniru A Asiru, Jul 08 2017
  • Maple
    for n from 1 to 2000 do if [ithprime(n+1)-ithprime(n), ithprime(n) mod 5] = [6,2] then print(ithprime(n)); fi; od; # Muniru A Asiru, Jan 19 2018
  • Mathematica
    a288022[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==6&]]
    a288022[3000] (* data *)

A288024 Prime p1 of consecutive primes p1, p2, where p2 - p1 = 8, and p1, p2 are in different decades.

Original entry on oeis.org

89, 359, 389, 449, 479, 683, 719, 743, 929, 983, 1109, 1163, 1193, 1373, 1439, 1523, 1559, 1733, 1823, 1979, 2003, 2153, 2213, 2243, 2273, 2459, 2609, 2663, 2699, 2843, 2879, 2909, 3209, 3449, 3623, 3719, 4289, 4349, 4583, 4943, 5189, 5399, 5573, 5693, 5783, 5813
Offset: 1

Views

Author

Hartmut F. W. Hoft, Jun 04 2017

Keywords

Comments

The unit digits of the numbers in the sequence are 3's or 9's.

Examples

			89 is in the sequence since pair (89,97) is the first with difference 8 spanning a multiple of 10.
		

Crossrefs

Programs

  • Mathematica
    a288024[n_] := Map[Last, Select[Map[{NextPrime[#, 1], NextPrime[#, -1]}&, Range[10, n, 10]], First[#]-Last[#]==8&]]
    a288024[6000] (* data *)
    Select[Partition[Prime[Range[800]],2,1],#[[2]]-#[[1]]==8&&IntegerDigits[#[[1]]][[-2]]!= IntegerDigits[ #[[2]]][[-2]]&][[;;,1]] (* Harvey P. Dale, Jan 09 2024 *)

A052158 Lower prime of a difference of 6 (G-minor-6 primes) between consecutive primes of 6k+1 form.

Original entry on oeis.org

31, 61, 73, 151, 157, 271, 331, 367, 373, 433, 541, 571, 601, 607, 727, 733, 751, 991, 1033, 1063, 1117, 1123, 1231, 1291, 1321, 1453, 1543, 1621, 1657, 1741, 1747, 1753, 1777, 1861, 1987, 2011, 2131, 2281, 2287, 2341, 2371, 2383, 2467, 2551, 2671, 2677
Offset: 1

Views

Author

Labos Elemer, Jan 25 2000

Keywords

Comments

The corresponding larger primes (G-major-6 primes) are also of the form 6k+1.

Examples

			a(1)=31 since a(1) + 6 = 37 is the next prime and 31 = 6*5 + 1.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[400]],2,1],Last[#]-First[#] == 6 && Mod[First[#],6]==1&]][[1]] (* Harvey P. Dale, Oct 01 2013 *)

Formula

A031924(n) == 1 (mod 6).
Showing 1-10 of 26 results. Next