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.

A166481 a(n) = 3*a(n-2) for n > 2; a(1) = 1; a(2) = 7.

Original entry on oeis.org

1, 7, 3, 21, 9, 63, 27, 189, 81, 567, 243, 1701, 729, 5103, 2187, 15309, 6561, 45927, 19683, 137781, 59049, 413343, 177147, 1240029, 531441, 3720087, 1594323, 11160261, 4782969, 33480783, 14348907, 100442349, 43046721, 301327047
Offset: 1

Views

Author

Klaus Brockhaus, Oct 14 2009

Keywords

Comments

Interleaving of A000244 and A005032.
Seventh binomial transform is A153598.

Crossrefs

Cf. A000244 (powers of 3), A005032 (7*3^n), A153598.

Programs

  • Magma
    [ n le 2 select 6*n-5 else 3*Self(n-2): n in [1..34] ];
    
  • Mathematica
    LinearRecurrence[{0,3},{1,7},50] (* or *) Flatten[NestList[3#&,{1,7},20]] (* Harvey P. Dale, Sep 24 2015 *)
  • SageMath
    def A166481(n): return 3^(n/2)*(sqrt(3)*(n%2) + 7*((n+1)%2))/3
    [A166481(n) for n in range(1,41)] # G. C. Greubel, Aug 02 2024

Formula

a(n) = (5 + 2*(-1)^n)*3^((2*n - 5 + (-1)^n)/4).
G.f.: x*(1+7*x)/(1-3*x^2).
E.g.f.: (1/3)*(-7 + 7*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). - G. C. Greubel, Aug 02 2024