login
A335420
a(n) = A000120(A163511(n)).
3
1, 1, 1, 2, 1, 2, 2, 2, 1, 4, 2, 3, 2, 4, 2, 3, 1, 3, 4, 6, 2, 4, 3, 3, 2, 4, 4, 3, 2, 3, 3, 3, 1, 6, 3, 5, 4, 7, 6, 6, 2, 4, 4, 6, 3, 4, 3, 5, 2, 4, 4, 6, 4, 4, 3, 4, 2, 6, 3, 5, 3, 2, 3, 3, 1, 6, 6, 6, 3, 7, 5, 5, 4, 5, 7, 7, 6, 3, 6, 6, 2, 5, 4, 5, 4, 8, 6, 7, 3, 6, 4, 6, 3, 6, 5, 4, 2, 5, 4, 7, 4, 4, 6, 5, 4, 6
OFFSET
0,4
FORMULA
a(n) = A000120(A163511(n)).
a(n) = A001222(A335422(n)).
a(n) = a(2n) = a(A000265(n)).
For all n >= 0, a(2^n) = 1.
PROG
(PARI)
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
A054429(n) = ((3<<#binary(n\2))-n-1);
A163511(n) = if(!n, 1, A005940(1+A054429(n)));
A335420(n) = hammingweight(A163511(n));
(Python)
from sympy import nextprime
def A335420(n):
c, p, k = 1, 1, n
while k:
c *= (p:=nextprime(p))**(s:=(~k&k-1).bit_length())
k >>= s+1
return (c*p).bit_count() # Chai Wah Wu, Jul 25 2023
CROSSREFS
Cf. A000079 (positions of ones), A000120, A001222, A163511, A335421, A335422.
Cf. also A323901, A334204.
Sequence in context: A104640 A193335 A016727 * A241318 A276064 A054992
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jun 09 2020
STATUS
approved