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 A107751 #12 Aug 12 2025 02:39:26 %S A107751 1,1,1,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1, %T A107751 1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1, %U A107751 2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2,1,1,2 %N A107751 a(n) = A107750(n+1) - A107750(n). %H A107751 Antti Karttunen, <a href="/A107751/b107751.txt">Table of n, a(n) for n = 0..65537</a> %F A107751 a(n) = if n<=4 then 1 else 0^(a(n-1)-1) + 0^(a(n-2)-1). %t A107751 A107751[ nmax_ ] := Length /@ Split[ (Total[ 1 - IntegerDigits[ #1, 2 ] ] &) /@ Range[ 0, nmax ] ]; A107751[ 200 ] (* Peter Pein (petsie(AT)dordos.net), Oct 12 2007 *) %o A107751 (PARI) %o A107751 up_to = 65537; %o A107751 A107751list(up_to) = { my(v=vector(up_to)); v[1]=v[2]=v[3]=v[4]=1; for(n=5,up_to,v[n] = (0^(v[n-1]-1) + 0^(v[n-2]-1))); (v); }; %o A107751 v107751 = A107751list(up_to); %o A107751 A107751(n) = if(!n,1,v107751[n]); \\ _Antti Karttunen_, Dec 23 2018 %Y A107751 Cf. A100063, A099837, A100051, A107688. %K A107751 nonn %O A107751 0,6 %A A107751 _Reinhard Zumkeller_, May 23 2005