login
A337078
The number of binary Niven numbers (A049445) not exceeding 2^n.
2
2, 3, 5, 8, 13, 21, 37, 65, 124, 232, 431, 760, 1424, 2575, 4772, 8932, 17033, 32225, 61764, 117897, 224944, 428155, 814294, 1547596, 2934212, 5572886, 10609364, 20237826, 38773350, 74609953, 144275968, 280018507, 545782822, 1064716523, 2081890937, 4068716054
OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..400 (calculated using a binary version of Hiroaki Yamanouchi's Python code at A140866)
Jean-Marie De Koninck, Nicolas Doyon and Imre Kátai, On the counting function for the Niven numbers, Acta Arithmetica, Vol. 106, No. 3 (2003), 265-275.
FORMULA
a(n) ~ 2^(n+1)/n (De Koninck et al., 2003, consequence of Theorem 1).
EXAMPLE
a(1) = 2 since there are 2 binary Niven numbers not exceeding 2^1: 1 and 2.
MATHEMATICA
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
CROSSREFS
Sequence in context: A306486 A236212 A293865 * A024322 A014260 A177246
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Aug 14 2020
STATUS
approved