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!)
A280941 Least integer k such that prime(k+1) - prime(k) = 2 and prime(k+2) - prime(k+1) = 2n, or 0 if no such k exists. 0
2, 3, 10, 0, 33, 45, 0, 294, 98, 0, 296, 262, 0, 428, 984, 0, 1456, 3086, 0, 2343, 1878, 0, 14938, 8422, 0, 2809, 4259, 0, 7809, 13819, 0, 51036, 45506, 0, 15782, 30764, 0, 57764, 24553, 0, 23282, 51942, 0, 44902, 34214, 0, 1242641, 95929, 0, 66761 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Or least integer k such that prime(k+2) - prime(k+1) = 2n where prime(k) is in A001359 (lesser of twin primes).
The corresponding prime(k) are 3, 5, 29, 137, 197, 1931, 521, 1949, 1667, 2969, 7757, 12161, 28349, 20807, ...
a(n) is a subsequence of A029707(n) or subsequence of A107770(n) - 1.
a(n) = 0 for n == 1 mod 3 for n > 1.
Proof: prime(k+1) - prime(k) = 2 => prime(k+1) == 1 mod 6 and prime(k) == -1 mod 6. If prime(k+2) - prime(k+1) = 2n, then prime(k+2) = 2(n+1) + prime(k). Combining n == 1 mod 3 and prime(k) == -1 mod 6 we obtain prime(k+2) == 3 mod 6, a contradiction because prime(k+2) == +-1 mod 6. Hence, a(n) = 0.
LINKS
EXAMPLE
a(3) = 10 because prime(11) - prime(10) = 31 - 29 = 2 and prime(12) - prime(11) = 37 - 31 = 6 = 2*3.
a(11) = 296 because prime(297) - prime(296) = 1951 - 1949 = 2 and prime(298) - prime(297) = 1973 - 1951 = 22 = 2*11.
MAPLE
nn:=50:m:=10^5:
for n from 1 to 50 do:
ii:=0:
for k from 1 to m while(ii=0) do:
p1:=ithprime(k):p2:=ithprime(k+1):p3:=ithprime(k+2):
if p2-p1 = 2 and p3-p2 = 2*n
then
ii:=1:printf(`%d %d \n`, n, k):
else
fi:
od:
if ii=0 then printf(`%d %d \n`, n, 0):
else
fi:
od:
MATHEMATICA
Table[If[And[n > 1, Mod[n, 3] == 1], 0, k = 1; While[Nand[# - Prime@ k == 2, Prime[k + 2] - # == 2 n] &@ Prime[k + 1], k++]; k], {n, 40}] (* Michael De Vlieger, Jan 14 2017 *)
CROSSREFS
Sequence in context: A248236 A319157 A153702 * A347122 A130110 A342045
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jan 11 2017
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 August 20 22:00 EDT 2024. Contains 375340 sequences. (Running on oeis4.)