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.

Showing 1-1 of 1 results.

A262943 Inverse of conjectured permutation A262942.

Original entry on oeis.org

1, 2, 6, 3, 4, 8, 7, 5, 12, 9, 10, 14, 15, 11, 17, 13, 22, 18, 16, 19, 20, 23, 29, 24, 25, 21, 26, 28, 31, 38, 27, 30, 44, 32, 37, 43, 33, 34, 48, 35, 36, 39, 46, 54, 45, 40, 41, 49, 47, 50, 57, 52, 53, 42, 51, 59, 56, 63, 55, 58, 60, 61, 75, 65, 73, 67
Offset: 1

Views

Author

Max Barrentine, Oct 05 2015

Keywords

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms of A262942 before the first > N
    V:= Vector(N):
    W:= Vector(N):
    S:= Vector(N):
    firstav:= 1;
    for n from 1 to N do
        forbid:= {seq(op([2*V[k]-V[2*k-n], 2*V[2*k-n]-V[k], (V[k]+V[2*k-n])/2]), k=ceil((n+1)/2)..n-1)};
        for v from firstav to N do
          if S[v] <> 0 and v = firstav then firstav:= v+1 fi;
          if S[v] = 0 and not member(v, forbid) then
            V[n]:= v;
            W[v]:= n;
            S[v]:= 1;
            break
          fi
        od;
        if v > N then break fi;
    od:
    seq(W[i],i=1..firstav-1); # Robert Israel, Nov 23 2015

Extensions

Corrected and extended by Robert Israel, Nov 23 2015
Showing 1-1 of 1 results.