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!)
A359273 a(n) = least positive integer k such that (prime(n+k)-prime(n))/n is an integer. 0
1, 1, 2, 1, 6, 2, 4, 6, 4, 7, 5, 6, 6, 6, 13, 10, 14, 4, 23, 12, 16, 4, 42, 6, 20, 5, 10, 10, 10, 10, 23, 6, 24, 6, 37, 12, 38, 14, 40, 22, 151, 6, 16, 16, 46, 22, 60, 10, 49, 25, 65, 43, 16, 18, 18, 27, 19, 38, 56, 19, 144, 30, 21, 21, 21, 10, 42, 32, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(5) = 6 because 5 divides 20, which is prime(5+6) - prime(5)), and if 0 < k < 6, then 5 does not divide prime(5+k) - prime(5).
MAPLE
f:= proc(n) local p, k, q;
p:= ithprime(n); q:= p;
for k from 1 do
q:= nextprime(q);
if (q - p) mod n = 0 then return k fi;
od
end proc:
map(f, [$1..100]); # Robert Israel, Jan 26 2023
MATHEMATICA
p[n_] := Prime[n];
a[n_] := Select[Range[1000], IntegerQ[(p[n + #] - p[n])/n] &, 1]
Flatten[Table[a[n], {n, 1, 130}]]
CROSSREFS
Sequence in context: A333726 A306549 A198870 * A372909 A365048 A050457
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 26 2023
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 22 06:13 EDT 2024. Contains 375356 sequences. (Running on oeis4.)