|
|
A068901
|
|
Least number that when added to the n-th prime gives a multiple of n.
|
|
5
|
|
|
0, 1, 1, 1, 4, 5, 4, 5, 4, 1, 2, 11, 11, 13, 13, 11, 9, 11, 9, 9, 11, 9, 9, 7, 3, 3, 5, 5, 7, 7, 28, 29, 28, 31, 26, 29, 28, 27, 28, 27, 26, 29, 24, 27, 28, 31, 24, 17, 18, 21, 22, 21, 24, 19, 18, 17, 16, 19, 18, 19, 22, 17, 8, 9, 12, 13, 4, 3, 67, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Min_{k | n divides (prime(n)+k)}.
|
|
MATHEMATICA
|
f[n_] := Module[{p=Prime[n]}, n*Ceiling[p/n]-p]; Array[f, 100] (* Harvey P. Dale, Apr 06 2011 *)
|
|
PROG
|
(Haskell)
a068901 n = head $
filter ((== 0) . (`mod` fromIntegral n) . (+ a000040 n)) $ [0..]
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|