# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a236341 Showing 1-1 of 1 %I A236341 #27 Aug 09 2017 23:09:40 %S A236341 1,3,2,6,7,4,13,5,14,9,8,11,12,18,25,26,16,24,27,19,28,21,29,10,23,30, %T A236341 39,15,36,34,55,54,32,48,56,17,35,31,38,57,58,59,75,22,43,20,45,47,49, %U A236341 41,50,94,52,107,109,53,40,61,103,70,66,105,60,63,37,64 %N A236341 a(n) = the position of n in A160855 or 0 if n is not in A160855. %C A236341 If A160855 is a permutation of the positive integers then a(n) > 0 and A160855(a(n)) = n and a(A160855(n)) = n. %H A236341 Reinhard Zumkeller, Table of n, a(n) for n = 1..10000 %t A236341 Block[{nn = 66, a = {}}, Do[k = 1; While[Or[MemberQ[a, k], SequencePosition[IntegerDigits[Total@ a + k, 2], #] == {}], k++] &@ IntegerDigits[n, 2]; AppendTo[a, k], {n, 3 nn}]; Take[#, nn] &@ SortBy[MapIndexed[{First@ #2, #1} &, a], Last][[All, 1]]] (* _Michael De Vlieger_, Aug 09 2017 *) %o A236341 (Haskell) %o A236341 import Data.List (elemIndex); import Data.Maybe (fromJust) %o A236341 a236341 = (+ 1) . fromJust . (`elemIndex` a160855_list) %Y A236341 Cf. A160855. %K A236341 nonn,look %O A236341 1,2 %A A236341 _Reinhard Zumkeller_, Mar 13 2014 %E A236341 Better definition from _Michael De Vlieger_, Aug 09 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE