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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A199264 Period 18: repeat (9,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8). 3
 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,1 COMMENTS 'Valley and Peak' sequence. The sequence contains only values less than 10. abs(a(n)-a(n+1)) = 1. This sequence is in A158289. - Omar E. Pol, Feb 02 2012 LINKS Arkadiusz Wesolowski, Table of n, a(n) for n = 0..10000 Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,0,-1,1). FORMULA a(n) = 9 - A158289(n). G.f.: ( -9+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8-8*x^9 ) / ( (x-1)*(1+x)*(x^2-x+1)*(x^6-x^3+1) ). - R. J. Mathar, Nov 05 2011 a(n) = A158289(n+9). - Omar E. Pol, Feb 02 2012 a(n) = abs((n mod 18) - 9). - Alonso del Arte, Jul 03 2012 MATHEMATICA Flatten[Table[{9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8}, {5}]] (* Arkadiusz Wesolowski, Dec 03 2011 *) (* For Mathematica 7.0+ *) ArrayPad[Range[0, 9], {9, 68}, "Reflected"] (* Arkadiusz Wesolowski, Feb 02 2011 *) Table[Abs[Mod[n, 18] - 9], {n, 0, 81}] (* Alonso del Arte, Jul 03 2012 *) PadRight[{}, 90, Join[Range[9, 0, -1], Range[8]]] (* Harvey P. Dale, Apr 08 2013 *) PROG (PARI) a(n)=[9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8][n%18+1] \\ Charles R Greathouse IV, Jul 17 2016 CROSSREFS Cf. A158289. Sequence in context: A011116 A106334 A089739 * A022965 A023451 A109910 Adjacent sequences: A199261 A199262 A199263 * A199265 A199266 A199267 KEYWORD easy,nonn AUTHOR Arkadiusz Wesolowski, Nov 04 2011 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 July 21 06:08 EDT 2024. Contains 374463 sequences. (Running on oeis4.)