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!)
A342822 a(n) is the least k such that A342821(k) = prime(n). 2
1, 3, 7, 13, 19, 31, 126, 24, 241, 12, 75, 193, 37, 180, 318, 496, 154, 142, 328, 117, 838, 415, 423, 367, 783, 124, 1018, 1621, 334, 118, 973, 619, 1453, 349, 337, 1089, 1825, 1593, 888, 613, 649, 324, 1509, 2413, 733, 727, 342, 573, 4648, 387, 1663, 2827, 2260, 129, 3363, 3723, 2239, 1159, 3868 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
If p = prime(n), a(n) is the least k such that p*k+k-1 and p*k-k+1 are prime but for every prime q < p, q*k+k-1 and q*k-k+1 are not both prime.
LINKS
EXAMPLE
a(5) = 19 because A342821(19) = prime(5) = 11 and this is the first appearance of 11 in A342821.
MAPLE
N:= 100: # for a(1)..a(N)
V:= Vector(N):
g:= proc(n) local ip, p; pmax;
for ip from 1 to `if`(n mod 3 = 2, 2, infinity) do
p:= ithprime(ip);
if isprime(n*p+n-1) and isprime(n*p-n+1) then return ip fi;
od:
0
end proc:
count:= 0:
for n from 1 while count < N do
v:= g(n);
if v >= 1 and v <= N and V[v] = 0 then
count:= count+1; V[v]:= n;
fi
od:
convert(V, list);
CROSSREFS
Cf. A342821.
Sequence in context: A216515 A048977 A216518 * A154650 A015913 A023200
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Apr 25 2021
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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)