OFFSET
1,2
COMMENTS
For any n, m, i, j such that a(n) AND (2^i) <> 0, and a(m) AND (2^j) <>0 (where AND stands for the bitwise AND operator), there exist two sequences of finite length L, say p and b, such that:
(1) p(1)=n, b(1)=i,
(2) p(L)=m, b(L)=j,
(3) a(p(k)) AND (2^b(k)) <> 0 for any k between 1 and L,
(4) |p(k+1)-p(k)| + |b(k+1)-b(k)| = 1 for any k between 1 and L-1.
These two finite sequences define a path of black pixels connecting the black pixels at positions (n,i) and (m,j).
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
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)<n<2^(k+1).
PROG
(Perl) See Link section.
CROSSREFS
KEYWORD
nonn,base,nice
AUTHOR
Paul Tek, Oct 24 2013
STATUS
approved