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 A332781 #25 May 06 2021 03:22:15 %S A332781 0,0,0,0,1,2,3,4,6,5,7,4,3,7,1,6,6,2,4,3,6,5,2,2,5,1,4,7,3,3,8,16,20, %T A332781 24,17,2,23,16,2,1,23,8,11,11,29,22,30,22,12,27,6,17,30,6,1,17,16,23, %U A332781 23,7,24,16,8,16,9,26,19,4,14,21,7,4,11,31,25,30,22,10,20 %N A332781 a(n) = (a(n-1) XOR a(n-4)) + 1, a(0) = a(1) = a(2) = a(3) = 0. %C A332781 Exclusive or (XOR) is a natural operation for computers. When combined with delayed feedback it can yield very complex behavior, which can be utilized for pseudorandom number generation [Marsaglia 2003]. Such "linear-feedback shift register" schemes can be implemented with basic computer operations and are hence very fast. Their behavior is typically periodic with long periods. Analogous procedures are used to generate this sequence, which takes a delayed feedback XOR and adds 1 at each iteration. It appears to be growing, although existence of loops has not been excluded. %H A332781 G. Marsaglia, <a href="http://dx.doi.org/10.18637/jss.v008.i14">Xorshift RNGs</a>, Journal of Statistical Software, Vol. 8, Issue 14, Jul 2003. %H A332781 Wikipedia, <a href="https://en.wikipedia.org/wiki/Bitwise_operation#XOR">Bitwise operation (XOR)</a>. %H A332781 Wikipedia, <a href="https://en.wikipedia.org/wiki/Linear-feedback_shift_register">Linear-feedback shift register</a>. %H A332781 Wikipedia, <a href="https://en.wikipedia.org/wiki/Xorshift">Xorshift</a>. %e A332781 a(4) = (a(3) XOR a(0)) + 1 = (0 XOR 0) + 1 = 0 + 1 = 1. %e A332781 a(5) = (a(4) XOR a(1)) + 1 = (1 XOR 0) + 1 = 1 + 1 = 2. %e A332781 a(8) = (a(7) XOR a(4)) + 1 = (100_2 XOR 001_2) + 1 = 101_2 + 1 = 110_2 = 6_10. %t A332781 Nest[Append[#, 1 + BitXor @@ #[[{-1, -4}]] ] &, ConstantArray[0, 4], 75] (* _Michael De Vlieger_, Feb 23 2020 *) %o A332781 (Python) %o A332781 feedback_delay = 3 %o A332781 a = [0 for i in range(feedback_delay+1)] %o A332781 for i in range(feedback_delay,100): %o A332781 a.append((a[i]^a[i-feedback_delay])+1) %Y A332781 Cf. A114375 (shift 1), A332780 (shift 2), A332782 (shift 4). %K A332781 nonn,base,look %O A332781 0,6 %A A332781 _Rok Cestnik_, Feb 23 2020