OFFSET
1,9
COMMENTS
The length of a shortest path from n to a power of 2, when using the transitions x -> A171462(x) and x -> A335876(x) in any order.
a((2^e)-1) is equal to A046051(e) = A001222((2^e)-1) when e is either a Mersenne exponent (in A000043), or some other number: 1, 4, 6, 8, 16, 32. For example, 32 is present because 2^32 - 1 = 4294967295 = 3*5*17*257*65537, a squarefree product of five known Fermat primes. - Antti Karttunen, Aug 11 2020
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537
FORMULA
EXAMPLE
PROG
(PARI) A335885(n) = { my(f=factor(n)); sum(k=1, #f~, if(2==f[k, 1], 0, f[k, 2]*(1+min(A335885(f[k, 1]-1), A335885(f[k, 1]+1))))); };
(PARI)
\\ Or empirically as:
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));
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 29 2020
STATUS
approved