OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
. n | a(n) | A007088(a(n)) | factorization
. ----+------+---------------+--------------
. 1 | 1 | 1 | 1
. 2 | 6 | 110 | 2 * 3
. 3 | 10 | 1010 | 2 * 5
. 4 | 12 | 1100 | 2^2 * 3
. 5 | 18 | 10010 | 2 * 3^2
. 6 | 20 | 10100 | 2^2 * 5
. 7 | 21 | 10101 | 3 * 7
. 8 | 24 | 11000 | 2^3 * 3
. 9 | 34 | 100010 | 2 * 17
. 10 | 36 | 100100 | 2^2 * 3^2
. 11 | 40 | 101000 | 2^3 * 5
. 12 | 48 | 110000 | 2^4 * 3
. 13 | 55 | 110111 | 5 * 11
. 14 | 66 | 1000010 | 2 * 3 * 11
. 15 | 68 | 1000100 | 2^2 * 17
. 16 | 69 | 1000101 | 3 * 23
. 17 | 72 | 1001000 | 2^3 * 3^2
. 18 | 80 | 1010000 | 2^4 * 5
. 19 | 81 | 1010001 | 3^4
. 20 | 96 | 1100000 | 2^5 * 3
. 21 | 115 | 1110011 | 5 * 23
. 22 | 130 | 10000010 | 2 * 5 * 13
. 23 | 132 | 10000100 | 2^2 * 3 * 11
. 24 | 136 | 10001000 | 2^3 * 17
. 25 | 144 | 10010000 | 2^4 * 3^2 .
MATHEMATICA
Select[Range[640], FactorInteger[#][[1, 1]] == DigitCount[#, 2, 1] &] (* Amiram Eldar, Jul 24 2023 *)
PROG
(Haskell)
a262481 n = a262481_list !! (n-1)
a262481_list = filter (\x -> a000120 x == a020639 x) [1..]
(PARI) isok(n) = (n==1) || (hammingweight(n) == factor(n)[1, 1]); \\ Michel Marcus, Sep 29 2015
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, Sep 24 2015
STATUS
approved