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.

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.

This page as a plain text file.
%I A092488 #14 Nov 19 2016 06:40:57
%S A092488 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,
%T A092488 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,
%U A092488 13,14,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,17
%N 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.
%D A092488 R. K. Guy, Unsolved Problems in Number Theory, B30.
%H A092488 Peter Kagey, <a href="/A092488/b092488.txt">Table of n, a(n) for n = 1..10000</a>
%e A092488 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.
%t A092488 (* This program is not suitable to compute a large number of terms *)
%t A092488 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 *)
%Y A092488 Cf. A068527, A068568, A092487.
%K A092488 nonn,easy,look
%O A092488 1,2
%A A092488 _R. K. Guy_, Apr 02 2004