login
A242704
Lexicographically earliest sequence of distinct positive integers such that for any n>0 the number of ones in the binary representation of a(n) divides a(n+1).
3
1, 2, 3, 4, 5, 6, 8, 7, 9, 10, 12, 14, 15, 16, 11, 18, 20, 22, 21, 24, 26, 27, 28, 30, 32, 13, 33, 34, 36, 38, 39, 40, 42, 45, 44, 48, 46, 52, 51, 56, 54, 60, 64, 17, 50, 57, 68, 58, 72, 62, 25, 63, 66, 70, 69, 75, 76, 78, 80, 74, 81, 84, 87, 35, 90, 88, 93
OFFSET
1,2
COMMENTS
Is this a permutation of the positive integers ?
It seems that for a(n-1) = 2^m, a(n) = prime(m), since m < A000120(2^m) = 1, and since p = prime(m) is the smallest missing number for n > 1 as p > m. - Michael De Vlieger, Feb 03 2026
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^16, showing primes in red, proper prime powers in gold, squarefree composites in green, numbers neither squarefree nor powerful in blue, and powerful numbers that are not prime powers in purple.
EXAMPLE
From Michael De Vlieger, Feb 03 2026: (Start)
Let wt(k) = A000120(k), the number of 1's in the binary expansion of k.
Let u(k) be the smallest missing number in this sequence a(1..k).
a(1) = u(1) = 1 since it is the smallest nonzero positive number; u(2) = 2.
a(2) = u(2) = 2 since wt(a(1)) = 1, and 1 | 2.
a(3) = u(3) = 3 since wt(a(2)) = 1, and 1 | 3.
a(4) = u(4) = 4 since wt(a(3)) = 2, and 2 | 4.
a(5) = u(5) = 5 since wt(a(4)) = 1, and 1 | 5.
a(6) = u(6) = 6 since wt(a(5)) = 2, and 2 | 6.
a(7) = 8 since wt(a(6)) = 2, but 2 does not divide u(7) = 7, though 2 | 8, and u(8) remains 7.
a(8) = u(8) = 7 since wt(a(7)) = 1, and 1 | 7.
a(9) = u(9) = 9 since wt(a(8)) = 3, and 3 | 9.
a(10) = u(10) = 10 since wt(a(9)) = 2, and 2 | 10.
a(11) = 12, since wt(a(10)) = 2, but 2 does not divide u(11) = 11, though 2 | 12.
a(12) = 14, since wt(a(11)) = 2; 2 does not divide u(12) = 11, or 13, but 2 | 14, etc. (End)
MATHEMATICA
Block[{c, j, k, d, nn, u}, nn = 120; c[_] := False; j = d = 1; u = 2; {1}~Join~Reap[Do[k = u; While[Or[c[k], ! Divisible[k, d]], k++]; Sow[k]; Set[{c[k], j, d}, {True, k, DigitCount[k, 2, 1]}]; If[k == u, While[c[u], u++]], {n, 2, nn}] ][[-1, 1]] ] (* Michael De Vlieger, Feb 03 2026 *)
PROG
(Perl) # See Link section.
CROSSREFS
Cf. A242705.
Sequence in context: A332073 A117332 A368578 * A362178 A358122 A334111
KEYWORD
nonn,base,look
AUTHOR
Paul Tek, May 21 2014
STATUS
approved