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 A292576 #29 Feb 19 2018 22:02:47 %S A292576 3,1,2,4,7,5,6,8,11,9,10,12,15,13,14,16,19,17,18,20,23,21,22,24,27,25, %T A292576 26,28,31,29,30,32,35,33,34,36,39,37,38,40,43,41,42,44,47,45,46,48,51, %U A292576 49,50,52,55,53,54,56,59,57,58,60,63,61,62 %N A292576 Permutation of the natural numbers partitioned into quadruples [4k-1, 4k-3, 4k-2, 4k], k > 0. %C A292576 Partition the natural number sequence into quadruples starting with (1,2,3,4); swap the second and third elements, then swap the first and the second element; repeat for all quadruples. %H A292576 Guenther Schrack, <a href="/A292576/b292576.txt">Table of n, a(n) for n = 1..10000</a> %H A292576 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1). %H A292576 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A292576 a(1)=3, a(2)=1, a(3)=2, a(4)=4, a(n) = a(n-4) + 4 for n > 4. %F A292576 O.g.f.: (2*x^3 + x^2 - 2*x + 3)/(x^5 - x^4 - x + 1). %F A292576 a(n) = n + ((-1)^(n*(n-1)/2)*(2-(-1)^n) - (-1)^n)/2. %F A292576 a(n) = n + (cos(n*Pi/2) - cos(n*Pi) + 3*sin(n*Pi/2))/2. %F A292576 a(n) = n + n mod 2 + (ceiling(n/2)) mod 2 - 2*(floor(n/2) mod 2). %F A292576 Linear recurrence: a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. %F A292576 First Differences, periodic: (-2, 1, 2, 3), repeat; also (-1)^A130569(n)*A068073(n+2) for n > 0. %o A292576 (MATLAB) a = [3 1 2 4]; % Generate b-file %o A292576 max = 10000; %o A292576 for n := 5:max %o A292576 a(n) = a(n-4) + 4; %o A292576 end; %o A292576 (PARI) for(n=1, 10000, print1(n + ((-1)^(n*(n-1)/2)*(2 - (-1)^n) - (-1)^n)/2, ", ")) %Y A292576 Inverse: A056699(n+1) - 1 for n > 0. %Y A292576 Sequence of fixed points: A008586(n) for n > 0. %Y A292576 Subsequences: %Y A292576 elements with odd index: A042964(A103889(n)) for n > 0. %Y A292576 elements with even index: A042948(n) for n > 0. %Y A292576 odd elements: A166519(n) for n>0. %Y A292576 indices of odd elements: A042963(n) for n > 0. %Y A292576 even elements: A005843(n) for n>0. %Y A292576 indices of even elements: A014601(n) for n > 0. %Y A292576 Sum of pairs of elements: %Y A292576 a(n+2) + a(n) = A163980(n+1) = A168277(n+2) for n > 0. %Y A292576 Difference between pairs of elements: %Y A292576 a(n+2) - a(n) = (-1)^A011765(n+3)*A091084(n+1) for n > 0. %Y A292576 Compound relations: %Y A292576 a(n) = A284307(n+1) - 1 for n > 0. %Y A292576 a(n+2) - 2*a(n+1) + a(n) = (-1)^A011765(n)*A132400(n+1) for n > 0. %Y A292576 Compositions: %Y A292576 a(n) = A116966(A080412(n)) for n > 0. %Y A292576 a(A284307(n)) = A256008(n) for n > 0. %Y A292576 a(A042963(n)) = A166519(n-1) for n > 0. %Y A292576 A256008(a(n)) = A056699(n) for n > 0. %K A292576 nonn %O A292576 1,1 %A A292576 _Guenther Schrack_, Sep 19 2017