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.

A070198 Smallest nonnegative number m such that m == i (mod i+1) for all 1 <= i <= n.

This page as a plain text file.
%I A070198 #68 Feb 16 2025 08:32:46
%S A070198 0,1,5,11,59,59,419,839,2519,2519,27719,27719,360359,360359,360359,
%T A070198 720719,12252239,12252239,232792559,232792559,232792559,232792559,
%U A070198 5354228879,5354228879,26771144399,26771144399,80313433199,80313433199
%N A070198 Smallest nonnegative number m such that m == i (mod i+1) for all 1 <= i <= n.
%C A070198 Also, smallest k such that, for 0 <= i < n, i+1 divides k-i.
%C A070198 Suggested by Chinese Remainder Theorem. This sequence can generate others: smallest b(n) such that b(n) == i (mod (i+2)), 1 <= i <= n, gives b(1)=1 and b(n) = a(n+1)-1 for n > 1; smallest c(n) such that c(n) == i (mod (i+3)), 1 <= i <= n, gives c(1)=1, c(2)=17 and c(n) = a(n+2) - 2 for n > 2; smallest d(n) such that c(n) == i (mod (i+4)), 1 <= i <= n, gives d(1)=1, d(2)=26, d(3)=206 and d(n) = a(n+3) - 3 for n > 3, etc.
%C A070198 A208768(n) occurs A057820(n) times. - _Reinhard Zumkeller_, Mar 01 2012
%C A070198 From _Kival Ngaokrajang_, Oct 10 2013: (Start)
%C A070198 A070198(n-1) is m such that max(Sum_{i=1..n} m (mod i)) = A000217(n-1).
%C A070198 Example for n = 3:
%C A070198   m\i = 1  2  3  sum
%C A070198   1     0  1  1   2
%C A070198   2     0  0  2   2
%C A070198   3     0  1  0   1
%C A070198   4     0  0  1   1
%C A070198   5     0  1  2   3 <--max remainder sum = 3 = A000217(2)
%C A070198   6     0  0  0   0  first occurs at m = 5 = A070198(2)
%C A070198 (End)
%H A070198 Reinhard Zumkeller, <a href="/A070198/b070198.txt">Table of n, a(n) for n = 0..1000</a>
%H A070198 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ChineseRemainder Theorem.html">Chinese Remainder Theorem</a>
%H A070198 Wikipedia, <a href="http://en.wikipedia.org/wiki/Chinese_remainder_theorem">Chinese remainder theorem</a>
%H A070198 <a href="/index/Lc#lcm">Index entries for sequences related to lcm's</a>
%F A070198 a(n) = lcm(1, 2, 3, ..., n+1) - 1 = A003418(n+1) - 1.
%e A070198 a(3) = 11 because 11 == 1 (mod 2), 11 == 2 (mod 3) and 11 == 3 (mod 4).
%p A070198 seq(ilcm($1..n) - 1, n=1..100); # _Robert Israel_, Nov 03 2014
%t A070198 f[n_] := ChineseRemainder[ Range[0, n - 1], Range[n]]; Array[f, 28] (* or *)
%t A070198 f[n_] := LCM @@ Range@ n - 1; Array[f, 28] (* _Robert G. Wilson v_, Oct 30 2014 *)
%o A070198 (Haskell)
%o A070198 a070198 n = a070198_list !! n
%o A070198 a070198_list = map (subtract 1) $ scanl lcm 1 [2..]
%o A070198 -- _Reinhard Zumkeller_, Mar 01 2012
%o A070198 (Magma) [Exponent(SymmetricGroup(n))-1 : n in [1..30]]; /* _Vincenzo Librandi_, Oct 31 2014 - after _Arkadiusz Wesolowski_ in A003418 */
%o A070198 (Python)
%o A070198 from math import lcm
%o A070198 def A070198(n): return lcm(*range(1,n+2))-1 # _Chai Wah Wu_, May 02 2023
%Y A070198 Cf. A053664, A072562.
%Y A070198 Cf. A057825 (indices of primes). - _R. J. Mathar_, Jan 14 2009
%Y A070198 Cf. A116151. - _Zak Seidov_, Mar 11 2014
%K A070198 easy,nonn
%O A070198 0,3
%A A070198 _Benoit Cloitre_, May 06 2002
%E A070198 Edited by _N. J. A. Sloane_, Nov 18 2007, at the suggestion of _Max Alekseyev_