login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A180046 a(n+1) = a(n-3) + a(n-2) - a(n-1) + a(n). 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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
EXAMPLE
1 2 3 4 (by definition); 1 + 2 - 3 + 4 = 4, 2 + 3 - 4 + 4 = 5, 3 + 4 - 4 + 5 = 8.
MATHEMATICA
LinearRecurrence[{1, -1, 1, 1}, {1, 2, 3, 4}, 50] (* Harvey P. Dale, Mar 18 2015 *)
PROG
(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
(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
CROSSREFS
Sequence in context: A103750 A036805 A036804 * A008329 A064558 A178031
KEYWORD
nonn,easy
AUTHOR
Ian Stewart, Aug 08 2010
EXTENSIONS
More terms from R. J. Mathar, Aug 14 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)