This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A074067 #34 Jun 18 2025 15:52:21 %S A074067 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, %T A074067 23,32,31,30,29,28,37,36,35,34,33,42,41,40,39,38,47,46,45,44,43,52,51, %U A074067 50,49,48,57,56,55,54,53,62,61,60,59,58,67,66,65,64,63,72,71 %N A074067 Zigzag modulo 5. %H A074067 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/AlternatingPermutation.html">Alternating Permutations</a>. %H A074067 Reinhard Zumkeller, <a href="/A074066/a074066.ps">Illustration for A074066-A074068</a>. %H A074067 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,1,-1). %H A074067 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>. %F A074067 a(a(n)) = n (a self-inverse permutation). %F A074067 For n > 1: a(n) = n iff n == 0 modulo 5. %F A074067 a(n) = 5*floor(n/5) + 10*floor((n mod 5)/3) - (n mod 5) for n > 2; a(n) = n for n <= 2. %F A074067 a(n) = a(n-1) + a(n-5) - a(n-6) for n > 8. - _Chai Wah Wu_, May 25 2016 %F A074067 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 %F A074067 Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - _Amiram Eldar_, May 11 2025 %t A074067 {1, 2}~Join~Flatten[Reverse /@ Partition[Range[3, 72], 5]] (* after _Harvey P. Dale_ at A074066, or *) %t A074067 {1, 2}~Join~Table[5 Floor[n/5] + 10 Floor[#/3] - # &@ Mod[n, 5], {n, 3, 69}] (* _Michael De Vlieger_, May 25 2016 *) %t A074067 LinearRecurrence[{1,0,0,0,1,-1},{1,2,7,6,5,4,3,12},70] (* _Harvey P. Dale_, Jun 18 2025 *) %o A074067 (Haskell) %o A074067 a074067 n = a074067_list !! (n-1) %o A074067 a074067_list = 1 : 2 : xs where xs = 7 : 6 : 5 : 4 : 3 : map (+ 5) xs %o A074067 -- _Reinhard Zumkeller_, Feb 21 2011 %Y A074067 Cf. A002162, A074066, A074068. %K A074067 nonn,easy %O A074067 1,2 %A A074067 _Reinhard Zumkeller_, Aug 17 2002