|
|
A092488
|
|
a(n) = least k such that {n+0, n+1, n+2, n+3, ... n+k} has a nonempty subset the product of whose members is a square.
|
|
3
|
|
|
0, 2, 1, 0, 4, 3, 2, 1, 0, 6, 5, 4, 3, 2, 1, 0, 8, 7, 6, 5, 4, 3, 2, 1, 0, 9, 8, 8, 7, 6, 5, 4, 3, 2, 1, 0, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 13, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems in Number Theory, B30.
|
|
LINKS
|
|
|
EXAMPLE
|
Often a(n) is the distance from n to the next square. But, e.g., a(26)=9 (not 10) because 27*28*30*32*35 is a square.
|
|
MATHEMATICA
|
(* This program is not suitable to compute a large number of terms *)
a[n_] := Module[{n0, t}, n0 = Ceiling[Sqrt[n]]^2; If[n == n0, Return[0]]; Do[t = Table[n+j, {j, 0, k}]; If[AnyTrue[Subsets[t, {m}], IntegerQ[ Sqrt[ Times @@ #]]&], Return[k]], {k, 1, n0-n}, {m, 1, k+1}] ]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 200}] (* Jean-François Alcover, Nov 19 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|