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.

A327993 a(n) = [x^n] ((x - 1)*(x + 1)*(2*x^2 - 1))/(2*x^4 + 4*x^3 - x^2 - 3*x + 1).

Original entry on oeis.org

1, 3, 7, 20, 55, 151, 414, 1133, 3099, 8472, 23155, 63275, 172894, 472393, 1290663, 3526256, 9634071, 26321031, 71910814, 196464677, 536752579, 1466437096, 4006383531, 10945648019, 29904074046, 81699461841, 223207100431, 609813170912, 1666040617711, 4551707698639
Offset: 0

Views

Author

Peter Luschny, Oct 13 2019

Keywords

Comments

a(n) is the sum of row n of A327992 if the decimal digits of A327992(n, k) are read as the binary digits of an integer.

Examples

			a(6) = 414 = Sum([19, 21, 25, 47, 55, 59, 61, 127]) where the summands correspond to row 6 of A327992: [11001, 10101, 10011, 111101, 111011, 110111, 101111, 1111111].
		

Crossrefs

Cf. A327992.

Programs

  • Maple
    gf := ((x - 1)*(x + 1)*(2*x^2 - 1))/(2*x^4 + 4*x^3 - x^2 - 3*x + 1):
    ser := series(gf, x, 32): seq((coeff(ser, x, n)), n=0..29);
  • Mathematica
    LinearRecurrence[{3, 1, -4, -2}, {1, 3, 7, 20, 55}, 30]
  • SageMath
    @cached_function
    def a(n):
        if n < 5: return [1, 3, 7, 20, 55][n]
        return -2*a(n-4) - 4*a(n-3) + a(n-2) + 3*a(n-1)
    print([a(n) for n in (0..29)])

Formula

a(n) = 3*a(n-1) + a(n-2) - 4*a(n-3) - 2*a(n-4) for n >= 4.