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 A236348 #30 Dec 12 2023 07:46:01 %S A236348 1,0,2,4,3,5,7,6,8,10,9,11,13,12,14,16,15,17,19,18,20,22,21,23,25,24, %T A236348 26,28,27,29,31,30,32,34,33,35,37,36,38,40,39,41,43,42,44,46,45,47,49, %U A236348 48,50,52,51,53,55,54,56,58,57,59,61,60,62,64,63,65,67 %N A236348 Expansion of (1 - x + 2*x^2 + x^3) / ((1 - x) * (1 - x^3)) in powers of x. %C A236348 An order 2 permutation of nonnegative integers. %H A236348 Vincenzo Librandi, <a href="/A236348/b236348.txt">Table of n, a(n) for n = 0..1000</a> %H A236348 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1). %F A236348 G.f.: (1 - x + 2*x^2 + x^3) / ((1 - x) * (1 - x^3)). %F A236348 First difference is period 3 sequence [-1, 2, 2, ...]. %F A236348 a(n) = a(n-1) + a(n-3) - a(n-4). a(4-n) = 4-a(n). %F A236348 0 = a(n)*(-a(n+1) + a(n+3)) + a(n+1)*(a(n+1) - a(n+2)) + a(n+2)*(a(n+2) - a(n+3)) for all n in Z. %F A236348 a(n) = A143097(n) if n>1. %F A236348 a(n) = n - 1 + mod(n-1, 3). - _Wesley Ivan Hurt_, Aug 21 2014 %F A236348 a(n) = n + (2/sqrt(3))*sin(2*(n+1)*Pi/3). - _Wesley Ivan Hurt_, Sep 26 2017 %F A236348 Sum_{n>=2} (-1)^n/a(n) = 2*Pi/(3*sqrt(3)) + log(2)/3 - 1. - _Amiram Eldar_, Sep 10 2023 %e A236348 G.f. = 1 + 2*x^2 + 4*x^3 + 3*x^4 + 5*x^5 + 7*x^6 + 6*x^7 + 8*x^8 + 10*x^9 + ... %t A236348 Table[n - 1 + Mod[n - 1, 3], {n, 0, 100}] (* _Wesley Ivan Hurt_, Aug 21 2014 *) %t A236348 LinearRecurrence[{1, 0, 1, -1}, {1, 0, 2, 4}, 80] (* or *) CoefficientList[Series[(1 - x + 2 x^2 + x^3) / ((1 - x) (1 -x^3)), {x, 0, 80}], x] (* _Vincenzo Librandi_, Sep 28 2017 *) %o A236348 (PARI) {a(n) = (n-1) % 3 + n-1 } %o A236348 (Magma) [n-1+((n-1) mod 3) : n in [0..100]]; // _Wesley Ivan Hurt_, Aug 21 2014 %o A236348 (Magma) I:=[1,0,2,4]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..80]]; // _Vincenzo Librandi_, Sep 28 2017 %Y A236348 Cf. A143097. %K A236348 nonn,easy %O A236348 0,3 %A A236348 _Michael Somos_, Jan 23 2014