OFFSET
0,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000 (terms 0..1000 from Zak Seidov)
FORMULA
A003586(a(n)) = 6^n, for n >= 0.
a(n) ~ (log(6))^2/(log(3)*log(4))*n^2 = 2.1079...*n^2.
EXAMPLE
MATHEMATICA
a[n_] := Sum[Floor[Log[3, 6^n/2^i]] + 1, {i, 0, Log2[6^n]}]; Array[a, 50, 0] (* Amiram Eldar, Jul 15 2023 *)
PROG
(Python) # uses imports/function in A372401
print(list(islice(A372401gen(p=3), 1000))) # Michael S. Branicky, Jun 06 2024
(Python)
from sympy import integer_log
def A202821(n): return 1+n*(n+1)+sum((m:=3**i).bit_length()+((1<<n)//m).bit_length() for i in range(1, integer_log(1<<n, 3)[0]+1))+sum((3**i).bit_length() for i in range(integer_log(1<<n, 3)[0]+1, n+1)) # Chai Wah Wu, Oct 22 2024
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Zak Seidov, Dec 25 2011
STATUS
approved