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.

A014083 Occurrences of '1111' in binary expansion of n.

This page as a plain text file.
%I A014083 #23 Jul 24 2017 08:29:42
%S A014083 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,
%T A014083 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,3,0,0,0,0,
%U A014083 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
%N A014083 Occurrences of '1111' in binary expansion of n.
%H A014083 Antti Karttunen, <a href="/A014083/b014083.txt">Table of n, a(n) for n = 0..65536</a>
%H A014083 R. Stephan, <a href="/somedcgf.html">Some divide-and-conquer sequences ...</a>
%H A014083 R. Stephan, <a href="/A079944/a079944.ps">Table of generating functions</a>
%H A014083 <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>
%F A014083 a(2n) = a(n), a(2n+1) = a(n) + [n congruent to 7 mod 8]. - _Ralf Stephan_, Aug 21 2003
%F A014083 G.f.: 1/(1-x) * sum(k>=0, t^15(1-t)/(1-t^16), t=x^2^k). - _Ralf Stephan_, Sep 08 2003
%F A014083 a(n) <= log_2(n+1) - 3 for n >= 7. - _Charles R Greathouse IV_, Jan 21 2016
%e A014083 a(63) = 3 as 63 = 111111 in binary and 1111 occurs three times (different occurrences may overlap). - _Antti Karttunen_, Jul 24 2017
%p A014083 See A014081.
%t A014083 Table[SequenceCount[IntegerDigits[n,2],{1,1,1,1},Overlaps->True],{n,0,100}] (* The program uses the SequenceCount function from Mathematica version 10 *) (* _Harvey P. Dale_, Sep 25 2015 *)
%o A014083 (PARI) u1111(n)=my(v=binary(n)); sum(k=1,#v-3, v[k]&&v[k+1]&&v[k+2]&&v[k+3])
%o A014083 (PARI) a(n)=my(s,t); while(n, n>>=valuation(n,2); t=valuation(n+1,2); s+=max(t-3, 0); n>>=t); s \\ _Charles R Greathouse IV_, Jan 21 2016
%Y A014083 Cf. A000120, A014081, A014082.
%K A014083 nonn,base,easy
%O A014083 0,32
%A A014083 _Simon Plouffe_
%E A014083 Term a(0)=0 prepended and more terms from _Antti Karttunen_, Jul 24 2017