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.

A096019 a(0)=3, a(n) = 3*a(n-1) + 2*(-1)^n.

Original entry on oeis.org

3, 7, 23, 67, 203, 607, 1823, 5467, 16403, 49207, 147623, 442867, 1328603, 3985807, 11957423, 35872267, 107616803, 322850407, 968551223, 2905653667, 8716961003, 26150883007, 78452649023, 235357947067, 706073841203, 2118221523607
Offset: 0

Views

Author

T. D. Noe, Jun 15 2004

Keywords

Comments

The number of Pythagorean quadruples mod 3^n is given by a(n) 3^(2n-1). See A096018.

Crossrefs

Cf. A096018.

Programs

  • Mathematica
    LinearRecurrence[{2,3},{3,7},30] (* Harvey P. Dale, Feb 10 2024 *)

Formula

a(n) = 3^(n+1)-(3^n-(-1)^n)/2.
a(n) = 2*a(n-1)+3*a(n-2). G.f.: (3+x)/((1+x)*(1-3*x)). [Colin Barker, Mar 26 2012]