OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
a(7) = 49 as 48 (= 4^2*3) and 50 (= 5^2*2 ) both are divisible by squares.
MATHEMATICA
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}]
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 20 2003
EXTENSIONS
Edited, corrected and extended by Robert G. Wilson v, Jun 21 2003
STATUS
approved