OFFSET
1,1
MAPLE
# return true if s is a sublist of L
subL := proc(L::list, s::list)
local ldiff, ls, i;
ls := nops(s) ;
ldiff := nops(L)-ls ;
for i from 1 to ldiff+1 do
if L[i..i+ls-1] = s then
return true;
end if;
end do:
false;
end proc:
has40 := proc(n)
option remember;
subL(convert(n, base, 8), [0, 4]) ;
end proc:
isA044219 := proc(n)
has40(n) and not has40(n-1) ;
end proc:
for n from 1 to 4000 do
if isA044219(n) then printf("%d, ", n) ; end if;
end do: # R. J. Mathar, May 28 2016
MATHEMATICA
SequencePosition[Table[If[SequenceCount[IntegerDigits[n, 8], {4, 0}]>0, 1, 0], {n, 2400}], {0, 1}][[All, 2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 13 2018 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
STATUS
approved