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!)
A065191 Limit of the recursion B_[k] = T[k](B_[k-1]), where B_[1] = (1,2,3,4,5,...) and T[k] is the transformation that permutes the entries k(2i-1) + j and k(2i) + j for all j = 0,..,k-1 and positive integers i. 8
1, 4, 8, 3, 5, 16, 18, 19, 11, 2, 40, 13, 15, 10, 24, 29, 37, 50, 12, 9, 63, 28, 66, 7, 33, 60, 22, 31, 35, 44, 26, 45, 57, 80, 6, 47, 109, 128, 14, 39, 155, 64, 48, 49, 25, 32, 106, 227, 53, 82, 150, 139, 143, 58, 78, 169, 147, 198, 70, 23, 131, 88, 156, 75, 103, 166, 192 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Charlie Neder, Table of n, a(n) for n = 1..5000

MATHEMATICA

Reap[Do[pos = n; Do[pos -= k (-1)^Quotient[pos, k], {k, n, 1, -1}]; pos -= If[Mod[n, 4] < 2, 1, -1]; Sow[pos], {n, 1, 5000}]][[2, 1]]; (* Jean-Fran├žois Alcover, Mar 02 2020, partly translated from Charlie Neder's Python code *)

PROG

(Python)

for n in range(1, 5001):

..pos = n

..for k in range(n, 1, -1): pos -= k*(-1)**(pos//k)

..print(n, pos)

# Charlie Neder, Feb 04 2019

CROSSREFS

Cf. A065192, A065193, A065194, A065195, A065196, A065197.

Sequence in context: A248946 A232808 A248508 * A229988 A273051 A021678

Adjacent sequences:  A065188 A065189 A065190 * A065192 A065193 A065194

KEYWORD

nice,nonn

AUTHOR

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 19 2001

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 January 25 15:17 EST 2022. Contains 350572 sequences. (Running on oeis4.)