OFFSET
0,3
COMMENTS
Apart from a(0), only zeroless numbers.
If we move left instead of right, the sequence is the same up to a(103); here, a(103)=1223 while in the other sequence a(103) would be 1322.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 0..10000
EXAMPLE
13894: for instance, let us start from 8. Moving eight steps right we are at 1. Then, moving one step right we are at 3. Then 3 steps right we are at 4. Again after 4 steps we are at 9. After an additional 9 steps we end at 8 again. All the digits have been touched and we are again at the digit we started from.
MAPLE
P:=proc(q) local a, b, d, k, n, t; print(0); for n from 1 to q do d:=ilog10(n)+1; a:=convert(n, base, 10);
for k from 1 to trunc(d/2) do b:=a[k]; a[k]:=a[d-k+1]; a[d-k+1]:=b; od; b:=array(1..d);
for k from 1 to d do b[k]:=0; od; t:=1; for k from 1 to d do
if ((t+(a[t] mod d)) mod d)>0 then b[(t+(a[t] mod d)) mod d]:=1; t:=(t+(a[t] mod d)) mod d;
else b[d]:=1; t:=d; fi; od; if add(b[k], k=1..d)=d then print(n); fi; od; end: P(10^9);
MATHEMATICA
Select[Range[0, 477], (n=IntegerDigits@#; Last[m=Mod[Accumulate@Mod[n, s=Length@n], s]]==0&&Sort@m+1==Range@s)&] (* Giorgos Kalogeropoulos, Nov 21 2021 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Jul 03 2017
STATUS
approved