cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A229277 Number of ascending runs in {1,...,3}^n.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Sep 18 2013

Keywords

Crossrefs

Column k=3 of A229079.
Cf. A081038.

Programs

  • 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 *)

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)