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!)
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)}.
a(n) = A068902(n) - A000040(n).
a(n) = n*ceiling(prime(n)/n) - prime(n). - Vladeta Jovovic, Apr 06 2003
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..]
-- Reinhard Zumkeller, Feb 18 2012
CROSSREFS
Cf. A090973. - Reinhard Zumkeller, Aug 16 2009
Sequence in context: A343954 A063694 A242624 * A010710 A021026 A126128
KEYWORD
nonn,nice,look
AUTHOR
Reinhard Zumkeller, Mar 05 2002
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 June 29 20:26 EDT 2024. Contains 373855 sequences. (Running on oeis4.)