|
|
A340800
|
|
a(n) is the least prime p = prime(k) such that the next prime with the same last digit as p is prime(k+n).
|
|
0
|
|
|
139, 19, 7, 3, 17, 11, 29, 113, 883, 397, 929, 331, 269, 4409, 10067, 14969, 10891, 22859, 57331, 57107, 78283, 41603, 46273, 27283, 527929, 623299, 906847, 425417, 1086923, 4343363, 1409851, 10943963, 10323179, 31857151, 7929491, 33747317, 5376551
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(n) = prime(k) for the first k such that A072971(k) = n.
|
|
LINKS
|
|
|
EXAMPLE
|
a(5) = 17 = prime(7) because the next prime after 17 with last digit 7 is 37 = prime(7+5).
|
|
MAPLE
|
N:= 30: # for a(1) to a(N)
f:= proc(n) local p, k, t;
p:= ithprime(n);
t:= p mod 10;
for k from 1 do
p:= nextprime(p);
if p mod 10 = t then return k fi
od
end proc:
V:= Vector(N): V[4]:= 3; count:= 1:
for n from 4 while count < N do
v:= f(n);
if v > 0 and v <= N and V[v] = 0 then
V[v]:= ithprime(n); count:= count+1;
fi
od:
convert(V, list);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|