login
Minimal difference between any two digits of n in base 10.
0

%I #9 Oct 16 2023 12:38:07

%S 1,0,1,2,3,4,5,6,7,8,2,1,0,1,2,3,4,5,6,7,3,2,1,0,1,2,3,4,5,6,4,3,2,1,

%T 0,1,2,3,4,5,5,4,3,2,1,0,1,2,3,4,6,5,4,3,2,1,0,1,2,3,7,6,5,4,3,2,1,0,

%U 1,2,8,7,6,5,4,3,2,1,0,1,9,8,7,6,5,4,3,2,1,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0

%N Minimal difference between any two digits of n in base 10.

%C From 10^10-1 onwards all the terms are 0's.

%e a(2796) = 1 because the second digit of 2796 is 7 and the last digit is 6 and 7-6=1 which is the minimal difference between all the digits of 2796.

%K base,easy,nonn

%O 10,4

%A _Lior Manor_, May 15 2002