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!)
A334792 Let L_0 = (0, 1, 2, ...); for k = 1, 2, ..., L_k is obtained by splitting L_{k-1} into runs of k! terms and reversing even-indexed runs; {a(n)} is the limit of L_k as k tends to infinity. 1
0, 1, 3, 2, 4, 5, 10, 11, 9, 8, 6, 7, 12, 13, 15, 14, 16, 17, 22, 23, 21, 20, 18, 19, 43, 42, 44, 45, 47, 46, 41, 40, 38, 39, 37, 36, 31, 30, 32, 33, 35, 34, 29, 28, 26, 27, 25, 24, 48, 49, 51, 50, 52, 53, 58, 59, 57, 56, 54, 55, 60, 61, 63, 62, 64, 65, 70, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
A003188 can be obtained in the same manner by considering runs of 2^k terms.
A163332 can be obtained in the same manner by considering runs of 3^k terms.
This sequence is a permutation of the nonnegative integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..5039 (n = 0..7!-1)
EXAMPLE
L_0 = (0, 1, 2, 3, 4, 5, ...)
L_1 = (0, 1, 2, 3, 4, 5, ...)
L_2 = (0, 1, 3, 2, 4, 5, ...)
As 5 < k! for k > 2, we have:
- a(0) = 0,
- a(1) = 1,
- a(2) = 3,
- a(3) = 2,
- a(4) = 4,
- a(5) = 5.
PROG
(PARI) a(n) = { for (k=1, oo, if (n<k!, while (k, my (q=n\k!, r=n%k!); if (q%2, n=(q+1)*k!-1-r; ); k--); return (n))) }
CROSSREFS
Sequence in context: A241417 A211363 A059320 * A255167 A264993 A280318
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 11 2020
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)