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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245340 Smallest m such that A125717(m) = n, or -1 if n never appears. 4
0, 1, 4, 2, 8, 21, 3, 5, 18, 16, 14, 12, 10, 6, 1518, 32, 58, 30, 184, 28, 7, 26, 9, 11, 13, 15, 17, 19, 102, 51, 100, 49, 98, 47, 96, 45, 94, 43, 92, 41, 90, 39, 88, 37, 86, 35, 84, 20, 24, 22, 505, 81, 2510, 79, 166, 77, 296, 75, 501, 73, 162, 71, 498, 69 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Conjecture: a(n) is never -1.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

Ferenc Adorjan, Some characteristics of _Leroy Quet_'s permutation sequences

PROG

(Haskell)

import Data.IntMap (singleton, member, (!), insert)

a245340 n = a245340_list !! n

a245340_list = 0 : f [1..] [1..] 0 (singleton 0 0) where

   f us'@(u:us) vs'@(v:vs) w m

     | u `member` m = (m ! u) : f us vs' w m

     | otherwise    = g (reverse[w-v, w-2*v..1] ++ [w+v, w+2*v..]) where

     g (x:xs) = if x `member` m then g xs else f us' vs x $ insert x v m

CROSSREFS

Cf. A245394, A245395, A057167.

Sequence in context: A230900 A204449 A172393 * A040174 A084477 A046589

Adjacent sequences:  A245337 A245338 A245339 * A245341 A245342 A245343

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Jul 21 2014

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 21 11:21 EST 2019. Contains 319354 sequences. (Running on oeis4.)