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.

Showing 1-4 of 4 results.

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

A121019 Value of n written in Braille, seen as 2 X 3 bit-code: 1 for a raised dot and 0 for an empty dot position.

Original entry on oeis.org

22, 32, 48, 36, 38, 34, 52, 54, 50, 20, 2070, 2080, 2096, 2084, 2086, 2082, 2100, 2102, 2098, 2068, 3094, 3104, 3120, 3108, 3110, 3106, 3124, 3126, 3122, 3092, 2326, 2336, 2352, 2340, 2342, 2338, 2356, 2358, 2354, 2324, 2454, 2464, 2480, 2468, 2470, 2466
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 23 2006

Keywords

Comments

A000120(a(n)) = A079399(n).

Examples

			...... +-----+
n=0: . | _ . | -> (010)(110)
...... | . . | .. -> 010110[bin] = 22 = a(0)
...... | _ _ |
...... +-----+
n=1: . | . _ | -> (100)(000)
...... | _ _ | .. -> 100000[bin] = 32 = a(1)
...... | _ _ |
...... +-----+
n=2: . | . _ | -> (110)(000)
...... | . _ | .. -> 110000[bin] = 48 = a(2)
...... | _ _ |
...... +-----+
n=3: . | . . | -> (100)(100)
...... | _ _ | .. -> 100100[bin] = 36 = a(3)
...... | _ _ |
...... +-----+
n=4: . | . . | -> (100)(110)
...... | _ . | .. -> 100110[bin] = 38 = a(4)
...... | _ _ |
...... +-----+
n=5: . | . _ | -> (100)(010)
...... | _ . | .. -> 100100[bin] = 34 = a(5)
...... | _ _ |
...... +-----+
n=6: . | . . | -> (110)(100)
...... | . _ | .. -> 111000[bin] = 52 = a(6)
...... | _ _ |
...... +-----+
n=7: . | . . | -> (110)(110)
...... | . . | .. -> 110110[bin] = 54 = a(7)
...... | _ _ |
...... +-----+
n=8: . | . _ | -> (110)(010)
...... | . . | .. -> 101100[bin] = 50 = a(8)
...... | _ _ |
...... +-----+
n=9: . | _ . | -> (010)(100)
...... | . _ | .. -> 010100[bin] = 20 = a(9)
...... | _ _ |
...... +-----+.
		

Crossrefs

Cf. A121018.

Programs

  • Mathematica
    a[0]=22; a[1]= 32; a[2]= 48; a[3]= 36; a[4]= 38; a[5]= 34; a[6]= 52; a[7]= 54; a[8]= 50; a[9]=20; a[n_]:=a[Floor[n/10]]*64+a[Mod[n, 10]]; Table[a[n], {n, 0, 45}] (* James C. McMahon, Oct 12 2024 *)

Formula

a(n) = a(floor(n/10))*64 + a(n mod 10) for n>9.

A126755 Braille numberdromes: numbers which read the same backwards and forwards in Braille.

Original entry on oeis.org

1, 2, 3, 7, 11, 22, 33, 46, 59, 64, 77, 80, 95, 111, 121, 131, 161, 171, 212, 222, 232, 262, 272, 313, 323, 333, 373, 416, 426, 436, 476, 519, 529, 539, 579, 614, 624, 634, 674, 717, 727, 737, 777, 810, 820, 830, 870, 915, 925, 935, 975
Offset: 1

Views

Author

Michael Joseph Halm, Apr 23 2007

Keywords

Comments

The pairs 4 and 6, 5 and 9 and 0 and 8 are mirror images of each other. When a Braille number is read backward (as a mirror-image) the number is usually not the same as the original. Those that are the same could be called by analogy with the ordinary numberdromes the Braille numberdromes. Those with "a double yolk", such as 1081, would be Braille numberddromes, by analogy with palinddromes.

Examples

			a(8) = 46 because in Braille 4 and 6 are mirror images of each other.
		

Crossrefs

Cf. A121018.

A238365 Number of dots needed to express n as a Roman numeral in Braille.

Original entry on oeis.org

2, 4, 6, 6, 4, 6, 8, 10, 6, 4, 6, 8, 10, 10, 8, 10, 12, 14, 10, 8, 10, 12, 14, 14, 12, 14, 16, 18, 14, 12, 14, 16, 18, 18, 16, 18, 20, 22, 18, 7, 9, 11, 13, 13, 11, 13, 15, 17, 13, 3, 5, 7, 9, 9, 7, 9, 11, 13, 9, 7, 9, 11, 13, 13, 11, 13, 15, 17, 13, 11, 13, 15
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 25 2014

Keywords

Examples

			VII in Braille (with the "Roman num" character):
  o  o      o    o
     o    o    o
  o  o o
Therefore a(7) = 10 - 2 = 8.
		

Crossrefs

Programs

  • PARI
    a=[2, 4, 6, 6, 4, 6, 8, 10, 6, 0]; b=[0, 4, 8, 12, 7, 3, 7, 11, 15, 6]; for(n=1, 72, if(n<100, print1(a[lift(Mod(n-1, 10))+1]+b[floor(n/10)+1], ", "), break));
    
  • PARI
    /* The program works for n < 40 */
    b=0; for(n=1, 39, if(Mod(n, 10)==0, b=b+4); m=lift(Mod(n, 10)); a=2*m-6; if(Mod(m, 5)==4, d=abs(a-7)+b+1, if(m<4, d=a+b+6, d=a+b)); print1(d, ", "));
Showing 1-4 of 4 results.