

A105342


Least k > 0 such that prime(n+k) == k (mod prime(n)).


2



1, 4, 3, 3, 8, 5, 47, 30, 7, 9, 9, 20, 81, 11, 13, 135, 52, 15, 17, 47, 17, 51, 141, 207, 78, 152, 23, 160, 67, 147, 142, 102, 398, 29, 62, 212, 91, 151, 443, 758, 70, 70, 39, 318, 39, 76, 280, 327, 125, 267, 434, 166, 88, 1261, 369, 98, 307, 98, 724, 358, 53, 104, 59, 681, 112, 159, 410, 371, 1007
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS

Robert Israel, Table of n, a(n) for n = 1..10000


MAPLE

f:= proc(n) local p, k;
p:= ithprime(n);
for k from 1 do if ithprime(n+k)  k mod p = 0 then return k fi
od:
end proc:
map(f, [$1..100]); # Robert Israel, Oct 27 2017


MATHEMATICA

bb={}; Do[Do[If[k==Mod[Prime[n+k], Prime[n]], bb=Append[bb, k]; Goto[ne]]; Label[ne], {k, Prime[n]1}], {n, 100}]; bb


CROSSREFS

Sequence in context: A038627 A155835 A138187 * A323601 A055525 A309046
Adjacent sequences: A105339 A105340 A105341 * A105343 A105344 A105345


KEYWORD

nonn


AUTHOR

Zak Seidov, Apr 30 2005


EXTENSIONS

Corrected by Robert Israel, Oct 27 2017


STATUS

approved



