OFFSET
1,5
COMMENTS
The asymptotic density of the occurrences of 0 is sqrt(2)-1 and of the occurrences of k = 1, 2, ... is 2*(sqrt(2)-1)^(k+1).
The asymptotic mean of this sequence is 1 and its asymptotic variance is sqrt(2).
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; IntegerExponent[Total[3^(s - 1)], 3]]; Array[a, 100]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Mar 16 2022
STATUS
approved