OFFSET
0,2
COMMENTS
a(1000)=793775, a(10000)=79261054, a(100000)=7924941755, a(1000000)=792482542841.
LINKS
Zak Seidov, Table of n, a(n) for n = 0..10000 (terms for n = 0..1000 from Charles R Greathouse IV).
N. Carey, Lambda Words: A Class of Rich Words Defined Over an Infinite Alphabet, arXiv preprint arXiv:1303.0888 [math.CO], 2013.
N. Carey, Lambda Words: A Class of Rich Words Defined Over an Infinite Alphabet, J. Int. Seq. 16 (2013) #13.3.4.
FORMULA
a(n) ~ kn^2 with k = log(3)/log(4) = 0.792.... More exact asymptotics? - Zak Seidov, Dec 22 2011
a(n+1) = a(n) + A020914(n+1). - Ruud H.G. van Tol, Nov 25 2022
kn^2 + kn + 1 <= a(n) <= kn^2 + (k+1)n + 1, so a(n) = kn^2 + O(n) with k = log(3)/log(4). The law of the iterated logarithm suggests that a better error term might be possible. - Charles R Greathouse IV, Nov 28 2022
MATHEMATICA
c[0] = 1; c[n_] := 1 + Sum[Ceiling[j*Log[2, 3]], {j, n}]; Table[c[i], {i, 0, 51}] (* Norman Carey, Jun 13 2012 *)
PROG
(PARI) listsm(lim)=my(v=List(), N); for(n=0, log(lim)\log(3), N=3^n; while(N<=lim, listput(v, N); N<<=1)); v=Vec(v); vecsort(v)
list(lim)=my(v=listsm(3^floor(lim))); vector(floor(lim+1), i, setsearch(v, 3^(i-1))) \\ Charles R Greathouse IV, Aug 19 2011
(PARI) a(n)=sum(k=0, n, logint(3^k, 2))+n+1 \\ Charles R Greathouse IV, Nov 22 2022
(Python)
def A022330(n): return sum((3**i).bit_length() for i in range(n+1)) # Chai Wah Wu, Sep 16 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved