OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
PrimeExponents[n_] := Flatten[ Table[ # [[2]], {1}] & /@ FactorInteger[n]]; f[n_] := Block[{k = 1}, While[ Union[ PrimeExponents[k*n - 1]] != {1} || Union[ PrimeExponents[k*n + 1]] != {1}, k++ ]; k*n]; Table[ f[n], {n, 2, 70}]
smn[n_]:=Module[{c=1}, While[!SquareFreeQ[c*n-1]||!SquareFreeQ[c*n+1], c++]; c*n]; Array[smn, 70] (* Harvey P. Dale, Mar 24 2021 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 20 2003
EXTENSIONS
Edited and extended by Robert G. Wilson v, Jun 27 2003
a(1)-a(2) corrected by Amiram Eldar, Feb 24 2021
STATUS
approved