OFFSET
1,1
LINKS
Andrew Granville and John Selfridge, Product of integers in an interval, modulo squares, Electronic Journal of Combinatorics, Volume 8(1), 2001.
EXAMPLE
a(9) = 15 because the interval [9,15] contains the subset {10,12,15} whose product is 2*30^2 and no shorter interval starting with 9 has such a subset.
MATHEMATICA
Needs["DiscreteMath`Combinatorica`"]; Table[If[n==1, n1=2, n1=n]; found=False; While[ !found, lst=Range[n, n1]; x=Times@@lst; {p, e}=Transpose[FactorInteger[x]]; Do[If[e[[i]]==1 && p[[i]]!=2, lst=DeleteCases[lst, _?(Mod[ #, p[[i]]]==0&)]], {i, Length[p]}]; i=1; While[i<2^Length[lst] && !found, ss=NthSubset[i, lst]; x=Times@@ss; If[Mod[x, 2]==0 && IntegerQ[Sqrt[x/2]], found=True (*; Print[{n, ss}]*)]; i++ ]; If[ !found, n1++ ]]; n1, {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 19 2004
STATUS
approved