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.

Previous Showing 81-90 of 119 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

A174786 Numbers n congruent to 3 (mod 6) such that n+2 and n+8 are primes.

Original entry on oeis.org

3, 9, 15, 21, 39, 45, 51, 81, 99, 105, 129, 165, 171, 189, 225, 231, 249, 255, 261, 309, 345, 351, 381, 441, 459, 501, 555, 561, 585, 591, 639, 645, 651, 675, 819, 855, 879, 939, 945, 969, 975, 1011, 1089, 1095, 1101, 1179, 1185, 1215, 1221, 1275, 1281, 1299, 1359, 1365
Offset: 1

Views

Author

Giovanni Teofilatto, Mar 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Select[6Range[230]-3,And@@PrimeQ[{#+2,#+8}]&] (* Harvey P. Dale, Aug 21 2011 *)

Extensions

Definition corrected and sequence extended - R. J. Mathar, Mar 30 2010

A236552 a(n) = |{0 < k < n: 6*k - 1, 6*k + 1, 6*k + 5 and prime(n-k) + 6 are all prime}|.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 3, 3, 2, 3, 2, 3, 3, 4, 2, 3, 2, 3, 3, 4, 4, 5, 4, 4, 3, 4, 3, 5, 5, 5, 2, 2, 4, 3, 4, 3, 3, 4, 5, 3, 5, 4, 6, 6, 6, 4, 4, 1, 3, 6, 5, 2, 4, 4, 5, 6, 8, 6, 5, 4, 8, 4, 4, 5, 7, 6, 4, 4, 4, 6, 6, 5, 5, 6, 6, 7, 6, 4, 3, 5, 7, 3, 4, 4, 3, 6, 5, 5, 6, 6, 7, 5, 4, 3, 5, 5, 3, 3, 2, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 4, there is a positive integer k < n such that 6*k - 5, 6*k - 1, 6*k + 1 and prime(n-k) + 6 are all prime.
(iii) Any integer n > 7 can be written as p + q with q > 0 such that p, p + 6 and prime(q) + 6 are all prime.
(iv) Each integer n > 4 can be written as k*(k+1) + m with k > 0 and m > 0 such that prime(m) + 6 is prime.

Examples

			a(4) = 1 since 6*1 - 1, 6*1 + 1, 6*1 + 5 and prime(4-1) + 6 = 11 are all prime.
a(48) = 1 since 6*32 - 1 = 191, 6*32 + 1 = 193, 6*32 + 5 = 197 and prime(48-32) + 6 = 53 + 6 = 59 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_]:=PrimeQ[6n-1]&&PrimeQ[6n+1]&&PrimeQ[6n+5]
    q[n_]:=PrimeQ[Prime[n]+6]
    a[n_]:=Sum[If[p[k]&&q[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A240986 Determinants of n X n matrices of sets of distinct primes selected by increasing prime gaps (see comments).

Original entry on oeis.org

3, 6, -36, -216, 1296, -5184, -145152, -3856896, -170325504, -6133211136, 1094593056768, 26742290558976, -497681937801216, -14357497419546624, 657148066947072000, 12008320398059765760, 1322255096225695531008, 70546799432003423698944, -6537119853797882157072384, -27940593871362459110473728
Offset: 1

Views

Author

Samuel J. Erickson, Aug 06 2014

Keywords

Comments

Let P = {3,5,7,11,...} be the sequence of odd primes and let P(k) = {prime in P: (prime+2k) is in P} (although set builder notation is used for P(k) we will still assume that P(k) is a sequence). Let M(n) be the n X n matrix where row 1 is the first n elements from P(1), row 2 is the first n elements from P(2), and in general row j is the first n elements from P(j). This sequence is the sequence of determinants for M(1), M(2), M(3), M(4), ..., M(9).

Examples

			For the first element of the sequence we find the determinant of the matrix [[3,5],[3,7]], where [3,5] is row 1 and [3,7] is row 2. These numbers are there because in row 1 we are looking at the primes where we can add 2 to get another prime; 3+2 is prime and so is 5+2, so they go in row 1. Similarly, for the second row we get [3,7] because these are the first primes such that when 4 is added we get a prime: 3+4 and 7+4 are both prime, so they go in row 2. For the second entry in the sequence we take the determinant of [[3,5,11],[3,7,13],[5,7,11]]; the reason we get [5,7,11] in the third row is because 5 is the first prime where 5+6 is prime, 7 is second prime where 7+6 is prime, and 11 is the third prime where 11+6 is prime.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(m=matrix(n,n), j); for (i=1, n, j = 1; forprime(p=2, , if (isprime(p+2*i), m[i,j] = p; j++); if (j > n, break););); matdet(m);} \\ Michel Marcus, May 04 2019
  • Python
    # See Erickson link.
    

Extensions

Offset 1 and more terms from Michel Marcus, May 04 2019

A254690 Number of decompositions of 2n into a sum of two primes p1 < p2 such that p2-p1 is between a pair of sexy primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 1, 3, 3, 2, 3, 5, 4, 2, 5, 2, 3, 5, 2, 4, 6, 2, 5, 6, 3, 4, 6, 4, 3, 7, 2, 3, 8, 3, 4, 6, 2, 5, 7, 3, 3, 7, 5, 5, 8, 4, 3, 9, 2, 4, 8, 2, 5, 7, 2, 2, 4, 6, 5, 7, 4, 2, 10, 2, 4, 7, 1, 6, 7, 1, 4, 10, 7, 3, 8
Offset: 1

Views

Author

Lei Zhou, Feb 05 2015

Keywords

Comments

"A pair of sexy primes" is defined as two primes p_a < p_b such that p_b = p_a + 6, with p_a from A023201. See the Weisstein link.
The restriction is therefore p_a < p2 - p1 < p_a + 6 for p_a from A023201.
Conjecture: when n>=7, a(n)>0.
The products of sexy prime pairs are listed in A111192.

Examples

			n=7, 2n=14=3+11. 11-3=8, 5<8<11 where {5, 11} is a pair of sexy primes. So a(7)=1.
n=8, 2n=16=3+13=5+11. 13-3=10, 5<10<11; 11-5=6, 5<6<11, where {5, 11} is a pair of sexy primes: two cases found, so a(8)=2.
n=17, 2n=34=3+31=5+29=11+23. 31-3=28, 23<28<29; 29-5=24, 23<24<29; 23-11=12, 7<12<13; where {23,29} and {7,13} are sexy prime pairs: three cases found, so a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[e = 2 n; ct = 0; p1 = 1; While[p1 = NextPrime[p1]; p1 < n, p2 = e - p1; If[PrimeQ[p2], c = p2 - p1; If[c >= 6, found = 0; Do[If[PrimeQ[c - i] && PrimeQ[c + 6 - i], found = 1], {i, 1, 5, 2}]; If[found == 1, ct++]]]]; ct, {n, 1, 100}]

Extensions

Edited by Wolfdieter Lang, Feb 20 2015

A282391 Numbers j such that d(j) = d(j + 3*d(j)), where d(j) is the number of divisors of j.

Original entry on oeis.org

5, 7, 10, 11, 13, 14, 15, 17, 21, 22, 23, 26, 27, 30, 31, 32, 34, 37, 39, 41, 42, 45, 46, 47, 50, 53, 54, 57, 60, 61, 62, 65, 67, 72, 73, 74, 78, 82, 83, 90, 94, 96, 97, 98, 99, 101, 103, 104, 106, 107, 111, 114, 120, 122, 128, 129, 130, 131, 133, 134, 143
Offset: 1

Views

Author

Vladimir Shevelev, Feb 14 2017

Keywords

Comments

The sequence contains the smaller member of every pair of sexy primes (A023201).
The sequence contains no perfect squares. Indeed, let a(m) = k^2 for some m. Then, by the definition, d(k^2 + 3*d(k^2)) = d(k^2). Note that d(k^2) is odd. On the other hand, it is known (cf. A046522) that d(k^2) < 2*k. Hence (k+3)^2 - k^2 = 6*k + 1 > 3*d(k^2). Thus k^2 < k^2 + 3*d(k^2) < (k+3)^2. Note that, evidently, k^2 + 3*d(k^2) cannot be (k+2)^2. Let us also show that k^2 + 3*d(k^2) cannot be (k+1)^2, or, equivalently, 3*d(k^2) cannot be equal to 2*k + 1. Indeed, let 3*d(k^2) = 2*k + 1. For some prime p, let p^a || k (that is, p^a | k, but p^(a+1) !| k), a > 0, so 2*k + 1 == 1 (mod p). But now we have 3*p^(a+1) | 3*d(k^2) and thus 3*p^(a+1)|2*k + 1, so 2*k + 1 == 0 (mod p). Contradiction. Therefore, we conclude that k^2 + 3*d(k^2) cannot be a square. Hence, d(k^2 + 3*d(k^2)) is even, which is a contradiction.

Crossrefs

Programs

Extensions

More terms from Peter J. C. Moses, Feb 14 2017

A286217 Product of the n-th sexy prime triple.

Original entry on oeis.org

1729, 11339, 49321, 146969, 386389, 1089019, 1221191, 3864241, 5171489, 12640949, 18181979, 21243961, 43974269, 51881689, 178433279, 208506509, 230324329, 278421569, 393806449, 849244031, 932539661, 1341880019, 1416207439, 1672403471, 1829232539, 2111885999
Offset: 1

Views

Author

Connor Zapfel, May 04 2017

Keywords

Comments

A sexy prime triple is such that p, p+6, and p+12 are primes but p+18 is not a prime. - Harvey P. Dale, Oct 13 2024

Examples

			The first sexy prime triple is (7, 13, 19) so a(1) = 7*13*19 = 1729.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ[# + {6, 12, 18}] == {True, True, False} &] // # (#+6) (#+12) & (* Giovanni Resta, May 05 2017 *)
    Times@@Take[#,3]&/@(Select[Table[p+{0,6,12,18},{p,Prime[Range[250]]}],Boole[PrimeQ[#]]=={1,1,1,0}&]) (* Harvey P. Dale, Oct 13 2024 *)

Formula

a(n) = s(n)*(s(n)+6)*(s(n)+12), where s = A046118.
a(n) = A046118(n) * A046119(n) * A046120(n).

A341044 Numbers k such that A318996(k) is prime.

Original entry on oeis.org

8, 9, 10, 14, 15, 21, 22, 25, 26, 33, 34, 39, 42, 46, 57, 62, 65, 66, 69, 72, 74, 76, 80, 82, 87, 91, 92, 93, 94, 95, 100, 106, 111, 116, 119, 121, 122, 129, 133, 134, 145, 146, 159, 162, 166, 172, 176, 177, 183, 184, 190, 194, 202, 203, 206, 208, 213, 214, 215, 219, 232, 236, 237, 238, 240, 243
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Feb 03 2021

Keywords

Comments

Contains 2*p for p in A023201 and 3*p for p in A023203.

Examples

			a(3) = 10 is a term because A318996(10) = 11 is prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local s,D,t;
      D:= numtheory:-divisors(n);
      s:= convert(D,`+`);
      add(s mod t, t=D)
    end proc:
    select(t -> isprime(f(t)), [$1..1000]);
  • PARI
    f(n) = my(sn = sigma(n)); sumdiv(n, d, sn % d); \\ A318996
    isok(k) = isprime(f(k)); \\ Michel Marcus, Feb 04 2021

A341843 Number of sexy consecutive prime pairs below 2^n.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 7, 13, 25, 45, 80, 136, 251, 443, 784, 1377, 2420, 4312, 7756, 14106, 25554, 46776, 85774, 157325, 290773, 538520, 1000321, 1861364, 3473165, 6493997, 12167342, 22851920, 42987462, 81018661, 152945700, 289206487, 547722346, 1038786862
Offset: 1

Views

Author

Artur Jasinski, Feb 21 2021

Keywords

Comments

a(n) is the number of pairs of consecutive sexy primes {A023201, A046117} less than 2^n.
For each n from 9 through 48, the most frequently occurring difference between consecutive primes is 6. On p. 108 of the article by Odlyzko et al., the authors estimate that around n=117, the jumping champion (i.e., the most frequently occurring difference between consecutive primes) becomes 30, and around n=1412 it becomes 210. Successive jumping champions are conjecturaly the primorial numbers A002110.
Data for n >= 15 taken from Marek Wolf's prime gaps computation.
For the number of pairs of consecutive primes below 10^n having a difference of 6, see A093738.
For the number of sexy primes less than 10^n, see A080841.
There are 8 known cases in which a power of 2 falls between the members of the sexy consecutive prime pair (see A220951), but if a pair (p, p+6) is such that p < 2^n < p+6, that pair is not counted in a(n).

Examples

			a(6)=4 because 2^6=64 and we have 4 sexy consecutive prime pairs less than 64: {23,29}, {31,37}, {47,53}, {53,59}.
		

Crossrefs

Programs

  • Mathematica
    pp = {}; Do[kk = 0; Do[If[Prime[m + 1] - Prime[m] == 6, kk = kk + 1], {m, 2, PrimePi[2^n] - 1}]; AppendTo[pp, kk], {n, 4, 20}]; pp

A358571 Lesser p of a sexy prime pair such that (p-3)/2 is also the lesser prime of a sexy prime pair.

Original entry on oeis.org

13, 17, 37, 97, 457, 557, 1117, 1217, 1297, 2237, 2377, 2897, 4937, 7237, 9277, 10457, 18797, 21317, 23557, 24077, 27817, 29437, 30757, 34757, 38917, 39157, 48157, 48817, 50497, 55897, 60617, 62297, 64997, 72617, 81157, 82457, 90017, 94597, 107837, 108877, 111857
Offset: 1

Views

Author

Lamine Ngom, Nov 23 2022

Keywords

Comments

Equivalently, sums of the form (sexy primes - 3) which are also the lesser prime of a sexy prime pair.
Also numbers m such that m-4, m-1, m+5 and m+8 cannot be represented as x*y + x + y, with x >= y > 1 (A254636).
More generally, any sequence of numbers m such that A254636(m - 2*k - 2), A254636(m - 1), A254636(m + 4*k + 1) and A254636(m + 6*k + 2) are all 0 will only provide prime numbers which are lesser of a pair of primes (p, q) such that the pair (r, s) forms also a pair of primes, where q = p + 2*(2*k + 1), r = (p - 2*k - 1)/2, and s = (q + 2*k + 1)/2. Obviously, s - r = q - p = 2*(2*k + 1).
For k = 0, we get sequence A256386 (starting from its 6th term).
For k = 1, this sequence.
For k = 2, sequence starts: 19, 31, 43, 79, 127, 163, 283, 547, 751, 919, ...
For k = 3, sequence starts: 17, 53, 113, 593, 773, 1553, 1733, 1973, 4013, ...
For k = 4, sequence starts: 19, 131, 431, 811, 991, 2111, 5431, 6011, 10771, ...
etc.
For n > 1, a(n) is congruent to 17 modulo 20.
Number of terms < 10^k: 0, 4, 6, 15, 38, 167, 934, 5091, 30229, ...

Examples

			97 is the lesser in the sexy prime pair (97, 103), and the pair of (97-3)/2 and (103+3)/2 yields another sexy prime pair: (47, 53). Hence 97 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[11000]], AllTrue[Join[{#+6}, (#-3)/2 + {0,6}], PrimeQ]&] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    isok1(p) = isprime(p) && isprime(p+6); \\ A023201
    isok(p) = isok1(p) && isok1((p-3)/2); \\ Michel Marcus, Nov 23 2022
Previous Showing 81-90 of 119 results. Next