OFFSET
1,2
COMMENTS
Similar sequence to A358093, though here the definition works between a(n-1) and a(n-3) (skipping a(n-2)) so there is no evident parity pattern, and adjacent pairs are not always coprime.
EXAMPLE
To find a(4): a(1)=1, a(3)=3 so a(4) is the least m such that rad(n) = rad(rad(1) + rad(3)) = rad(4) = 2. Since 2 has occurred already, a(4) = 4.
MATHEMATICA
nn = 62; c[_] = False; p[_] = q[_] = 1; f[n_] := Times @@ FactorInteger[n][[All, 1]]; Array[Set[{a[#], c[#]}, {#, True}] &, 3]; Array[(q[#]++; p[#]++) &[f[a[#]] ] &, 3]; Set[{i, j, k}, Array[f[a[#]] &, 3]]; Do[s = f[i + k]; If[PrimeQ[s], m = s^p[s]; p[s]++, m = q[s]; While[Nand[! c[m s], PowerMod[s, s, m] == 0], m++]; m *= s]; q[s]++; Set[{a[n], c[m], i, j, k}, {m, True, j, k, s}], {n, 4, nn}]; Array[a, nn] (* Michael De Vlieger, Nov 12 2022 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Nov 11 2022
STATUS
approved