OFFSET
1,1
COMMENTS
For n >= 4, a(n) = A003418(n) - 1. Also for n < 4, a(n) is the smallest number congruent to (i-1) (mod i) for any i in {1..n}. That results directly from the definition of A003418 (if p == 0 (mod q), p-1 == (q-1) (mod q)) and from the first comment. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Aug 29 2007
EXAMPLE
a(4) = lcm(1, 2, 3, 4) - 1 = 12 - 1 = 11. a(5) = lcm(1, 2, 3, 4, 5) - 1 = 60 - 1 = 59. - Michael Somos, Feb 28 2014
MAPLE
A079782 := proc(n) local a, found, r ; a := n+1 ; while true do found := true ; for r from 1 to n do if (a+r-1) mod (n-r+1) <> 0 then found := false ; break ; fi ; od ; if found then RETURN(a+n-1) ; fi ; a :=a+1 ; od ; end: for n from 1 to 20 do print(A079782(n)) ; od ; # R. J. Mathar, Nov 12 2006
MATHEMATICA
a[n_] := Which[n == 1, 2, n == 2, 5, n == 3, 11, True, LCM@@ Range[n] - 1];
Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Jun 16 2024 *)
PROG
(PARI) okrow(m, n) = {v = vector(n, i, i+m-1); for (i=1, n, if (v[i] % (n-i+1), return (0)); ); return (1); }
a(n) = {m = n+1; while (! okrow(m, n), m++); m+n-1; } \\ Michel Marcus, Feb 28 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Feb 03 2003
EXTENSIONS
More terms from R. J. Mathar, Nov 12 2006
More terms from Michel Marcus, Feb 28 2014
STATUS
approved