login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


Number of steps required to reach a single-digit number when successively increasing all digits of n by 1 simultaneously and removing leading zeros (9 becomes 0).
3

%I #17 Dec 08 2018 03:01:11

%S 0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,8,8,8,8,8,8,8,8,8,8,7,7,7,7,

%T 7,7,7,7,7,7,6,6,6,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,4,4,

%U 4,4,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2

%N Number of steps required to reach a single-digit number when successively increasing all digits of n by 1 simultaneously and removing leading zeros (9 becomes 0).

%H Felix Fröhlich, <a href="/A270172/b270172.txt">Table of n, a(n) for n = 0..10000</a>

%e For n = 11: Successively increasing the digits of n yields the sequence s(t) (starting with t = 0): 11, 22, 33, 44, 55, 66, 77, 88, 99, 0. s(9) = 0, so a(11) = 9.

%e For n = 15: The sequence s(t) (again starting with t = 0): 15, 26, 37, 48, 59, 60, 71, 82, 93, 4. s(9) = 4, so a(15) = 9.

%o (PARI) eva(n) = subst(Pol(n), x, 10)

%o increasedigits(n) = my(d=digits(n)); for(k=1, #d, d[k]++; if(d[k]==10, d[k]=0)); eva(d)

%o a(n) = my(x=n, i=0); while(#Str(x) > 1, x=increasedigits(x); i++); i

%Y Cf. A256079, A270173.

%K nonn,base

%O 0,11

%A _Felix Fröhlich_, Mar 12 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 23 11:59 EDT 2024. Contains 376164 sequences. (Running on oeis4.)