A074458 Number of segments lit to display the number n on a 7-segment display (as in pocket calculators): variant where '6', '7' and '9' use 6, 4 resp. 5 segments.
6, 2, 5, 5, 4, 5, 6, 4, 7, 5, 8, 4, 7, 7, 6, 7, 8, 6, 9, 7, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 10, 6, 9, 9, 8, 9, 10, 8, 11, 9, 11, 7, 10, 10, 9, 10, 11, 9, 12, 10, 12, 8, 11, 11, 10, 11, 12, 10, 13, 11, 10, 6, 9, 9, 8, 9, 10, 8, 11
Offset: 0
Examples
LED display: _ _ _ _ _ _ _ _ | | | _| _| |_| |_ |_ | | |_| |_| |_| | |_ _| | _| |_| | |_| | . so we have a(0) = 6, a(1) = 2, a(2) = 5 ...
Crossrefs
Programs
-
PARI
apply( {A074458(n)=digits(6255456475)[n%10+1]+if(n>9,self()(n\10))}, [0..99]) \\ M. F. Hasler, Jun 17 2020
Formula
From M. F. Hasler, Jun 17 2020: (Start)
a(n) = a(n mod 10) + a(floor(n/10)) for n > 9.
Extensions
Example edited by Jon E. Schoenfield, Jul 30 2017
Edited and extended to n > 9 by M. F. Hasler, Jun 17 2020
Comments