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.

A070972 Length of longest run of consecutive 1's in binary expansion of 3^n (A004656).

This page as a plain text file.
%I A070972 #3 Mar 30 2012 17:30:44
%S A070972 1,2,1,2,1,4,2,2,2,3,3,7,6,4,5,4,3,4,4,4,6,5,5,4,3,2,10,8,7,5,4,5,7,9,
%T A070972 8,6,5,7,11,10,8,6,6,4,9,7,6,4,9,8,6,9,8,6,5,5,3,4,7,5,10,8,7,6,6,6,6,
%U A070972 4,4,7,7,5,5,5,5,5,5,9,8,6,5,6,5,6,5,5,4,6,5,10,8,7,5,6,6,6,7,7,6,7,5,5,5,9
%N A070972 Length of longest run of consecutive 1's in binary expansion of 3^n (A004656).
%e A070972 3^11 = (101011001111111011) binary, so a(11) = 7.
%t A070972 f[n_Integer] := Block[{p = Flatten[ Position[ Prepend[ IntegerDigits[2*3^n, 2], 0], 0]]}, Max[Drop[p, 1] - Drop[p, -1]] - 1]; Table[ f[n], {n, 0, 103}]
%Y A070972 Cf. A004656 and A011754.
%K A070972 base,easy,nonn
%O A070972 0,2
%A A070972 Frank Schwellinger (nummer_eins(AT)web.de), Jan 03 2003
%E A070972 Edited by _Robert G. Wilson v_, Jan 04 2002