|
|
A332558
|
|
a(n) is the smallest k such that n*(n+1)*(n+2)*...*(n+k) is divisible by n+k+1.
|
|
15
|
|
|
4, 3, 2, 3, 4, 5, 4, 3, 5, 4, 6, 5, 6, 5, 4, 7, 6, 5, 4, 3, 6, 7, 6, 5, 4, 8, 7, 6, 6, 5, 8, 7, 6, 5, 4, 8, 7, 6, 5, 7, 6, 5, 10, 9, 8, 9, 8, 7, 6, 9, 8, 7, 6, 5, 4, 6, 12, 11, 10, 9, 8, 7, 6, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This is a multiplicative analog of A332542.
a(n) always exists because one can take k to be 2^m - 1 for m large.
|
|
LINKS
|
|
|
FORMULA
|
a(n + 1) >= a(n) - 1. a(n + 1) = a(n) - 1 mostly. - David A. Corneth, Apr 14 2020
|
|
MAPLE
|
f:= proc(n) local k, p;
p:= n;
for k from 1 do
p:= p*(n+k);
if (p/(n+k+1))::integer then return k fi
od
end proc:
|
|
MATHEMATICA
|
a[n_] := Module[{k, p = n}, For[k = 1, True, k++, p *= (n+k); If[Divisible[p, n+k+1], Return[k]]]];
|
|
PROG
|
(PARI) a(n) = {my(r=n*(n+1)); for(k=2, oo, r=r*(n+k); if(r%(n+k+1)==0, return(k))); } \\ Jinyuan Wang, Feb 25 2020
(PARI) \\ See Corneth link
(Python)
def a(n):
k, p = 1, n*(n+1)
while p%(n+k+1): k += 1; p *= (n+k)
return k
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|