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.

A046813 Smallest number m with nonzero digits such that A046810(m)=n.

Original entry on oeis.org

1, 2, 13, 113, 149, 1127, 1136, 1247, 1123, 1349, 1579, 1237, 11267, 11338, 11248, 11237, 11234, 11389, 11579, 13358, 11347, 11239, 12457, 12679, 12349, 12347, 13678, 12359, 14579, 13489, 111349, 12367, 12389, 23579, 13579, 112468, 12379
Offset: 0

Views

Author

Keywords

Programs

  • Maple
    N:= 100: # for a(0) .. a(N)
    f:= proc(L) local t, i;
      if convert(L,`+`) mod 3 = 0 then return 0 fi;
      add(`if`(isprime(add(t[i]*10^(i-1), i=1..nops(t))), 1, 0), t=combinat:-permute(L))
    end proc:
    V:= Array(0..N): count:= 0:
    for d from 1 while count < N+1 do
      if d = 1 then S:= [seq([i],i=1..9)]
    else S:= map(proc(t) local i; seq([i, op(t)], i=t[1]..9) end proc, S)
      fi;
      for L in S while count < N+1 do
        v:= f(L);
        if v <= N and V[v] = 0 then V[v] := add(L[i]*10^(i-1),i=1..nops(L)); count:= count+1 fi;
    od od:
    convert(V,list);