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.

A255308 Number of times log_2 can be applied to n until the result is not a power of 2. Here log_2 means the base-2 logarithm.

This page as a plain text file.
%I A255308 #22 Apr 14 2021 05:27:05
%S A255308 0,1,2,0,3,0,0,0,1,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
%T A255308 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
%U A255308 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1
%N A255308 Number of times log_2 can be applied to n until the result is not a power of 2. Here log_2 means the base-2 logarithm.
%C A255308 Multiplicative because only powers of two have a nonzero value. - _Andrew Howroyd_, Jul 27 2018
%H A255308 Antti Karttunen, <a href="/A255308/b255308.txt">Table of n, a(n) for n = 0..65537</a>
%F A255308 a(n) = 1 + a(log_2(n)) if n is a power of 2, 0 otherwise.
%o A255308 (PARI) a(n) = if(n < 1, 0, my(e=valuation(n, 2)); if(n == 2^e, 1 + a(e), 0)) \\ _Andrew Howroyd_, Jul 27 2018
%Y A255308 Cf. A209229, A255309.
%Y A255308 One less than A293668.
%K A255308 nonn,easy,mult
%O A255308 0,3
%A A255308 _Paul Boddington_, Feb 20 2015
%E A255308 Extended up to a(128) by _Antti Karttunen_, Sep 30 2018