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.

A118463 Inverse permutation to A118462.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 10, 6, 8, 11, 14, 15, 19, 25, 33, 9, 12, 16, 20, 21, 26, 34, 43, 27, 35, 44, 55, 56, 70, 88, 110, 13, 17, 22, 28, 29, 36, 45, 57, 37, 46, 58, 71, 72, 89, 111, 137, 47, 59, 73, 90, 91, 112, 138, 169, 113, 139, 170, 207, 208, 253, 307, 371, 18, 23, 30, 38, 39
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A118462.

Programs

  • Maple
    g:= proc(n, i) option remember; `if`(n=0, [0], `if`(i<1, [], [seq(
          map(p->p+2^(i-1)*j, g(n-i*j, i-1))[], j=0..min(1, n/i))]))
        end:
    b:= proc() local l, i; l:=[]; i:=0;
          proc(n) while nops(l)<=n do
            l:=[l[], sort(g(i, i))[]]; i:=i+1 od; l[n+1]
          end
        end():
    a:= proc() local t, a; t, a:= -1, proc() -1 end;
          proc(n) local h;
            while a(n) = -1 do
              t:= t+1; h:= b(t);
              if a(h) = -1 then a(h):= t fi
            od; a(n)
          end
        end():
    seq(a(n), n=0..100);  # Alois P. Heinz, Sep 06 2014