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.

A110591 Number of digits in base-4 representation of n.

This page as a plain text file.
%I A110591 #29 Nov 24 2020 07:06:29
%S A110591 1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,
%T A110591 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,
%U A110591 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4
%N A110591 Number of digits in base-4 representation of n.
%C A110591 Number of digits in A007090(n).
%C A110591 In terms of the repetition convolution operator #, where (sequence A) # (sequence B) = the sequence consisting of A(n) copies of B(n), this sequence is the repetition convolution A110594 # n. Over the set of positive infinite integer sequences, # gives a nonassociative noncommutative groupoid (magma) with a left identity (A000012) but no right identity, where the left identity is also a right nullifier and idempotent. For any positive integer constant c, the sequence c*A000012 = (c,c,c,c,...) is also a right nullifier; for c = 1, this is A000012; for c = 3 this is A010701.
%H A110591 Reinhard Zumkeller, <a href="/A110591/b110591.txt">Table of n, a(n) for n = 0..10000</a>
%F A110591 G.f.: 1 + (1/(1 - x))*Sum_{k>=0} x^(4^k). - _Ilya Gutkovskiy_, Jan 08 2017
%F A110591 a(n) = floor(log_4(n)) + 1 for n >= 1. - _Petros Hadjicostas_, Dec 12 2019
%p A110591 A110592 := proc(n)
%p A110591     if n = 0 then
%p A110591         1;
%p A110591     else
%p A110591         1+floor(log[4](n)) ;
%p A110591     end if;
%p A110591 end proc:
%p A110591 seq(A110592(n),n=0..50) ; # _R. J. Mathar_, Sep 02 2020
%t A110591 a[n_] := If[n == 0, 1, Floor[Log[4, n]] + 1];
%t A110591 a /@ Range[0, 100] (* _Jean-François Alcover_, Nov 24 2020 *)
%o A110591 (Haskell)
%o A110591 import Data.List (unfoldr)
%o A110591 a110591 0 = 1
%o A110591 a110591 n = length $
%o A110591    unfoldr (\x -> if x == 0 then Nothing else Just (x, x `div` 4)) n
%o A110591 -- _Reinhard Zumkeller_, Apr 22 2011
%Y A110591 Cf. A000012, A007090, A010701, A049804, A081604, A110594.
%K A110591 easy,nonn
%O A110591 0,5
%A A110591 _Jonathan Vos Post_, Jul 29 2005