login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A167151 a(2n+1) = a(2n) + a(2n-1), a(2n)=least number not yet in the sequence, a(1)=1. 9
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(2n-1).
LINKS
FORMULA
a(2n-1) = A005228(n); a(2n) = A030124(n).
MATHEMATICA
a[0] = 0; a[1] = 1;
a[n_?OddQ] := a[n] = a[n - 1] + a[n - 2];
a[n_?EvenQ] := a[n] = For[k = 2, True, k++,
If[FreeQ[Array[a, n - 1], k], Return[k]]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Dec 02 2021 *)
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. A225850 (inverse).
Sequence in context: A233560 A245703 A260426 * A342621 A273014 A336321
KEYWORD
easy,nonn
AUTHOR
M. F. Hasler, Nov 01 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 07:11 EDT 2024. Contains 371905 sequences. (Running on oeis4.)