A230598 Lexicographically earliest sequence of distinct positive integers such that all black pixels in the binary plot of the sequence are connected (see Comments for details).
1, 3, 2, 6, 4, 5, 7, 9, 11, 10, 14, 8, 12, 13, 15, 17, 19, 18, 22, 20, 21, 23, 25, 27, 26, 30, 16, 24, 28, 29, 31, 33, 35, 34, 38, 36, 37, 39, 41, 43, 42, 46, 40, 44, 45, 47, 49, 51, 50, 54, 52, 53, 55, 57, 59, 58, 62, 32, 48, 56, 60, 61, 63, 65, 67, 66, 70
Offset: 1
Links
- Paul Tek, Table of n, a(n) for n = 1..10000
- Paul Tek, Binary plot of the first 127 terms
- Paul Tek, PERL program for this sequence
- Eric Weisstein's World of Mathematics, Binary Plot
- Index entries for sequences that are permutations of the natural numbers
Programs
-
Perl
See Link section.
Formula
Empirically, for any k>2 :
(1) a(2^k-1) = 2^k-1,
(2) a(2^k) = 2^k+1,
(3) a(n) = a(n-2^k+1) + 2^k, for any n such that 2^k<=n<2^(k+1)-(k+1),
(4) a(n) = 2^k, for n=2^(k+1)-(k+1),
(5) a(n) = a(n-2^k) + 2^k, for any n such that 2^(k+1)-(k+1)
Comments