login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A229277
Number of ascending runs in {1,...,3}^n.
2
0, 3, 15, 63, 243, 891, 3159, 10935, 37179, 124659, 413343, 1358127, 4428675, 14348907, 46235367, 148272039, 473513931, 1506635235, 4778186031, 15109399071, 47652720147, 149931729243, 470715894135, 1474909801623, 4613015762523, 14403906360531, 44906296300479
OFFSET
0,2
FORMULA
G.f.: -3*(x-1)*x/(3*x-1)^2.
a(n) = 3^(n-1)*(2*n+1) for n>0, a(0) = 0.
a(n) = 3*A081038(n-1) for n>0.
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=1} 1/a(n) = 3*(sqrt(3)*arctanh(1/sqrt(3)) - 1).
Sum_{n>=1} (-1)^(n+1)/a(n) = 3 - sqrt(3)*Pi/2. (End)
MAPLE
a:= n-> `if`(n=0, 0, 3^(n-1)*(2*n+1)):
seq(a(n), n=0..30);
MATHEMATICA
a[0] = 0; a[n_] := 3^(n - 1)*(2*n + 1); Array[a, 30, 0] (* Amiram Eldar, May 17 2022 *)
CROSSREFS
Column k=3 of A229079.
Cf. A081038.
Sequence in context: A204086 A379242 A171761 * A218313 A218190 A216757
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Sep 18 2013
STATUS
approved