|
Search: id:A118966
|
|
|
| A118966 |
|
If n doesn't occur among the first (n-1) terms of the sequence, then a(n)= 2n-1. If n occurs among the first (n-1) terms of the sequence, then a(n) = (n+1)/2. |
|
+0 2
|
|
| 1, 3, 2, 7, 9, 11, 4, 15, 5, 19, 6, 23, 25, 27, 8, 31, 33, 35, 10, 39, 41, 43, 12, 47, 13, 51, 14, 55, 57, 59, 16, 63, 17, 67, 18, 71, 73, 75, 20, 79, 21, 83, 22, 87, 89, 91, 24, 95, 97, 99, 26, 103, 105, 107, 28, 111, 29, 115, 30, 119, 121, 123, 32, 127, 129, 131, 34, 135
(list; graph; listen)
|
|
|
OFFSET
|
1,2
|
|
|
COMMENT
|
Sequence is a permutation of the positive integers. It also is its own inverse (i.e. a(a(n)) = n).
|
|
MATHEMATICA
|
f[s_] := Block[{n = Length@s}, Append[s, If[MemberQ[s, n], (n + 1)/2, 2n - 1]]]; Rest@Nest[f, {1}, 70] - Robert G. Wilson v (rgwv(at)rgwv.com), May 16 2006
|
|
CROSSREFS
|
Cf. A118967.
Sequence in context: A026172 A026186 A026210 this_sequence A018891 A034423 A099329
Adjacent sequences: A118963 A118964 A118965 this_sequence A118967 A118968 A118969
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Leroy Quet (qq-quet(AT)mindspring.com), May 07 2006
|
|
EXTENSIONS
|
More terms from Robert G. Wilson v (rgwv(at)rgwv.com), May 16 2006
|
|
|
Search completed in 0.002 seconds
|