OFFSET
0,1
COMMENTS
FORMULA
For n % 10 < 9, a(n) = a(n % 9), where % is the modulo (remainder) operator. - M. F. Hasler, Jun 23 2020
EXAMPLE
Consider the representations of digits '0', '1' and '2' given below.
To change from 0 to 1, we need to delete 4 segments, from 1 to 2, we need to delete 1 segment and add 4 segments, so 5 segments in total are needed to be changed.
From M. F. Hasler, Jun 23 2020:
We consider the following 7-segment representations of the digits 0 - 9:
_ _ _ _ _ _ _ _
| | | _| _| |_| |_ |_ | | |_| |_|
|_| | |_ _| | _| |_| | |_| | .
To switch from displaying number 9 to displaying number 10, one has to activate 2 segments for the additional digit '1', and change 3 segments from the representation of '9' to get that of '0', whence a(9) = 2 + 3 = 5.
To switch from 19 to 20 one has a(19) = a(1) + 3 = 8. (End)
PROG
(PARI) apply( {A074459(n)=if(n%10<9, digits(452331432)[n%10+1], n>9, 3+self()(n\10), 5)}, [0..99]) \\ M. F. Hasler, Jun 23 2020
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Y. Kelly Itakura (yitkr(AT)mta.ca), Aug 22 2002
EXTENSIONS
Edited and terms for n > 8 added by M. F. Hasler, Jun 23 2020
STATUS
approved