login
Smallest multiple of n sandwiched between two numbers both having square divisors.
1

%I #10 Jul 04 2018 12:09:05

%S 17,26,51,244,55,846,49,424,99,170,55,3480,26,476,1275,1376,17,846,19,

%T 1520,651,638,161,3480,125,26,243,476,377,3480,341,1376,99,170,595,

%U 6876,629,874,351,1520,451,28224,559,2024,1665,874,235,18768,49,7300,51,5824

%N Smallest multiple of n sandwiched between two numbers both having square divisors.

%H Harvey P. Dale, <a href="/A085051/b085051.txt">Table of n, a(n) for n = 1..1000</a>

%e a(7) = 49 as 48 (= 4^2*3) and 50 (= 5^2*2 ) both are divisible by squares.

%t PrimeExponents[n_] := Last[ Union[ Flatten[ Table[ # [[2]], {1}] & /@ FactorInteger[n]]]]; f[n_] := Block[{k = 1}, While[a = k*n; PrimeExponents[a - 1] < 2 || PrimeExponents[a + 1] < 2, k++ ]; k*n]; Table[ f[n], {n, 1, 52}]

%t smn[n_]:=Module[{k=1},While[AnyTrue[k*n+{1,-1},SquareFreeQ],k++];k*n]; Array[smn,60] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Jul 04 2018 *)

%K nonn

%O 1,1

%A _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 20 2003

%E Edited, corrected and extended by _Robert G. Wilson v_, Jun 21 2003