cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A068901 Least number that when added to the n-th prime gives a multiple of n.

This page as a plain text file.
%I A068901 #28 Jul 31 2023 02:55:33
%S A068901 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,
%T A068901 28,29,28,31,26,29,28,27,28,27,26,29,24,27,28,31,24,17,18,21,22,21,24,
%U A068901 19,18,17,16,19,18,19,22,17,8,9,12,13,4,3,67,1
%N A068901 Least number that when added to the n-th prime gives a multiple of n.
%H A068901 Reinhard Zumkeller, <a href="/A068901/b068901.txt">Table of n, a(n) for n = 1..10000</a>
%F A068901 a(n) = Min_{k | n divides (prime(n)+k)}.
%F A068901 a(n) = A068902(n) - A000040(n).
%F A068901 a(n) = n*ceiling(prime(n)/n) - prime(n). - _Vladeta Jovovic_, Apr 06 2003
%t A068901 f[n_] := Module[{p=Prime[n]}, n*Ceiling[p/n]-p]; Array[f,100]  (* _Harvey P. Dale_, Apr 06 2011 *)
%o A068901 (Haskell)
%o A068901 a068901 n = head $
%o A068901    filter ((== 0) . (`mod` fromIntegral n) . (+ a000040 n)) $ [0..]
%o A068901 -- _Reinhard Zumkeller_, Feb 18 2012
%Y A068901 Cf. A090973. - _Reinhard Zumkeller_, Aug 16 2009
%Y A068901 Cf. A000040, A068902.
%K A068901 nonn,nice,look
%O A068901 1,5
%A A068901 _Reinhard Zumkeller_, Mar 05 2002