A382769 Largest k < n such that gcd(k,n) > 1 and rad(k) does not divide n, where rad = A007947, or 0 if k does not exist.
0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 10, 0, 12, 12, 0, 0, 15, 0, 18, 18, 20, 0, 22, 0, 24, 0, 26, 0, 28, 0, 0, 30, 30, 30, 34, 0, 36, 36, 38, 0, 40, 0, 42, 42, 44, 0, 46, 0, 48, 48, 50, 0, 52, 50, 54, 54, 56, 0, 58, 0, 60, 60, 0, 60, 63, 0, 66, 66, 68, 0, 70, 0, 72
Offset: 1
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
rad[x_] := rad[x] = Times @@ FactorInteger[x][[All, 1]]; {0}~Join~Table[If[Nor[PrimePowerQ[n], n == 6], k = n - 2; While[Or[CoprimeQ[n, k], Divisible[n, rad[k]]], k--]; k, 0], {n, 2, 120}]