login
A099490
Least k such that the interval [n,k] contains a subset of integers whose product is twice a square.
0
2, 2, 6, 8, 8, 8, 8, 8, 15, 15, 18, 18, 18, 18, 18, 18, 18, 18, 27, 27, 27, 27, 27, 27, 32, 32, 32, 32, 32, 32, 32, 32, 45, 45, 45, 45, 45, 45, 45, 45, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 63, 63, 63, 63, 63, 63, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72, 72
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
Sequence in context: A091441 A269565 A334518 * A167878 A351928 A331786
KEYWORD
nonn
AUTHOR
T. D. Noe, Oct 19 2004
STATUS
approved