login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A118833 a(1) = 1. a(n) = (|a(n-1) - n| + 1)th positive integer which does not occur earlier in the sequence. 2
1, 3, 2, 6, 5, 7, 4, 12, 11, 9, 13, 10, 16, 15, 8, 24, 23, 21, 18, 19, 20, 22, 17, 31, 30, 28, 25, 29, 14, 46, 45, 43, 40, 36, 27, 42, 37, 32, 44, 38, 35, 49, 48, 41, 47, 33, 61, 60, 58, 55, 51, 34, 72, 71, 69, 66, 62, 53, 57, 52, 67, 59, 56, 70, 64, 50, 84, 83, 81, 78, 74, 54 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

This sequence is likely a permutation of the integers.

LINKS

Ivan Neretin, Table of n, a(n) for n = 1..10000

EXAMPLE

The first 8 terms of the sequence are 1,3,2,6,5,7,4,12. |a(8) - 9| + 1 = 4, so a(9) = the 4th positive integer which doesn't occur earlier in the sequence (i.e., the 4th integer in the sequence 8, 9, 10, 11, 13, 14, ...). Therefore a(9) = 11.

MATHEMATICA

Fold[Append[#1, Complement[Range[Max[#1] + (d = Abs[#1[[-1]] - #2] + 1)], #1][[d]]] &, {1}, Range[2, 72]] (* Ivan Neretin, Mar 13 2017 *)

CROSSREFS

Cf. A118834.

Sequence in context: A133729 A244987 A171417 * A268823 A046877 A067587

Adjacent sequences:  A118830 A118831 A118832 * A118834 A118835 A118836

KEYWORD

easy,look,nonn

AUTHOR

Leroy Quet, May 01 2006

EXTENSIONS

More terms from Franklin T. Adams-Watters, Nov 28 2006

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 27 06:24 EDT 2019. Contains 323599 sequences. (Running on oeis4.)