login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A323921 a(n) = (4^(valuation(n, 4) + 1) - 1) / 3. 3
1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 85, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 5, 1, 1, 1, 21, 1, 1, 1, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
COMMENTS
Sum of powers of 4 dividing n.
LINKS
FORMULA
G.f.: Sum_{k>=0} 4^k * x^(4^k) / (1 - x^(4^k)).
L.g.f.: -log(Product_{k>=0} (1 - x^(4^k))).
Dirichlet g.f.: zeta(s) / (1 - 4^(1 - s)).
From Amiram Eldar, Nov 27 2022: (Start)
Multiplicative with a(2^e) = (4^floor((e+2)/2)-1)/3, and a(p^e) = 1 for p != 2.
Sum_{k=1..n} a(k) ~ n*log_4(n) + (1/2 + (gamma - 1)/log(4))*n, where gamma is Euler's constant (A001620). (End)
MATHEMATICA
Table[(4^(IntegerExponent[n, 4] + 1) - 1)/3, {n, 1, 100}]
nmax = 100; CoefficientList[Series[Sum[4^k x^(4^k)/(1 - x^(4^k)), {k, 0, Floor[Log[4, nmax]] + 1}], {x, 0, nmax}], x] // Rest
PROG
(Python)
def A323921(n): return ((1<<((~n&n-1).bit_length()&-2)+2)-1)//3 # Chai Wah Wu, Jul 09 2022
(PARI) a(n) = (4^(valuation(n, 4) + 1) - 1) / 3; \\ Michel Marcus, Jul 09 2022
CROSSREFS
Sequence in context: A069293 A347398 A333751 * A293235 A066803 A089608
KEYWORD
nonn,mult
AUTHOR
Ilya Gutkovskiy, Dec 15 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 4 05:14 EDT 2024. Contains 375679 sequences. (Running on oeis4.)