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!)
A279319 Period 16 zigzag sequence: repeat [0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1]. 9

%I #24 Mar 02 2024 23:50:16

%S 0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,0,1,

%T 2,3,4,5,6,7,8,7,6,5,4,3,2,1,0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1,0,1,2,3,

%U 4,5,6,7,8,7,6,5,4,3,2,1,0,1,2,3,4,5

%N Period 16 zigzag sequence: repeat [0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1].

%C Decimal expansion of 11111111/900000009. - _Elmo R. Oliveira_, Feb 20 2024

%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,0,0,-1,1).

%F a(n) = abs(n - 16*round(n/16)).

%F G.f.: x*(1 + x)*(1 + x^2)*(1 + x^4)/((1 - x)*(1 + x^8)). - _Ilya Gutkovskiy_, Dec 10 2016

%F a(n) = a(n-1)-a(n-8)+a(n-9). - _Wesley Ivan Hurt_, Nov 18 2021

%F a(n) = a(n-16) for n >= 16. - _Wesley Ivan Hurt_, Sep 07 2022

%t PadRight[{}, 120, {0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1}] (* _Vincenzo Librandi_, Dec 10 2016 *)

%t With[{k = 16}, Table[Min[Abs[# - k], #] &@ Mod[n, k], {n, 0, 120}]] (* or *)

%t CoefficientList[Series[x (1 + x) (1 + x^2) (1 + x^4)/((1 - x) (1 + x^8)), {x, 0, 120}], x] (* _Michael De Vlieger_, Dec 10 2016 *)

%o (Magma) &cat[[0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1]: n in [0..5]];

%o (Python)

%o def A279319(n): return (0,1,2,3,4,5,6,7,8,7,6,5,4,3,2,1)[n&15] # _Chai Wah Wu_, Mar 02 2023

%Y Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), A266313 (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), this sequence (k=16), A158289 (k=18).

%K nonn,easy

%O 0,3

%A _Wesley Ivan Hurt_, Dec 09 2016

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 April 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)