OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (first 300 terms from David Applegate)
MAPLE
filter:= proc (n) local L, LP;
L := convert(n, base, 10);
if has(L, 0) then return false end if;
if has(L, 1) and not has(L, 2) then return false end if;
if has(L, 2) and not has(L, 3) then return false end if;
if has(L, 3) and not has(L, 5) then return false end if;
if has(L, 4) and not has(L, 7) then return false end if;
LP := [seq([L[i], L[i+1]], i = 1 .. nops(L)-1)];
if has(L, 5) and not member([1, 1], LP) then return false end if;
if has(L, 6) and not member([3, 1], LP) then return false end if;
if has(L, 7) and not member([7, 1], LP) then return false end if;
if has(L, 8) and not member([9, 1], LP) then return false end if;
if has(L, 9) and not member([3, 2], LP) then return false end if;
true
end proc:
select(filter, [$1..1.5*10^5]);
PROG
(C++) // For C++ program see the Applegate link in A135463.
CROSSREFS
KEYWORD
AUTHOR
David Applegate and N. J. A. Sloane, Feb 10 2008
STATUS
approved