OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
extend:= proc(x) local t;
t:= x mod 5;
if t = 0 then 5*x+1
elif t = 4 then 5*x+3
else 5*x+t-1, 5*x+t+1
fi
end proc;
extend := proc (x) local t; t := `mod`(x, 5); if t = 0 then
5*x+1 elif t = 4 then 5*x+3 else 5*x+t-1, 5*x+t+1 end if end
proc
L:= [1, 2, 3, 4]: R:= op(L):
while nops([R])<100 do
L:= map(extend, L);
R:= R, op(L);
od:
R; # Robert Israel, Dec 21 2025
MATHEMATICA
Join[Range[4], Select[Range[1000], Union[Abs[Differences[IntegerDigits[ #, 5]]]]=={1}&]] (* Harvey P. Dale, Dec 28 2011 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved
