Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A118966
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 18 20:14 EST 2008. Contains 147244 sequences.


AT&T Labs Research