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 A003815 #75 Jun 25 2023 20:16:26 %S A003815 0,1,3,0,4,1,7,0,8,1,11,0,12,1,15,0,16,1,19,0,20,1,23,0,24,1,27,0,28, %T A003815 1,31,0,32,1,35,0,36,1,39,0,40,1,43,0,44,1,47,0,48,1,51,0,52,1,55,0, %U A003815 56,1,59,0,60,1,63,0,64,1,67,0 %N A003815 a(0) = 0, a(n) = a(n-1) XOR n. %H A003815 Vincenzo Librandi, <a href="/A003815/b003815.txt">Table of n, a(n) for n = 0..1000</a> %H A003815 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0, 1, 0, 1, 0, -1). %F A003815 a(n) = n + (-1)^n*a(n-1). - _Vladeta Jovovic_, Mar 13 2003 %F A003815 a(0)=0, a(4n+1)=1, a(4n+2)=4n+3, a(4n+3)=0, a(4n+4)=4n+4, n >= 0. %F A003815 a(n) = f(n,0) with f(n,x) = x if n=0, otherwise f(n-1,x+n) if x is even, otherwise f(n-1,x-n). - _Reinhard Zumkeller_, Oct 09 2007 %F A003815 a(n) = abs(A077140(n)) for n > 0. - _Reinhard Zumkeller_, Oct 09 2007 %F A003815 G.f.: x*(1+3*x-x^2+x^3)/((1-x^4)*(1-x^2)). - _Vincenzo Librandi_, Oct 12 2013 %F A003815 a(n) = (1 + n + n*(-1)^n + (-1)^floor((n-1)/2))/2. - _Wesley Ivan Hurt_, May 08 2021 %t A003815 an = 0; Reap[ For[i = 0, i <= 100, i++, an = BitXor[an, i]; Sow[an]]][[2, 1]] (* _Jean-François Alcover_, Oct 11 2013, translated from PARI *) %t A003815 CoefficientList[Series[x (1 + 3 x - x^2 + x^3)/((1 - x^4) (1 - x^2)), {x, 0, 100}], x] (* _Vincenzo Librandi_, Oct 12 2013 *) %t A003815 nxt[{n_,a_}]:={n+1,BitXor[n+1,a]}; NestList[nxt,{0,0},70][[All,2]] (* _Harvey P. Dale_, Mar 10 2019 *) %t A003815 {#,1,#+1,0}[[1+Mod[#,4]]]&/@Range[0,100] (* _Federico Provvedi_, May 10 2021 *) %o A003815 (PARI) print1(an=0); for( i=1,100, print1(",",an=bitxor(an,i))) \\ _M. F. Hasler_, Oct 20 2008 %Y A003815 Cf. A003816. %Y A003815 Cf. A077140, A145768. - _M. F. Hasler_, Oct 20 2008 %K A003815 nonn,base %O A003815 0,3 %A A003815 _Marc LeBrun_