A079399 Number of dots in Braille representation of n.
3, 1, 2, 2, 3, 2, 3, 4, 3, 2, 4, 2, 3, 3, 4, 3, 4, 5, 4, 3, 5, 3, 4, 4, 5, 4, 5, 6, 5, 4, 5, 3, 4, 4, 5, 4, 5, 6, 5, 4, 6, 4, 5, 5, 6, 5, 6, 7, 6, 5, 5, 3, 4, 4, 5, 4, 5, 6, 5, 4, 6, 4, 5, 5, 6, 5, 6, 7, 6, 5, 7, 5, 6, 6, 7, 6, 7, 8, 7, 6, 6, 4, 5, 5, 6, 5, 6, 7, 6, 5, 5, 3, 4, 4, 5, 4, 5, 6, 5, 4
Offset: 0
Keywords
Examples
a(11) = 1+1 = 2.
Links
- American Foundation for the Blind, Braille Bug
- American Printing House for the Blind, Braille: Deciphering the Code
- RNIB, This is Braille
Programs
-
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 *)
-
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
Comments