login
A336123
a(1) = 0, a(2) = 1, and for n > 2, a(n) = [A122111(n) == 1 (mod 4)] + a(A253553(n)).
4
0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 2, 3, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1, 2, 2, 1, 1, 3, 1, 1, 3, 3, 1, 1, 1, 2, 2, 2, 1, 3, 1, 1, 2, 2, 2, 1, 1, 2, 4, 1, 1, 3, 1, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 3, 1, 1, 3, 2, 1, 1, 1, 2, 2
OFFSET
1,8
LINKS
FORMULA
a(1) = 0, a(2) = 1, and for n > 2, a(n) = [A336124(n) == 1] + a(A253553(n)).
a(n) = A000120(A336125(n)).
For n > 1, a(n) = A292375(A122111(n)).
a(n) = A001222(n) - A336121(n).
For all n >= 0, a(3^n) = n.
PROG
(PARI)
\\ Uses also code given in A336124:
A253553(n) = if(n<=2, 1, my(f=factor(n), k=#f~); if(f[k, 2]>1, f[k, 2]--, f[k, 1] = precprime(f[k, 1]-1)); factorback(f));
A336123(n) = if(n<=2, n-1, (1==A336124(n))+A336123(A253553(n)));
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 17 2020
STATUS
approved