OFFSET
1,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
MAPLE
isA043095 := proc(n)
dgs := convert(n, base, 9) ;
for i from 2 to nops(dgs) do
if op(i, dgs) = op(i-1, dgs) then
return false;
end if;
end do:
true ;
end proc:
A043095 := proc(n)
option remember;
if n =1 then
0;
else
for a from procname(n-1)+1 do
if isA043095(a) then
return a;
end if;
end do;
end if;
end proc:
seq(A043095(n), n=1..120) ; # R. J. Mathar, Dec 28 2023
MATHEMATICA
Select[Range[0, 100], !MemberQ[Flatten[Differences/@Partition[ IntegerDigits[ #, 9], 2, 1]], 0]&] (* Harvey P. Dale, Apr 05 2014 *)
PROG
(PARI) isok(n) = {my(d = digits(n, 9)); for (i=2, #d, if (d[i] == d[i-1], return (0)); ); return (1); } \\ Michel Marcus, Oct 11 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved