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 41-50 of 108 results. Next

A342714 Decimal expansion of infinite sum of reciprocals of lesser twin primes, Sum_{n>=1} 1/A001359(n).

Original entry on oeis.org

1, 0, 5, 9, 0, 6, 4, 2, 6
Offset: 1

Views

Author

Artur Jasinski, Mar 19 2021

Keywords

Comments

Alternative definition: infinite sum of reciprocals of primes whose distance to the next prime is equal to 2.
R. J. Mathar gave an estimate of 1.059064 for this constant in a comment at A209328. Dimitris Valianatos estimated the constant as 1.059064266555685... in a comment at A306539.

Examples

			Equals 1.05906426...
		

Crossrefs

Formula

Equals 1/3 + 1/5 + 1/11 + 1/17 + 1/29 + 1/41 + 1/59 + ...
Equals (A065421 + A306539)/2.

A088971 Number of twin prime pairs between consecutive prime-indexed primes of order 3. The bounds are included in the calculation.

Original entry on oeis.org

3, 5, 8, 12, 9, 16, 12, 15, 33, 16, 32, 19, 12, 23, 27, 31, 7, 54, 24, 14, 32, 30, 33, 54, 38, 20, 17, 14, 18, 104, 25, 30, 26, 57, 17, 52, 41, 25, 50, 40, 20, 69, 21, 30, 16, 85, 135, 18, 18, 22, 28, 28, 65, 26, 63, 64, 17, 45, 29, 15, 93, 115, 41, 13, 21, 129, 56, 80, 17, 25, 31, 59, 70, 70, 37, 33, 41, 42, 58, 92
Offset: 1

Views

Author

Cino Hilliard, Oct 30 2003

Keywords

Comments

This sequence contains no 0's between x=1 to 33000. The interval [PIPS3(4133), PIPS3(4134)] contains 1 twin prime pair; the interval [PIPS3(8268), PIPS3(8269)] contains 2 twin prime pairs.

Examples

			a(1) = 3, since there are three pairs of twin primes at least PIPS3(1) = 11 and at most PIPS3(2) = 31: (11,13), (17,19), and (29,31).
		

Crossrefs

Programs

  • PARI
    piptwins3(m,n) = { for(x=m,n, f=1; c=0; p1 = prime(prime(prime(prime(x)))); p2 = prime(prime(prime(prime(x+1)))); forprime(j=p1,p2-2, if(isprime(j+2),f=0; c++) ); print1(c","); ) }
    
  • Sage
    def PIP(n, i): # Returns the n-th prime-indexed prime of order i.
        if i==0:
            return primes_first_n(n)[n-1]
        else:
            return PIP(PIP(n, i-1), 0)
    def A088971(n): # Returns a(n)
        return len([i for i in range(PIP(n, 3), PIP(n+1, 3), 2) if (is_prime(i) and is_prime(i+2))])
    A088971(1) # Danny Rorabaugh, Mar 30 2015

Formula

PIPS3(x) = A049090(x) = the x-th prime-indexed prime of order 3 = prime(prime(prime(prime(x)))) where prime(x) is the x-th prime. a(n) = count of twins in [PIPS3(n), PIPS3(n+1)].

Extensions

Edited to count twin pairs entirely within [PIPS3(n), PIPS3(n+1)], rather than pairs with the first prime in that interval. - Danny Rorabaugh, Apr 01 2015

A088973 Number of twin prime pairs between consecutive prime-indexed primes of order 4. The bounds are included in the calculation.

Original entry on oeis.org

5, 20, 25, 76, 51, 93, 61, 100, 176, 122, 207, 156, 89, 152, 249, 280, 44, 412, 178, 90, 293, 270, 282, 374, 340, 157, 186, 121, 169, 913, 263, 235, 255, 597, 162, 406, 457, 263, 418, 339, 221, 645, 161, 300, 133, 855, 1235, 236, 162, 240, 256, 243, 786, 261, 514, 590, 156, 481, 374, 211
Offset: 1

Views

Author

Cino Hilliard, Oct 30 2003

Keywords

Comments

Conjecture: The interval [PIPS4(n), PIPS4(n+1)] always contains at least one twin prime pair. (This implies the Twin Prime Conjecture.)

Examples

			a(1) = 5, since there are five pairs of twin primes at least PIPS4(1) = 31 and at most PIPS4(2) = 127: (41,43), (59,61), (71,73), (101,103), and (107,109).
		

Crossrefs

Programs

  • PARI
    piptwins4(m,n) = { for(x=m,n, f=1; c=0; p1 = prime(prime(prime(prime(prime(x))))); p2 = prime(prime(prime(prime(prime(x+1))))); forprime(j=p1,p2-2, if(isprime(j+2),f=0; c++) ); print1(c","); ) }
    
  • Sage
    def PIP(n,i): # Returns the n-th prime-indexed prime of order i
        if i==0:
            return primes_first_n(n)[n-1]
        else:
            return PIP(PIP(n,i-1),0)
    def A088973(n):
        return len([i for i in range(PIP(n,4),PIP(n+1,4),2) if (is_prime(i) and is_prime(i+2))])
    A088973(60) # Danny Rorabaugh, Mar 30 2015

Formula

PIPS4(x) = A049203(x) = the x-th prime-indexed primes of order 4 = prime(prime(prime(prime(prime(x))))) where prime(x) = A000040(x) is the x-th prime. a(n) = number of twin prime pairs in [PIPS4(n), PIPS(n+1)].

Extensions

Edited to count twin pairs entirely within [PIPS4(n), PIPS4(n+1)], rather than pairs with the first prime in that interval. - Danny Rorabaugh, Apr 01 2015

A218279 Let (p(n), p(n)+2) be the n-th twin prime pair. a(n) is the smallest k, such that there is only one prime in the interval (k*p(n), k*(p(n)+2)), or a(n)=0, if there is no such k.

Original entry on oeis.org

2, 4, 2, 2, 3, 2, 6, 5, 3, 5, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 4, 3, 3, 2, 2, 2, 3, 6, 3, 2, 4, 3, 2, 2, 2, 3, 3, 2, 2, 2, 3, 5, 2, 2, 2, 3, 2, 3, 3, 6, 3, 4, 9, 5, 2, 5, 4, 2, 3, 2, 3, 3, 2, 4, 3, 2, 2, 5, 3, 4, 4, 4, 4, 3, 2, 6, 2, 7, 4, 2, 6, 4, 2
Offset: 1

Views

Author

Vladimir Shevelev, Oct 25 2012

Keywords

Comments

Conjecture: a(n)>0 for all n.

Examples

			The first pair of twin primes is (3,5). For k=1 and 2, we have the intervals (3,5) and (6,10), such that not the first but the second interval contains exactly one prime(7). Thus a(1)=2. For n=2 and k=1 to 4, we have the intervals (5,7),(10,14),(15,21), and (20,28) and only the last interval contains exactly one prime(23). Thus, a(2)=4.
		

Crossrefs

Extensions

a(6) corrected and terms beyond a(11) contributed by Zak Seidov, Oct 25 2012

A248367 Initial members of prime quadruples (n, n+2, n+36, n+38).

Original entry on oeis.org

5, 71, 101, 191, 311, 821, 1451, 4091, 4481, 4931, 5441, 6791, 12071, 13721, 14591, 17921, 18251, 20441, 20771, 20981, 21521, 21611, 35801, 38711, 41141, 41981, 43541, 46271, 47351, 47741, 48821, 49331, 53231, 64151, 70841
Offset: 1

Views

Author

Karl V. Keller, Jr., Jan 11 2015

Keywords

Comments

This sequence is prime n, where there exist two twin prime pairs of (n,n+2), (n+36,n+38).
This sequence is a subsequence of A001359 (lesser of twin primes).
Excluding 5, this sequence is a subsequence of A132232 (primes, 11 mod 30).

Examples

			For n=71, the numbers 71, 73, 107, 109, are primes.
		

Crossrefs

Cf. A077800 (twin primes), A001359, A132232, A181603 (twin primes, end 1).

Programs

  • Mathematica
    a248367[n_] := Select[Prime@Range@n, And[PrimeQ[# + 2], PrimeQ[# + 36], PrimeQ[# + 38]] &]; a248367[8000] (* Michael De Vlieger, Jan 11 2015 *)
    Select[Prime[Range[8000]],AllTrue[#+{2,36,38},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 17 2019 *)
  • Python
    from sympy import isprime
    for n in range(1,10000001,2):
      if isprime(n) and isprime(n+2) and isprime(n+36) and isprime(n+38): print(n,end=', ')

A259025 Numbers k such that k is the average of four consecutive primes k-11, k-1, k+1 and k+11.

Original entry on oeis.org

420, 1050, 2028, 2730, 3582, 4230, 4242, 4272, 4338, 6090, 6132, 6690, 6792, 8220, 11058, 11160, 11970, 12252, 15288, 19542, 19698, 21588, 21600, 26892, 27540, 28098, 28308, 29400, 30840, 30870, 31080, 32412, 42072, 45318, 47808, 48120
Offset: 1

Views

Author

Karl V. Keller, Jr., Jun 16 2015

Keywords

Comments

This sequence is a subsequence of A014574 (average of twin prime pairs) and A256753.
The terms ending in 0 are congruent to 0 mod 30.
The terms ending in 2 and 8 are congruent to 12 mod 30 and 18 mod 30 respectively.

Examples

			For n=420: 409, 419, 421, 431 are consecutive primes (n-11=409, n-1=419, n+1=421, n+11=431).
For n=1050: 1039, 1049, 1051, 1061 are consecutive primes (n-11=1039, n-1=1049, n+1=1051, n+11=1061).
		

Crossrefs

Cf. A052376, A077800 (twin primes), A014574, A249674 (30n), A256753.

Programs

  • Mathematica
    {p, q, r, s} = {2, 3, 5, 7}; lst = {}; While[p < 50000, If[ Differences[{p, q, r, s}] == {10, 2, 10}, AppendTo[lst, q + 1]]; {p, q, r, s} = {q, r, s, NextPrime@ s}]; lst (* Robert G. Wilson v, Jul 15 2015 *)
    Mean/@Select[Partition[Prime[Range[5000]],4,1],Differences[#]=={10,2,10}&] (* Harvey P. Dale, Sep 11 2019 *)
  • PARI
    is(n)=n%6==0&&isprime(n-11)&&isprime(n-1)&&isprime(n+1)&&isprime(n+11)&&!isprime(n-7)&&!isprime(n-5)&&!isprime(n+5)&&!isprime(n+7) \\ Charles R Greathouse IV, Jul 17 2015
  • Python
    from sympy import isprime,prevprime,nextprime
    for i in range(0,50001,2):
      if isprime(i-1) and isprime(i+1):
        if prevprime(i-1) == i-11 and nextprime(i+1) == i+11 :  print (i,end=', ')
    

Formula

a(n) = A052376(n) + 11. - Robert G. Wilson v, Jul 15 2015

A261701 Initial member of four twin prime pairs with gap 210 between them.

Original entry on oeis.org

599, 3917, 5021, 37361, 48779, 81929, 93281, 97157, 263399, 433049, 783149, 821801, 906119, 908669, 1197197, 1308497, 1308707, 1379237, 1464809, 1908449, 2036861, 2341979, 2408561, 2760671, 2804309, 3042491, 3042701, 3042911, 3198197, 4090649, 4543991, 5543927
Offset: 1

Views

Author

K. D. Bajpai, Aug 28 2015

Keywords

Comments

More precisely, primes p such that p + 2, p + 210, p + 212, p + 420, p + 422, p + 630, p + 632 are all primes.
All the terms in this sequence are congruent to 2 (mod 3).

Examples

			599 appears in the sequence because: (a) {599,601}, {809, 811}, {1019, 1021}, {1229, 1231} are four (not consecutive) twin prime pairs; (b) the gap between each twin prime pair (809 - 599) = (1019 -  809) = (1229 - 1019) = 210.
		

Crossrefs

Cf. A001359 (twin primes), A077800, A113274, A253624.

Programs

  • Magma
    [p: p in PrimesUpTo (100000) | IsPrime(p+2) and IsPrime(p+210) and IsPrime(p+212) and IsPrime(p+420) and IsPrime(p+422) and IsPrime(p+630) and IsPrime(p+632) ];
    
  • Maple
    select(p -> andmap(isprime, [p, p+2, p+210, p+212, p+420, p+422, p+630, p+632]),[seq(p, p=1..10^5)]);
  • Mathematica
    k = 210; Select[Prime@Range[10^7], PrimeQ[# + 2] && PrimeQ[# + k] && PrimeQ[# + k + 2] && PrimeQ[# + 2 k] && PrimeQ[# + 2 k + 2] && PrimeQ[# + 3 k] &&  PrimeQ[# + 3 k + 2] &]
    Select[Prime[Range[400000]],AllTrue[#+{2,210,212,420,422,630,632},PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 17 2019 *)
  • PARI
    forprime(p= 1, 100000, if(isprime(p+2) && isprime(p+210) && isprime(p+212) && isprime(p+420) && isprime(p+422) && isprime(p+630) && isprime(p+632), print1(p,", ")));
    
  • Perl
    use ntheory ":all"; say join ", ", grep { is_prime($+210) && is_prime($+212) && is_prime($+420) && is_prime($+422) && is_prime($+630) && is_prime($+632) } @{twin_primes(1e8)}; # Dana Jacobsen, Sep 02 2015
    
  • Perl
    use ntheory ":all"; say for sieve_prime_cluster(1, 1e8, 2, 210, 212, 420, 422, 630, 632); # Dana Jacobsen, Oct 03 2015

A275515 Table read by rows: list of prime triples of the form (p, p+2, p+6).

Original entry on oeis.org

5, 7, 11, 11, 13, 17, 17, 19, 23, 41, 43, 47, 101, 103, 107, 107, 109, 113, 191, 193, 197, 227, 229, 233, 311, 313, 317, 347, 349, 353, 461, 463, 467, 641, 643, 647, 821, 823, 827, 857, 859, 863, 881, 883, 887, 1091, 1093, 1097, 1277, 1279, 1283, 1301, 1303, 1307
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 31 2016

Keywords

Comments

A prime triple is a set of three prime numbers of the form (p, p+2, p+6) or (p, p+4, p+6).
Initial members p (other than 5) of prime triples of the form (p, p+2, p+6) are congruent to 11 or 17 (mod 30).
Also called prime triples of the first kind.

Examples

			The table starts:
5, 7, 11;
11, 13, 17;
17, 19, 23;
...
		

Crossrefs

Programs

  • Magma
    &cat[[p, p+2, p+6]: p in PrimesUpTo(1301) | (p le 5 xor p mod 30 in {11, 17}) and IsPrime(p+2) and IsPrime(p+6)];
  • Mathematica
    Prime@ Range[#, # + 2] &@ PrimePi@ Select[Prime@ Range@ 216, Times @@ Boole@ PrimeQ[# + {2, 6}] > 0 &] // Flatten (* Michael De Vlieger, Aug 02 2016 *)

Formula

a(3*n-2) = A022004(n).

A283867 Numbers n such that 30*n^2 - 1 and 30*n^2 + 1 are (twin) primes.

Original entry on oeis.org

1, 3, 10, 14, 18, 38, 62, 73, 116, 118, 143, 183, 221, 232, 242, 330, 333, 413, 430, 455, 470, 496, 507, 533, 538, 556, 606, 622, 645, 675, 687, 701, 720, 777, 792, 819, 846, 879, 881, 895, 913, 1000, 1019, 1030, 1092, 1155, 1214, 1238, 1253, 1261, 1313, 1337, 1350, 1407, 1418, 1429, 1431
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 17 2017

Keywords

Examples

			3 is in this sequence because 30*3^2 - 1 = 269 and 30*3^2 + 1 = 271 are twin primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..1500] | IsPrime(30*n^2-1) and IsPrime(30*n^2+1)];
    
  • Mathematica
    Select[Range@ 1431, PrimeQ[30*#^2 + 1] && PrimeQ[30*#^2 - 1] &] (* Indranil Ghosh, Mar 17 2017 *)
  • PARI
    is(n)=isprime(30*n^2-1) && isprime(30*n^2+1) \\ Charles R Greathouse IV, Mar 17 2017
    
  • Python
    from sympy import isprime
    [i for i in range(1, 1501) if isprime(30*i**2 - 1) and isprime(30*i**2 + 1)] # Indranil Ghosh, Mar 17 2017

Formula

a(n) >> n log^2 n. - Charles R Greathouse IV, Mar 17 2017

A343778 Primes which are two greater than A074040 terms.

Original entry on oeis.org

17, 21800053277, 86984485062381462583582279727, 2948338207972508983453357158259221375675126583677039825367935271466652794027
Offset: 1

Views

Author

Hartmut F. W. Hoft, Apr 29 2021

Keywords

Comments

a(5) = 3052230...330677 has 17332 digits, the only prime larger than a(4) and among the cumulative products of the first 2000 twin primes pairs plus two.

Examples

			a(1) = 17 = A074040(1) + 2 = 3*5 + 2.
		

Crossrefs

Programs

  • Mathematica
    (* function a074040[ ] is defined in A074040 *)
    a343778[n_] := Select[Map[#+2&, a074040[n]], PrimeQ]
    a343778[30]
Previous Showing 41-50 of 108 results. Next