login
A334107
a(n) = A329697(A122111(n)).
8
0, 0, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 2, 0, 2, 0, 1, 2, 1, 0, 2, 3, 1, 2, 1, 0, 2, 0, 2, 2, 1, 3, 3, 0, 1, 2, 2, 0, 2, 0, 1, 2, 1, 0, 2, 4, 3, 2, 1, 0, 3, 3, 2, 2, 1, 0, 3, 0, 1, 2, 2, 3, 2, 0, 1, 2, 3, 0, 3, 0, 1, 3, 1, 4, 2, 0, 2, 4, 1, 0, 3, 3, 1, 2, 2, 0, 3, 4, 1, 2, 1, 3, 2, 0, 4, 2, 4, 0, 2, 0, 2, 3
OFFSET
1,9
LINKS
FORMULA
a(n) = A329697(A122111(n)) = A329697(A322865(n)).
a(n) = A329697(A105560(n)) + a(A064989(n)).
For n >= 1, a(A001248(n)) = n, and these seem to be also the first occurrences of each n.
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)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
A329697(n) = if(!bitand(n, n-1), 0, 1+A329697(n-(n/vecmax(factor(n)[, 1]))));
CROSSREFS
Sequence in context: A119995 A062756 A360676 * A346700 A301574 A272728
KEYWORD
nonn
AUTHOR
Antti Karttunen, Apr 29 2020
STATUS
approved