The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A127932 a(4*n) = 4*n+1, a(4*n+1) = a(4*n+2) = a(4*n+3) = 4*n+4. 3
 1, 4, 4, 4, 5, 8, 8, 8, 9, 12, 12, 12, 13, 16, 16, 16, 17, 20, 20, 20, 21, 24, 24, 24, 25, 28, 28, 28, 29, 32, 32, 32, 33, 36, 36, 36, 37, 40, 40, 40, 41, 44, 44, 44, 45, 48, 48, 48, 49, 52, 52, 52, 53, 56, 56, 56, 57, 60, 60, 60, 61, 64, 64, 64, 65, 68, 68, 68, 69, 72, 72, 72 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Colin Barker, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1). FORMULA G.f.: (1 + 3*x) / (1 - x - x^4 + x^5). a(n) = (1/12)*Sum{k=0..n}{-(k mod 4)+2*[(k+1) mod 4]+11*[(k+2) mod 4]-4*[(k+3) mod 4]}. - Paolo P. Lava, Nov 18 2008 From Luce ETIENNE, Jan 28 2017: (Start) a(n) = a(n-1)+ a(n-4)- a(n-5). a(n) = (4*n+7-(-1)^n+(-1)^((2*n-1+(-1)^n)/4)-3*(-1)^((2*n+1-(-1)^n)/4))/4. a(n) = (4*n+7-cos(n*Pi)-2*(cos(n*Pi/2)-2*sin(n*Pi/2)))/4. (End) EXAMPLE G.f. = 1 + 4*x + 4*x^2 + 4*x^3 + 5*x^4 + 8*x^5 + 8*x^6 + 8*x^7 + 9*x^8 + ... MATHEMATICA Table[{n, Table[n+3, 3]}, {n, 1, 69, 4}]//Flatten (* Harvey P. Dale, Nov 08 2016 *) LinearRecurrence[{1, 0, 0, 1, -1}, {1, 4, 4, 4, 5}, 75] (* Vincenzo Librandi, May 01 2018 *) PROG (PARI) {a(n) = if( n%4==0, n+1, n+4 - (n%4))}; /* Michael Somos, Jan 28 2017 */ (PARI) Vec((1 + 3*x) / ((1 - x)^2*(1 + x)*(1 + x^2)) + O(x^100)) \\ Colin Barker, Jan 28 2017 (MAGMA) [Round((4*n+7-(-1)^n+(-1)^((2*n-1+(-1)^n)/4)-3*(-1)^((2*n+1- (-1)^n )/4))/4): n in [0..50]]; // G. C. Greubel, Apr 30 2018 (MAGMA) I:=[1, 4, 4, 4, 5]; [n le 5 select I[n] else Self(n-1)+Self(n-4)- Self(n-5): n in [1..80]]; // Vincenzo Librandi, May 01 2018 *) CROSSREFS Sequence in context: A036854 A036858 A131957 * A006075 A241295 A074904 Adjacent sequences:  A127929 A127930 A127931 * A127933 A127934 A127935 KEYWORD nonn,easy AUTHOR Philippe Deléham, Apr 06 2007 STATUS approved

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

Last modified September 29 21:59 EDT 2020. Contains 337432 sequences. (Running on oeis4.)