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.

A337078 The number of binary Niven numbers (A049445) not exceeding 2^n.

This page as a plain text file.
%I A337078 #12 Aug 14 2020 11:12:51
%S A337078 2,3,5,8,13,21,37,65,124,232,431,760,1424,2575,4772,8932,17033,32225,
%T A337078 61764,117897,224944,428155,814294,1547596,2934212,5572886,10609364,
%U A337078 20237826,38773350,74609953,144275968,280018507,545782822,1064716523,2081890937,4068716054
%N A337078 The number of binary Niven numbers (A049445) not exceeding 2^n.
%H A337078 Amiram Eldar, <a href="/A337078/b337078.txt">Table of n, a(n) for n = 1..400</a> (calculated using a binary version of _Hiroaki Yamanouchi_'s Python code at A140866)
%H A337078 Jean-Marie De Koninck, Nicolas Doyon and Imre Kátai, <a href="https://eudml.org/doc/278575">On the counting function for the Niven numbers</a>, Acta Arithmetica, Vol. 106, No. 3 (2003), 265-275.
%F A337078 a(n) ~ 2^(n+1)/n (De Koninck et al., 2003, consequence of Theorem 1).
%e A337078 a(1) = 2 since there are 2 binary Niven numbers not exceeding 2^1: 1 and 2.
%t A337078 binNivenQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; s = {}; c = 0; p = 2; Do[If[binNivenQ[n], c++]; If[n == p, AppendTo[s, c]; p *= 2], {n, 1, 2^20}]; s
%Y A337078 Cf. A049445, A140866.
%K A337078 nonn,base
%O A337078 1,1
%A A337078 _Amiram Eldar_, Aug 14 2020