cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A079399 Number of dots in Braille representation of n.

Original entry on oeis.org

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

Views

Author

Jon Perry, Feb 16 2003

Keywords

Comments

The number of dots in [0..9] is [3,1,2,2,3,2,3,4,3,2].

Examples

			a(11) = 1+1 = 2.
		

Crossrefs

See A072283 for another version. Cf. A079401, A079405.

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

Formula

a(n) = A000120(A121018(n)) = A000120(A121019(n)). - Reinhard Zumkeller, Jul 23 2006