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 59th year, we have over 358,000 sequences, and we’ve crossed 10,300 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A074067 Zigzag modulo 5. 3
 1, 2, 7, 6, 5, 4, 3, 12, 11, 10, 9, 8, 17, 16, 15, 14, 13, 22, 21, 20, 19, 18, 27, 26, 25, 24, 23, 32, 31, 30, 29, 28, 37, 36, 35, 34, 33, 42, 41, 40, 39, 38, 47, 46, 45, 44, 43, 52, 51, 50, 49, 48, 57, 56, 55, 54, 53, 62, 61, 60, 59, 58, 67, 66, 65, 64, 63, 72, 71 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS a(a(n))=n (a self-inverse permutation); for n>1: a(n) = n iff n == 0 modulo 5. LINKS Eric Weisstein's World of Mathematics, Alternating Permutations Reinhard Zumkeller, Illustration for A074066-A074068 Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1) FORMULA a(n) = 5*floor(n/5) + 10*floor((n mod 5)/3) - (n mod 5) for n>2; a(n)=n for n<=2. a(n) = a(n-1) + a(n-5) - a(n-6) for n > 8. - Chai Wah Wu, May 25 2016 g.f.: x+2*x + x^3*(7-x-x^2-x^3-x^4+2*x^5) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, May 22 2019 MATHEMATICA {1, 2}~Join~Flatten[Reverse /@ Partition[Range[3, 72], 5]] (* after Harvey P. Dale at A074066, or *) {1, 2}~Join~Table[5 Floor[n/5] + 10 Floor[#/3] - # &@ Mod[n, 5], {n, 3, 69}] (* Michael De Vlieger, May 25 2016 *) PROG (Haskell) a074067 n = a074067_list !! (n-1) a074067_list = 1 : 2 : xs where xs = 7 : 6 : 5 : 4 : 3 : map (+ 5) xs -- Reinhard Zumkeller, Feb 21 2011 CROSSREFS Cf. A074066, A074068. Sequence in context: A333521 A333205 A011263 * A110988 A047224 A127817 Adjacent sequences: A074064 A074065 A074066 * A074068 A074069 A074070 KEYWORD nonn,easy AUTHOR Reinhard Zumkeller, Aug 17 2002 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 1 05:02 EST 2022. Contains 358454 sequences. (Running on oeis4.)