OFFSET
1,9
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
MATHEMATICA
Map[Length@ NestWhileList[# - #/FactorInteger[#][[-1, 1]] &, #, # != 2^IntegerExponent[#, 2] &] - 1 &, Array[Times @@ Table[Prime[LengthWhile[#1, # >= j &] /. 0 -> 1], {j, #2}] & @@ {#, Max[#]} &@ PrimePi@ Flatten[ConstantArray[#1, {#2}] & @@@ FactorInteger@ #] &, 105] ] (* Michael De Vlieger, May 14 2020, after Robert G. Wilson v at A329697 *)
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 29 2020
STATUS
approved