A342714 Decimal expansion of infinite sum of reciprocals of lesser twin primes, Sum_{n>=1} 1/A001359(n).
1, 0, 5, 9, 0, 6, 4, 2, 6
Offset: 1
Examples
Equals 1.05906426...
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.
Equals 1.05906426...
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).
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","); ) }
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
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).
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","); ) }
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
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.
For n=71, the numbers 71, 73, 107, 109, are primes.
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 *)
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=', ')
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).
{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 *)
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
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=', ')
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.
[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) ];
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)]);
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 *)
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,", ")));
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
use ntheory ":all"; say for sieve_prime_cluster(1, 1e8, 2, 210, 212, 420, 422, 630, 632); # Dana Jacobsen, Oct 03 2015
The table starts: 5, 7, 11; 11, 13, 17; 17, 19, 23; ...
&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)];
Prime@ Range[#, # + 2] &@ PrimePi@ Select[Prime@ Range@ 216, Times @@ Boole@ PrimeQ[# + {2, 6}] > 0 &] // Flatten (* Michael De Vlieger, Aug 02 2016 *)
3 is in this sequence because 30*3^2 - 1 = 269 and 30*3^2 + 1 = 271 are twin primes.
[n: n in [1..1500] | IsPrime(30*n^2-1) and IsPrime(30*n^2+1)];
Select[Range@ 1431, PrimeQ[30*#^2 + 1] && PrimeQ[30*#^2 - 1] &] (* Indranil Ghosh, Mar 17 2017 *)
is(n)=isprime(30*n^2-1) && isprime(30*n^2+1) \\ Charles R Greathouse IV, Mar 17 2017
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
a(1) = 17 = A074040(1) + 2 = 3*5 + 2.
(* function a074040[ ] is defined in A074040 *) a343778[n_] := Select[Map[#+2&, a074040[n]], PrimeQ] a343778[30]
Comments