This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A232751 #22 Jun 06 2014 02:32:47 %S A232751 0,1,3,2,7,5,15,6,11,31,13,23,4,63,27,47,9,127,14,55,95,19,255,29,111, %T A232751 191,10,39,511,59,223,383,21,79,1023,30,119,447,767,43,159,2047,61, %U A232751 239,895,12,1535,87,319,4095,123,479,1791,25,3071,175,22,639,8191 %N A232751 Permutation of natural numbers obtained by entangling even and odd numbers with Hofstadter's complementary pair A005228 & A030124; inverse permutation to A232752. %C A232751 The permutation A135141 was obtained in analogous way by entangling even and odd numbers with primes and composites. %C A232751 Note how all even numbers occur in positions given by A005228 from its second term 3 onward: 3, 7, 12, 18, 26, 35, 45, ... . %C A232751 Note how all odd numbers occur in positions given by A030124: 2, 4, 5, 6, 8, 9, 10, 11, 13, 14, 15, ... . %C A232751 See also the comments in A232752. %C A232751 Interesting observation: For all numbers of form (2^n)-1, from 7 onward, the next term in the sequence which has that (2^n)-1 as its proper prefix (in decimal notation), appears to be 10*((2^n)-1)+9. For example, a(4)=7 and a(33)=79 is the first term of more than one decimal digits beginning with 7. For the higher values of A000225, we have examples of a(6)=15 & a(40)=159, a(9)=31 & a(48)=319, a(13)=63 & a(57)=639, a(17)=127 & a(66)=1279, a(22)=255 & a(76)=2559, a(28)=511 & a(87)=5119, a(34)=1023 & a(99)=10239, a(41)=2047 & a(111)=20479, a(49)=4095 & a(124)=40959, a(58)=8191 & a(138)=81919, a(67)=16383 & a(153)=163839, a(77)=32767 & a(168)=327679, a(88)=65535 & a(184)=655359. %C A232751 So while each A000225(n) occurs at positions given by sequence 1, 2, 4, 6, 9, 13, 17, 22, 28, 34, 41, 49, 58, 67, 77, 88, 100, 112, 125, 139, 154, 169, 185, 202, 220, 239, 258, 278, 299, 321, 344, 367, ... (which from 2 onward are A232739, the iterates of A030124, cf. comment at A232752), each (10*A000225(n))+9 occurs at positions given by sequence 21, 27, 33, 40, 48, 57, 66, 76, 87, 99, 111, 124, 138, 153, 168, 184, 201, 219, 238, 257, 277, 298, 320, 343, 366, 390, 415, 441, 468, 496, 524, 553, ... Note how these seem to be one less than the previous sequence shifted 7 steps left. %H A232751 Antti Karttunen, <a href="/A232751/b232751.txt">Table of n, a(n) for n = 0..1557</a> %H A232751 <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a> %H A232751 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A232751 a(0)=0, a(1)=1; for n > 1, when A232747(n)>0 (when n is in A005228), a(n) = 2*a(A232747(n)-1), otherwise (when n is in A030124) a(n) = (2*a(A232749(n))) + 1. %F A232751 For all n >= 1, a(A232739(n)) = A000225(n+1). %o A232751 (Scheme, with memoization macro definec from _Antti Karttunen_'s IntSeq-library) %o A232751 (definec (A232751 n) (cond ((< n 2) n) ((not (zero? (A232747 n))) (* 2 (A232751 (- (A232747 n) 1)))) (else (+ 1 (* 2 (A232751 (A232749 n))))))) %Y A232751 Inverse permutation: A232752. %Y A232751 Cf. A135141, A005228, A030124, A005843 & A005408, A000079, A000225, A232747, A232749, A232739. %Y A232751 Cf. also the permutation pair A167151 & A225850. %K A232751 nonn,look %O A232751 0,3 %A A232751 _Antti Karttunen_, Nov 30 2013