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 A330396 #35 Dec 23 2020 01:54:24 %S A330396 2,1,0,5,4,3,8,7,6,11,10,9,14,13,12,17,16,15,20,19,18,23,22,21,26,25, %T A330396 24,29,28,27,32,31,30,35,34,33,38,37,36,41,40,39,44,43,42,47,46,45,50, %U A330396 49,48,53,52,51,56,55,54,59,58,57,62,61,60,65,64,63,68,67,66,71,70,69,74,73,72,77,76,75,80,79,78,83,82 %N A330396 Permutation of the nonnegative integers partitioned into triples [3*k+2, 3*k+1, 3*k] for k >= 0. %C A330396 Partition the nonnegative integer sequence into triples starting with (0,1,2); transpose the first and third elements of the triple, repeat for all triples. %C A330396 A self-inverse sequence: a(a(n)) = n. %C A330396 The sequence is an interleaving of A016789 with A016777 and with A008585, in that order. %H A330396 Guenther Schrack, <a href="/A330396/b330396.txt">Table of n, a(n) for n = 0..10000</a> %H A330396 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the nonnegative integers</a> %H A330396 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1). %F A330396 G.f.: (2 - x - x^2 + 3*x^3)/((x-1)^2*(1 + x + x^2)). [corrected by _Georg Fischer_, Apr 17 2020] %F A330396 Linear recurrence: a(n) = a(n-1) + a(n-3) - a(n-4) for n > 4. %F A330396 Simple recursion: a(n) = a(n-3) + 3 for n > 2 with a(0) = 2, a(1) = 1, a(2) = 0. %F A330396 Negative domain: a(-n) = -(a(n-1) + 1). %F A330396 Explicit formulas: %F A330396 a(n) = n + 2 - 2*(n mod 3). %F A330396 a(n) = 2 - n + 6*floor(n/3). %F A330396 a(n) = n + 2*(w^(2*n)*(2 + w) + w^n*(1 - w))/3 where w = (-1 + sqrt(-3))/2. %o A330396 (MATLAB) a = zeros(1,10000); %o A330396 w = (-1+sqrt(-3))/2; %o A330396 fprintf('0 2\n'); %o A330396 for n = 1:10000 %o A330396 a(n) = int64((3*n + 2*w^(2*n)*(w + 2) + 2*w^n*(1 - w))/3); %o A330396 fprintf('%i %i\n',n,a(n)); %o A330396 end %Y A330396 Cf. A001477, A064429, A236348, A004482, A004483. %Y A330396 Fixed point sequence: A016777. %Y A330396 Relationships: %Y A330396 a(n) = a(n-1) - 1 + 6*A079978(n). %Y A330396 a(n) = 2*a(n-1) - a(n-2) + 6*A049347(n). %Y A330396 a(n) = A074066(n+2) - 2. %Y A330396 a(n) = A113655(n+1) - 1. %K A330396 nonn %O A330396 0,1 %A A330396 _Guenther Schrack_, Mar 03 2020