OFFSET
0,1
COMMENTS
The number of dots in [0..9] is [3,1,2,2,3,2,3,4,3,2].
LINKS
American Foundation for the Blind, Braille Bug
American Printing House for the Blind, Braille: Deciphering the Code
RNIB, This is Braille
FORMULA
EXAMPLE
a(11) = 1+1 = 2.
MATHEMATICA
With[{br=Thread[Range[0, 9]->{3, 1, 2, 2, 3, 2, 3, 4, 3, 2}]}, Total/@ Table[ IntegerDigits[ n]/.br, {n, 0, 100}]] (* Harvey P. Dale, May 24 2013 *)
PROG
(PARI) { braille=[3, 1, 2, 2, 3, 2, 3, 4, 3, 2]; for (n=0, 99, b=braille[n%10+1]; if (n>9, b=b+braille[n\10+1]); print1(b", ")) }
(Python)
b = [3, 1, 2, 2, 3, 2, 3, 4, 3, 2]
def a(n): return sum(b[d] for d in map(int, str(n)))
print([a(n) for n in range(100)]) # Michael S. Branicky, Mar 01 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Feb 16 2003
STATUS
approved