The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075321 Pair the odd primes so that the n-th pair is (p, p+2n) where p is the smallest prime not included earlier such that p and p+2n are primes and p+2n also does not occur earlier: (3, 5), (7, 11), (13, 19), (23, 31), (37, 47), (17, 29), (53, 67) ... This is the sequence of the first member of every pair. 3
3, 7, 13, 23, 37, 17, 53, 43, 61, 83, 109, 73, 101, 139, 41, 149, 157, 137, 113, 193, 197, 179, 211, 229, 263, 199, 227, 107, 331, 293, 311, 283, 241, 269, 349, 359, 383, 367, 401, 317, 379, 439, 491, 421, 409, 449, 463, 467 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Question: Is every prime a member of some pair?
If the distance between the prime pairs is not required to be 2n, we get A031215. - R. J. Mathar, Nov 26 2014
a(n) = A075323(2*n-1).
LINKS
EXAMPLE
a(4)=23: For the 4th pair though 17 is the smallest prime not occurring earlier, 17+8 = 25 is not a prime and 23 + 8 = 31 is a prime.
MAPLE
A075321p := proc(n)
option remember;
local prevlist, i, p, q ;
if n = 1 then
return [3, 5];
else
prevlist := [seq(op(procname(i)), i=1..n-1)] ;
for i from 2 do
p := ithprime(i) ;
if not p in prevlist then
q := p+2*n ;
if isprime(q) and not q in prevlist then
return [p, q] ;
end if;
end if;
end do:
end if;
end proc:
A075321 := proc(n)
op(1, A075321p(n)) ;
end proc:
seq(A075321(n), n=1..60) ; # R. J. Mathar, Nov 26 2014
MATHEMATICA
A075321p[n_] := A075321p[n] = Module[{prevlist, i, p, q }, If[n == 1, Return[{3, 5}], prevlist = Array[A075321p, n-1] // Flatten]; For[i = 2, True, i++, p = Prime[i]; If[FreeQ[prevlist, p], q = p + 2*n ; If[ PrimeQ[q] && FreeQ[ prevlist, q], Return[{p, q}]]]]];
A075321 [n_] := A075321p[n][[1]];
Array[A075321, 50] (* Jean-François Alcover, Feb 12 2018, translated from R. J. Mathar's program *)
PROG
(Haskell)
a075321 = a075323 . subtract 1 . (* 2)
-- Reinhard Zumkeller, Nov 29 2014
CROSSREFS
Sequence in context: A101301 A103116 A303853 * A258030 A164787 A131205
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Sep 14 2002
EXTENSIONS
Corrected by R. J. Mathar, Nov 26 2014
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 07:25 EDT 2024. Contains 373146 sequences. (Running on oeis4.)