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 A366619 #14 Oct 16 2023 21:28:35 %S A366619 4,1,2,5,6,3,10,7,8,11,12,9,16,13,14,17,18,15,22,19,20,23,24,21,28,25, %T A366619 26,29,30,27,34,31,32,35,36,33,40,37,38,41,42,39,46,43,44,47,48,45,52, %U A366619 49,50,53,54,51,58,55,56,59,60,57,64,61,62,65,66,63,70,67,68,71,72,69 %N A366619 Group the natural numbers into blocks of size 2: [1,2], [3,4], ... and reverse the order of the numbers within each block. Then group into blocks of size 3 and reverse the order in each block. %C A366619 Row 3 of the array in A007062. %H A366619 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (0,1,1,0,-1). %F A366619 a(n) = 1 + (n mod 2) + 2*floor(3*floor((n - 1)/3)/2 + (-n mod 3)/2). %F A366619 G.f.: x*(4 + x - 2*x^2 + 3*x^4)/((1 - x)^2*(1 + x)*(1 + x + x^2)). - _Stefano Spezia_, Oct 14 2023 %F A366619 a(n+6) = a(n) + 6. - _Joerg Arndt_, Oct 15 2023 %F A366619 From _Wesley Ivan Hurt_, Oct 15 2023: (Start) %F A366619 a(n) = n - (-1)^n + 2*cos(2*(n - 1)*Pi/3) + 2*sin(2*(n - 1)*Pi/3)/sqrt(3). %F A366619 a(n) = a(n-2) + a(n-3) - a(n-5) for n >= 6. (End) %e A366619 Group natural numbers into blocks of size 2: [1, 2], [3, 4], [5, 6], ... %e A366619 Reverse the order in each block: [2, 1], [4, 3], [6, 5], ... %e A366619 Group the remaining sequence into blocks of size 3: [2, 1, 4], [3, 6, 5], ... %e A366619 Reverse the order in each block to get a(n): 4, 1, 2, 5, 6, 3, ... %t A366619 Table[1 + Mod[n, 2] + 2 Floor[3 Floor[(n - 1)/3]/2 + Mod[-n, 3]/2], {n, 100}] %Y A366619 Cf. A007062. %K A366619 nonn,easy %O A366619 1,1 %A A366619 _Wesley Ivan Hurt_, Oct 14 2023