OFFSET
1,2
COMMENTS
The corresponding record gaps are 1, 2, 4, 8, 12, 18, 26, 27, 33, 38, 42, 44, 46, 50, 58, 68, 74, 77, 103, 109, 122, 137, 156, 157, 165, 189, 191, 204, 240, 265, 267, 312, 333, ...
De Koninck, Doyon and Kátai (2003) proved that the asymptotic density of the Niven numbers in any base >= 2 is 0. Therefore, the asymptotic density of the binary Niven numbers is 0 and this sequence is infinite.
LINKS
Jean-Marie De Koninck and Nicolas Doyon, Large and Small Gaps Between Consecutive Niven Numbers, J. Integer Seqs., Vol. 6, 2003, Article 03.2.5.
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.
EXAMPLE
The first 8 binary Niven numbers are 1, 2, 4, 6, 8, 10, 12 and 16. The differences between them are 1, 2, 2, 2, 2, 2 and 4. The record gaps, 1, 2 and 4, occur at 1, 2 and 12.
MATHEMATICA
binNivenQ[n_] := Divisible[n, DigitCount[n, 2, 1]]; gapmax = 0; n1 = 1; s = {}; Do[If[binNivenQ[n], gap = n - n1; If[gap > gapmax, gapmax = gap; AppendTo[s, n1]]; n1 = n], {n, 2, 10^6}]; s
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amiram Eldar, Aug 14 2020
STATUS
approved