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.

A054900 a(n) = Sum_{j >= 1} floor(n/16^j).

This page as a plain text file.
%I A054900 #27 Apr 29 2023 08:10:47
%S A054900 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,
%T A054900 2,2,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,4,4,4,4,
%U A054900 4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6
%N A054900 a(n) = Sum_{j >= 1} floor(n/16^j).
%H A054900 G. C. Greubel, <a href="/A054900/b054900.txt">Table of n, a(n) for n = 0..10000</a>
%F A054900 a(n) = (n - A053836(n))/15.
%F A054900 From _Hieronymus Fischer_, Aug 14 2007: (Start)
%F A054900 Recurrence:
%F A054900 a(n) = a(floor(n/16)) + floor(n/16).
%F A054900 a(16*n) = a(n) + n.
%F A054900 a(n*16^m) = a(n) + n*(16^m - 1)/15.
%F A054900 a(k*16^m) = k*(16^m - 1)/15, for 0 <= k < 16, m>=0.
%F A054900 Asymptotic behavior:
%F A054900 a(n) = n/15 + O(log(n)).
%F A054900 a(n+1) - a(n) = O(log(n)) (this follows from the inequalities below).
%F A054900 a(n) <= (n-1)/15; equality holds for powers of 16.
%F A054900 a(n) >= (n-15)/15 - floor(log_16(n)); equality holds for n = 16^m - 1, m > 0.
%F A054900 Limits:
%F A054900 lim inf (n/15 - a(n)) = 1/15, for n --> oo.
%F A054900 lim sup (n/15 - log_16(n) - a(n)) = 0, for n --> oo.
%F A054900 lim sup (a(n+1) - a(n) - log_16(n)) = 0, for n --> oo.
%F A054900 Series:
%F A054900 G.f.: (1/(1-x))*Sum_{k > 0} x^(16^k)/(1-x^(16^k)). (End)
%t A054900 a[n_, m_]:= If[n==0, 0, a[Floor[n/m], m] +Floor[n/m]];
%t A054900 Table[a[n, 16], {n,0,127}] (* _G. C. Greubel_, Apr 28 2023 *)
%o A054900 (Magma)
%o A054900 m:=16;
%o A054900 function a(n) // a = A054900, m = 16
%o A054900   if n eq 0 then return 0;
%o A054900   else return a(Floor(n/m)) + Floor(n/m);
%o A054900   end if; end function;
%o A054900 [a(n): n in [0..127]]; // _G. C. Greubel_, Apr 28 2023
%o A054900 (SageMath)
%o A054900 m=16 # a = A054900
%o A054900 def a(n): return 0 if (n==0) else a(n//m) + (n//m)
%o A054900 [a(n) for n in range(128)] # _G. C. Greubel_, Apr 28 2023
%Y A054900 Cf. A011371 and A054861 for analogs involving powers of 2 and 3.
%Y A054900 Cf. A053836, A054897, A054899, A067080, A098844, A132032.
%K A054900 nonn
%O A054900 0,33
%A A054900 _Henry Bottomley_, May 23 2000