cp's OEIS Frontend

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.

A108882 Period doubling sequence starting with '1 0 1'.

This page as a plain text file.
%I A108882 #13 Jan 20 2025 09:11:20
%S A108882 1,0,1,1,0,0,1,0,1,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,
%T A108882 0,1,1,0,1,1,0,0,1,0,1,1,0,1,1,0,1,1,0,0,1,0,1,1,0,1,1,0,1,1,0,0,1,0,
%U A108882 1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,1,1,0,1,1,0,0,1,0,1,1,0,0,1,0,1,1,0,0,1,0,1
%N A108882 Period doubling sequence starting with '1 0 1'.
%C A108882 Start with S = 1,0,1; replace S by SS and complement the last bit; iterate.
%C A108882 Similar to A035263 but with a different start.
%t A108882 f[l_] := Block[{s = Flatten[{l, l}]}, s[[ -1]] = Mod[s[[ -1]] + 1, 2]; s]; Nest[f, {1, 0, 1}, 6] (* _Robert G. Wilson v_, Jul 16 2005 *)
%o A108882 (Python)
%o A108882 def f(l):
%o A108882     s = l + l
%o A108882     s[-1] = (s[-1] + 1) % 2
%o A108882     return s
%o A108882 result = [1, 0, 1]
%o A108882 for _ in range(6):
%o A108882     result = f(result)
%o A108882 print(result) # _Robert C. Lyons_, Jan 19 2025
%Y A108882 Cf. A035263.
%K A108882 easy,nonn
%O A108882 1,1
%A A108882 _Alexandre Losev_, Jul 14 2005
%E A108882 More terms from _Robert G. Wilson v_, Jul 16 2005