[go: up one dir, main page]

login
A132196
a(2n+1) = 2a(2n)-n for the odd indices. Smallest strictly positive integer not yet in the list for the even indices, a(2n).
1
1, 2, 3, 5, 4, 6, 7, 11, 8, 12, 9, 13, 10, 14, 15, 23, 16, 24, 17, 25, 18, 26, 19, 27, 20, 28, 21, 29, 22, 30, 31, 47, 32, 48, 33, 49, 34, 50, 35, 51, 36, 52, 37, 53, 38, 54, 39, 55, 40, 56, 41, 57, 42, 58, 43, 59, 44, 60, 45, 61, 46, 62, 63, 95, 64, 96, 65, 97, 66, 98, 67, 99
OFFSET
0,2
LINKS
FORMULA
a(n) = m + (n-1)/2 for odd n and a(n) = (m + n)/2 for even n, where m is the greatest power of 2 not exceeding n+2. - Ivan Neretin, Sep 05 2017
MATHEMATICA
Fold[Append[#1, If[OddQ[#2], 2 #1[[-1]] - (#2 - 1)/2, Min@Complement[Range[Max[#1] + 1], #1]]] &, {1}, Range[71]] (* Ivan Neretin, Sep 04 2017 *)
CROSSREFS
Sequence in context: A154443 A180200 A121216 * A153150 A069766 A081241
KEYWORD
nonn
AUTHOR
Paul Curtz, Nov 05 2007
EXTENSIONS
Edited by R. J. Mathar, Nov 16 2007
STATUS
approved