OFFSET
1,5
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
EXAMPLE
From 9 one can reach with the transitions x -> A171462(x) (leftward arrow) and x -> A335876(x) (rightward arrow) the following three numbers, when one doesn't expand any power of 2 (in this case, 4, 8 and 16, that are not included in the count) further:
9
/ \
6 12
/ \ / \
(4) (8) (16)
thus a(9) = 3.
From 10 one can reach with the transitions x -> A171462(x) and x -> A335876(x) the following two numbers (10 & 12), when one doesn't expand any powers of 2 (8 and 16 in this case, not counted) further:
10
|\
| \
| 12
| /\
|/ \
(8) (16)
thus a(10) = 2.
For n = 9, the numbers encountered are 6, 9, 12, thus a(9) = 3.
For n = 67, the numbers encountered are 48, 60, 66, 67, 68, 72, 96, thus a(67) = 7.
For n = 105, the numbers encountered are 48, 72, 90, 96, 105, 108, 120, 144, 192, thus a(105) = 9.
PROG
(PARI)
A171462(n) = if(1==n, 0, (n-(n/vecmax(factor(n)[, 1]))));
A335876(n) = if(1==n, 2, (n+(n/vecmax(factor(n)[, 1]))));
A209229(n) = (n && !bitand(n, n-1));
A335905(n) = if(A209229(n), 0, my(xs=Set([n]), allxs=xs, newxs, a, b, u); for(k=1, oo, newxs=Set([]); if(!#xs, return(#allxs)); allxs = setunion(allxs, xs); for(i=1, #xs, u = xs[i]; a = A171462(u); if(!A209229(a), newxs = setunion([a], newxs)); b = A335876(u); if(!A209229(b), newxs = setunion([b], newxs))); xs = newxs));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 30 2020
STATUS
approved