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.

Showing 1-2 of 2 results.

A073937 a(n) = a(n-1) - a(n-2) + a(n-3) + a(n-4), a(0)=4, a(1)=1, a(2)=-1, a(3)=1.

Original entry on oeis.org

4, 1, -1, 1, 7, 6, -1, 1, 15, 19, 4, 1, 31, 53, 27, 6, 63, 137, 107, 39, 132, 337, 351, 185, 303, 806, 1039, 721, 791, 1915, 2884, 2481, 2303, 4621, 7683, 7846, 7087, 11545, 19987, 23375, 22020, 30177, 51519, 66737, 67415, 82374, 133215, 184993, 201567, 232163, 348804
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Aug 13 2002

Keywords

Comments

From Kai Wang, Nov 03 2020: (Start)
Let f(x) = x^4 - x^3 - x^2 - x - 1 and {x1,x2,x3,x4} be the roots of f(x). Then a(n) = (x1*x2*x3)^n + (x1*x2*x4)^n + (x1*x3*x4)^n + (x2*x3*x4)^n.
Let g(y) = y^4 - y^3 + y^2 - y - 1 and {y1,y2,y3,y4} be the roots of g(y). Then a(n) = y1^n + y2^n + y3^n + y4^n. (End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(4-3*x+2*x^2-x^3)/(1-x+x^2-x^3-x^4), {x, 0, 50}], x]
    LinearRecurrence[{1,-1,1,1},{4,1,-1,1},60] (* Harvey P. Dale, Sep 05 2021 *)
  • PARI
    polsym(y^4 - y^3 + y^2 - y - 1, 55) \\ Joerg Arndt, Nov 07 2020

Formula

G.f.: (4 - 3*x + 2*x^2 - x^3)/(1 - x + x^2 - x^3 - x^4).
From Kai Wang, Nov 03 2020: (Start)
For n >= 1, a(n) = Sum_{j1,j2,j3,j4>=0; j1+2*j2+3*j3+4*j4=n} (-1)^j2*n*(j1+j2+j3+j4-1)!/(j1!*j2!*j3!*j4!).
For n > 1, a(n) = (-1)^n*(4*A100329(n+1) + 3*A100329(n) + 2*A100329(n-1) + A100329(n-2)). (End)
From Peter Bala, Jan 19 2023: (Start)
a(n) = (-1)^n*A074058(n).
a(n) = trace of M^n, where M is the 4 X 4 matrix [[0, 0, 0, -1], [-1, 0, 0, 1], [0, -1, 0, 1], [0, 0, -1, 1]].
The Gauss congruences hold: a(n*p^r) == a(n*p^(r-1)) (mod p^k) for positive integers n and r and all primes p. See Zarelua. (End)

A180046 a(n+1) = a(n-3) + a(n-2) - a(n-1) + a(n) starting with 1, 2, 3, 4.

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 8, 11, 12, 14, 21, 30, 35, 40, 56, 81, 100, 115, 152, 218, 281, 330, 419, 588, 780, 941, 1168, 1595, 2148, 2662, 3277, 4358, 5891, 7472, 9216, 11993, 16140, 20835, 25904, 33202, 44273, 57810, 72643, 92308, 121748, 159893, 203096, 257259
Offset: 1

Views

Author

Ian Stewart, Aug 08 2010

Keywords

Examples

			1 2 3 4 (by definition); 1 + 2 - 3 + 4 = 4, 2 + 3 - 4 + 4 = 5, 3 + 4 - 4 + 5 = 8.
		

Crossrefs

Cf. A100329.

Programs

  • Haskell
    import Data.List (zipWith4)
    a180046 n = a180046_list !! (n-1)
    a180046_list = [1..4] ++ zipWith4 (((((+) .) . (+)) .) . (-))
                              (drop 3 a180046_list) (drop 2 a180046_list)
                                (tail a180046_list) a180046_list
    -- Reinhard Zumkeller, Oct 08 2014
  • Mathematica
    LinearRecurrence[{1,-1,1,1},{1,2,3,4},50] (* Harvey P. Dale, Mar 18 2015 *)
  • PARI
    Vec(x*(1+x)*(2*x^2+1)/(1-x+x^2-x^3-x^4)+O(x^99)) \\ Charles R Greathouse IV, Jul 06 2011
    

Formula

G.f.: -x*(1+x)*(2*x^2+1)/(-1+x-x^2+x^3+x^4). - R. J. Mathar, Aug 14 2010
a(n) = (-1)^(n)*(A100329(n-1)-A100329(n)-2*A100329(n-2)+2*A100329(n-3)) with A100329(-1) = A100329(-2) = 0. - Johannes W. Meijer, Jul 06 2011

Extensions

More terms from R. J. Mathar, Aug 14 2010
Name edited by Michel Marcus, Feb 20 2025
Showing 1-2 of 2 results.