cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A236341 a(n) = the position of n in A160855 or 0 if n is not in A160855.

Original entry on oeis.org

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, 39, 15, 36, 34, 55, 54, 32, 48, 56, 17, 35, 31, 38, 57, 58, 59, 75, 22, 43, 20, 45, 47, 49, 41, 50, 94, 52, 107, 109, 53, 40, 61, 103, 70, 66, 105, 60, 63, 37, 64
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 13 2014

Keywords

Comments

If A160855 is a permutation of the positive integers then a(n) > 0 and A160855(a(n)) = n and a(A160855(n)) = n.

Crossrefs

Cf. A160855.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a236341 = (+ 1) . fromJust . (`elemIndex` a160855_list)
  • Mathematica
    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 *)

Extensions

Better definition from Michael De Vlieger, Aug 09 2017