

A167151


a(2n+1) = a(2n) + a(2n1), a(2n)=least number not yet in the sequence, a(1)=1.


8



0, 1, 2, 3, 4, 7, 5, 12, 6, 18, 8, 26, 9, 35, 10, 45, 11, 56, 13, 69, 14, 83, 15, 98, 16, 114, 17, 131, 19, 150, 20, 170, 21, 191, 22, 213, 23, 236, 24, 260, 25, 285, 27, 312, 28, 340, 29, 369, 30, 399, 31, 430, 32, 462, 33, 495, 34, 529, 36, 565, 37, 602, 38, 640, 39, 679
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,3


COMMENTS

Lexicographically earliest reordering of the nonnegative integers (can be extended by symmetry to a permutation of all integers) such that a(2n+1) = a(2n) + a(2n1).


LINKS

M. F. Hasler, Table of n, a(n) for n = 0..2000
Index entries for Hofstadtertype sequences
Index entries for sequences that are permutations of the natural numbers


FORMULA

a(2n1) = A005228(n); a(2n) = A030124(n).


PROG

(PARI) {used=[]; print1(b=0); a=1; for(i=1, 99, used=setunion(used, Set(a+=b)); while(setsearch(used, b++), used=setminus(used, Set(b))); print1(", "a", "b))}
(Haskell)
import Data.List (transpose)
a167151 n = a167151_list !! n
a167151_list = 0 : concat (transpose [a005228_list, a030124_list])
 Reinhard Zumkeller, May 17 2013


CROSSREFS

Cf. A022941, A143344, A156031.
Cf. A225850 (inverse).
Sequence in context: A233560 A245703 A260426 * A273014 A072275 A122989
Adjacent sequences: A167148 A167149 A167150 * A167152 A167153 A167154


KEYWORD

easy,nonn


AUTHOR

M. F. Hasler, Nov 01 2009


STATUS

approved



