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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A039823 a(n) = ceiling( (n^2 + n + 2)/4 ). 6
 1, 2, 4, 6, 8, 11, 15, 19, 23, 28, 34, 40, 46, 53, 61, 69, 77, 86, 96, 106, 116, 127, 139, 151, 163, 176, 190, 204, 218, 233, 249, 265, 281, 298, 316, 334, 352, 371, 391, 411, 431, 452, 474, 496, 518, 541, 565, 589, 613, 638, 664, 690, 716, 743, 771, 799, 827 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Equals the number of different coefficient values in the expansion of Product_{i=1..n} (1 + q^1 + ... + q^i). Proof by Lawrence Sze: The Gaussian polynomial Prod_{k=1..n} Sum_{j=0..k} q^j is the q-version of n! and strictly unimodal with constant term 1. It has degree Sum_{k=1..n} k = n(n+1)/2, and thus n(n+1)/2+1 nonzero terms. a(n) is equivalently the number of different absolute values obtained when summing the first n integers with all possible 2^n sign combinations. - Olivier Gérard, Mar 22 2010 Numbers in ascending order on the central axes (starting with 1) of Ulam's Spiral. - Bob Selcoe, Sep 25 2015 LINKS Table of n, a(n) for n=1..57. Index entries for linear recurrences with constant coefficients, signature (3,-4,4,-3,1). FORMULA a(n) = floor(binomial(n+1, 2)/2) + 1 = A011848(n+1) + 1. G.f.: x*(x^4-2*x^3+2*x^2-x+1)/((1+x^2)*(1-x)^3). a(n) = (n*(n+1)+i^(n*(n+1))+3)/4, where i=sqrt(-1). - Bruno Berselli, Jul 25 2012 a(n) = a(n-1) + A004524(n+1). - Bob Selcoe, Sep 25 2015 a(n) = 3*a(n-1)-4*a(n-2)+4*a(n-3)-3*a(n-4)+a(n-5) for n>5. - Wesley Ivan Hurt, Sep 25 2015 a(n) = ceiling( (n^2+n+1)/4 ). - Bob Selcoe, Sep 26 2015 EXAMPLE Possible absolute values of sums of consecutive integers with any sign combination for n = 4 and n=5 are {0, 2, 4, 6, 8, 10} and {1, 3, 5, 7, 9, 11, 13, 15} respectively. - Olivier Gérard, Mar 22 2010 MAPLE A039823:=n->ceil((n^2+n+2)/4): seq(A039823(n), n=1..100); # Wesley Ivan Hurt, Sep 25 2015 MATHEMATICA Table[Floor[((n*(n+1)+2)/2+1)/2], {n, 5!}] (* Vladimir Joseph Stephan Orlovsky, Apr 26 2010 *) LinearRecurrence[{3, -4, 4, -3, 1}, {1, 2, 4, 6, 8}, 70] (* Vincenzo Librandi, Sep 26 2015 *) PROG (Maxima) makelist((n*(n+1)+%i^(n*(n+1))+3)/4, n, 1, 57); \\ Bruno Berselli, Jul 25 2012 (PARI) a(n) = ceil((n^2+n+2)/4); vector(80, n, a(n)) \\ Altug Alkan, Sep 25 2015 (Magma) [Ceiling((n^2+n+2)/4) : n in [1..80]]; // Wesley Ivan Hurt, Sep 25 2015 (Magma) I:=[1, 2, 4, 6, 8]; [n le 5 select I[n] else 3*Self(n-1)-4*Self(n-2)+4*Self(n-3)-3*Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Sep 26 2015 CROSSREFS Cf. A000125, A004524, A011848, A063865. Sequence in context: A205727 A213609 A338237 * A284617 A079972 A164144 Adjacent sequences: A039820 A039821 A039822 * A039824 A039825 A039826 KEYWORD nonn,easy AUTHOR Olivier Gérard EXTENSIONS Edited by Ralf Stephan, Nov 15 2004 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.

Last modified December 4 10:52 EST 2023. Contains 367560 sequences. (Running on oeis4.)