The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A186423 Partial sums of A186421. 6
0, 1, 3, 4, 8, 11, 17, 20, 28, 33, 43, 48, 60, 67, 81, 88, 104, 113, 131, 140, 160, 171, 193, 204, 228, 241, 267, 280, 308, 323, 353, 368, 400, 417, 451, 468, 504, 523, 561, 580, 620, 641, 683, 704, 748, 771, 817, 840, 888, 913, 963, 988, 1040, 1067, 1121, 1148, 1204, 1233, 1291, 1320 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
From R. J. Mathar, Feb 28 2011: (Start)
G.f.: x*(1 + 2*x + 2*x^3 + x^4)/( (1+x^2)*(1+x)^2*(1-x)^3 ).
a(n) = (6*n*(n+1) + 3 + (-1)^n*(2*n+1) - 4*A087960(n))/16. (End)
E.g.f.: ((2 + 5*x + 3*x^2)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x) + 2*sin(x) - 2*cos(x))/8. - G. C. Greubel, Oct 09 2019
MAPLE
A087960 := proc(n) op((n mod 4)+1, [1, -1, -1, 1]) ; end proc:
A186423 := proc(n) 3*n*(n+1)/8 +3/16 +(-1)^n*(2*n+1)/16 -A087960(n)/4 ; end proc: # R. J. Mathar, Feb 28 2011
MATHEMATICA
CoefficientList[Series[x(1+2x+2x^3+x^4)/((1-x)^3(1+x)^2(1+x^2)), {x, 0, 65}], x] (* Harvey P. Dale, Mar 13 2011 *)
Table[(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial[n+1, 2])/16, {n, 0, 65}] (* G. C. Greubel, Oct 09 2019 *)
PROG
(Haskell)
a186423 n = a186423_list !! n
a186423_list = scanl1 (+) a186421_list
(PARI) vector(66, n, my(m=n-1); (6*m^2 +6*m +3 +(-1)^m*(2*m+1) -4*(-1)^binomial(m+1, 2))/16) \\ G. C. Greubel, Oct 09 2019
(Magma) [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16: n in [0..65]]; // G. C. Greubel, Oct 09 2019
(Sage) [(6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^binomial(n+1, 2))/16 for n in (0..65)] # G. C. Greubel, Oct 09 2019
(GAP) List([0..65], n-> (6*n^2 +6*n +3 +(-1)^n*(2*n+1) -4*(-1)^Binomial(n+1, 2))/16); # G. C. Greubel, Oct 09 2019
(Python)
def A186423(n): return (6*n*(n+1)+3+(-2*n-1 if n&1 else 2*n+1)+(4 if n+1&2 else -4))>>4 # Chai Wah Wu, Jan 31 2023
CROSSREFS
A062717 is the subsequence of even terms.
A186424 is the subsequence of odd terms.
Sequence in context: A051207 A217755 A133363 * A156056 A236453 A099108
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Feb 21 2011
EXTENSIONS
More terms added by G. C. Greubel, Oct 09 2019
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 May 21 08:56 EDT 2024. Contains 372733 sequences. (Running on oeis4.)