login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 5 20:40 EST 2019. Contains 329777 sequences. (Running on oeis4.)