The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A296063 a(n) is the smallest number (in absolute value) not yet in the sequence such that the arithmetic mean of the first n terms a(1), a(2), ..., a(n) is an integer. Preference is given to positive values of a(n); a(1)=1; 0 not allowed. 3
 1, -1, 3, -3, 5, -5, 7, -7, 9, -9, 11, -11, 13, -13, 15, -15, 17, -17, 19, -19, 21, -21, 23, -23, 25, -25, 27, -27, 29, -29, 31, -31, 33, -33, 35, -35, 37, -37, 39, -39, 41, -41, 43, -43, 45, -45, 47, -47, 49, -49, 51, -51 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 LINKS Colin Barker, Table of n, a(n) for n = 1..1000 Index entries for linear recurrences with constant coefficients, signature (-1,1,1). FORMULA a(n) = (-1)^(n+1)*A109613(n+1). - Michel Marcus, Dec 05 2017 From Colin Barker, Mar 14 2020: (Start) G.f.: x*(1 + x^2) / ((1 - x)*(1 + x)^2). a(n) = -a(n-1) + a(n-2) + a(n-3) for n>3. (End) MATHEMATICA Array[(2 Floor[(# + 1)/2] - 1) (2 Boole@ OddQ@ # - 1) &, 52] (* or *) Nest[Append[#, Block[{k = 1, s = 1}, While[Nand[FreeQ[#, s k], IntegerQ@ Mean[Append[#, s k]]], If[s == 1, s = -1, k++; s = 1]]; s k]] &, {1}, 51] (* Michael De Vlieger, Dec 12 2017 *) PROG (PARI) Vec(x*(1 + x^2) / ((1 - x)*(1 + x)^2) + O(x^50)) \\ Colin Barker, Mar 14 2020 CROSSREFS Cf. A193356 (partial sums), A059841 (a(n)/n), A109613. Sequence in context: A117767 A340836 A293701 * A127630 A267458 A109613 Adjacent sequences:  A296060 A296061 A296062 * A296064 A296065 A296066 KEYWORD sign AUTHOR Enrique Navarrete, Dec 04 2017 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 December 1 13:00 EST 2021. Contains 349429 sequences. (Running on oeis4.)