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 A199403 #15 Nov 04 2015 11:22:03 %S A199403 1,0,3,6,13,24,51,102,205,408,819,1638,3277,6552,13107,26214,52429, %T A199403 104856,209715,419430,838861,1677720,3355443,6710886,13421773, %U A199403 26843544,53687091,107374182,214748365,429496728,858993459,1717986918,3435973837,6871947672,13743895347 %N A199403 Binary XOR of (2^k - (-1)^k)/3 as k varies from 1 to n. %H A199403 Colin Barker, <a href="/A199403/b199403.txt">Table of n, a(n) for n = 1..1000</a> %H A199403 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,0,1,-2). %F A199403 G.f.: (3*x^2-2*x+1)*x/(2*x^5-x^4-2*x+1). - _Alois P. Heinz_, Nov 05 2011 %F A199403 From _Vladimir Reshetnikov_, Nov 02 2015: (Start) %F A199403 a(n) = (6*cos(Pi*n/2) + 2*sin(Pi*n/2) + 4*2^n - 5*(-1)^n - 5)/10. %F A199403 Recurrence: a(1) = 1, a(2) = 0, a(3) = 3, a(4) = 6, a(5) = 13, a(n) = 2*a(n-1) + a(n-4) - 2*a(n-5). %F A199403 E.g.f.: (2*cosh(2*x) - 5*cosh(x) + 2*sinh(2*x) + 3*cos(x) + sin(x))/5. %F A199403 (End) %e A199403 a(2) = (2^1+1)/3 XOR (2^2-1)/3 = 1 XOR 1 = 0; %e A199403 a(3) = (2^1+1)/3 XOR (2^2-1)/3 XOR (2^3+1)/3 = 1 XOR 1 XOR 3 = 3; %e A199403 a(4) = (2^1+1)/3 XOR (2^2-1)/3 XOR (2^3+1)/3 XOR (2^4-1)/3 = 1 XOR 1 XOR 3 XOR 5 = 6. %p A199403 a:= n-> (<<0|1|0|0|0>, <0|0|1|0|0>, <0|0|0|1|0>, <0|0|0|0|1>, <-2|1|0|0|2>>^n. <<0, 1, 0, 3, 6>>)[1, 1]: seq(a(n), n=1..60); # _Alois P. Heinz_, Nov 05 2011 %t A199403 FoldList[BitXor, Table[(2^n - (-1)^n)/3, {n, 1, 20}]] (* _Vladimir Reshetnikov_, Nov 02 2015 *) %t A199403 Table[(6*Cos[Pi n/2] + 2*Sin[Pi n/2] + 4*2^n - 5*(-1)^n - 5)/10, {n, 1, 20}] (* _Vladimir Reshetnikov_, Nov 02 2015 *) %o A199403 (PARI) {a(n)=if(n<0,0,bitxor(a(n-1),((2^n-(-1)^n)/3)))} %o A199403 (PARI) Vec(x*(3*x^2-2*x+1)/((x-1)*(x+1)*(2*x-1)*(x^2+1)) + O(x^100)) \\ _Colin Barker_, Nov 02 2015 %Y A199403 Cf. A199402, A199396. %K A199403 nonn,easy %O A199403 1,3 %A A199403 _Paul D. Hanna_, Nov 05 2011