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.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Aug 14 2020

Keywords

Examples

			a(1) = 2 since there are 2 binary Niven numbers not exceeding 2^1: 1 and 2.
		

Crossrefs

Programs

  • 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

Formula

a(n) ~ 2^(n+1)/n (De Koninck et al., 2003, consequence of Theorem 1).