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

A079405 Number of dots in primes in Braille.

Original entry on oeis.org

2, 2, 2, 4, 2, 3, 5, 3, 4, 4, 3, 6, 4, 5, 7, 4, 4, 4, 7, 5, 6, 6, 5, 5, 6, 5, 6, 8, 6, 4, 7, 4, 7, 5, 6, 4, 7, 6, 8, 7, 7, 5, 4, 5, 7, 5, 4, 6, 8, 6, 6, 6, 6, 5, 8, 7, 7, 7, 10, 6, 7, 6, 9, 4, 5, 7, 5, 8, 9, 7, 6, 6, 9, 8, 8, 7, 7, 8, 7, 8, 6, 6, 6, 7, 7, 8, 8, 9, 7, 8, 10, 9, 10, 6, 7, 7, 7, 5, 6, 6, 9, 8, 7, 7
Offset: 0

Views

Author

Jon Perry, Feb 16 2003

Keywords

Examples

			The 5th prime is 11, hence a(11)=1+1=2
		

Crossrefs

Programs

  • PARI
    { braille=[3,1,2,2,3,2,3,4,3,2]; forprime (n=2,300, b=braille[n%10+1]; n2=n; if (n>99, b=b+braille[n\100+1]; n2=n%100); if (n2>9,b=b+braille[n2\10+1]); print1(b",")) }
    
  • PARI
    { braille=[3, 1, 2, 2, 3, 2, 3, 4, 3, 2]; forprime (n=2, 300, n2=n; b=0; while (n2>0, b=b+braille[n2%10+1]; n2=n2\10); print1(b", ")) } \\ Sean A. Irvine, Feb 04 2010

Extensions

Corrected and extended by Sean A. Irvine, Feb 04 2010

A281020 Numbers with a prime number of raised dots in their Braille representation.

Original entry on oeis.org

0, 1, 4, 6, 8, 12, 13, 15, 19, 21, 31, 47, 51, 67, 70, 74, 76, 78, 87, 91, 100, 104, 106, 108, 111, 127, 137, 140, 144, 146, 148, 157, 160, 164, 166, 168, 172, 173, 175, 177, 179, 180, 184, 186, 188, 197, 202, 203, 205, 207, 209, 217, 220, 224, 226, 228, 230, 234, 236, 238
Offset: 1

Views

Author

Indranil Ghosh, Jan 13 2017

Keywords

Examples

			67 is in the sequence. 67, as evident from the link uploaded above, has 11 raised dots ("o") in its Braille representation and 11 is prime.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    B=[3, 1, 2, 2, 3, 2, 3, 4, 3, 2]
    def a(n):
        s=0
        for i in str(n):
            s+=B[int(i)]
        return s+4
    i=0
    j=1
    while j<=10000:
        if isprime(a(i))==True :
            print(f"{j} {i}")
            j+=1
        i+=1

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.