The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138664 a(n) = number of positive integers k, k <= n, where the number of one's in the binary representation of each k divides n. 2
1, 2, 2, 4, 3, 6, 3, 7, 5, 9, 4, 12, 4, 10, 8, 12, 5, 17, 5, 15, 11, 14, 5, 24, 5, 15, 14, 18, 5, 25, 5, 21, 16, 18, 7, 35, 6, 19, 19, 27, 6, 35, 6, 27, 23, 20, 6, 46, 6, 23, 24, 31, 6, 40, 9, 33, 26, 21, 6, 60, 6, 21, 26, 37, 13, 45, 7, 40, 29, 31, 7, 66, 7, 26, 38, 43, 7, 53, 7, 53, 34 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
The integers 1 through 9 in binary are (1, 10, 11, 100, 101, 110, 111, 1000, 1001). So the numbers of 1's in these binary representations form the sequence (1,1,2,1,2,2,3,1,2) (the first 9 terms of sequence A000120, starting from A000120(1)). 9 is divisible by all the 1's (there are 4 of those) and by the one 3. So a(9) = 4+1 = 5.
MATHEMATICA
a[n_] := Sum[Boole[Divisible[n, DigitCount[k, 2, 1]]], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, Jul 16 2023 *)
CROSSREFS
Sequence in context: A089173 A126090 A058266 * A140357 A352622 A089265
KEYWORD
nonn,base
AUTHOR
Leroy Quet, Mar 25 2008
EXTENSIONS
Corrected and extended by Sean A. Irvine, Oct 12 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 15:45 EDT 2024. Contains 372554 sequences. (Running on oeis4.)