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-5 of 5 results.

A064532 Total number of holes in decimal expansion of the number n, assuming 4 has no hole.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 1, 0, 0, 0, 0, 0, 1, 0, 2, 1, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Oct 07 2001

Keywords

Comments

Assumes that 4 is represented without a hole.

Examples

			8 has two holes so a(8) = 2.
		

Crossrefs

Cf. A064529, A064530. Equals A064531 - 1.
Cf. A358439 (sum by number of digits).

Programs

  • Mathematica
    a[n_ /; 0 <= n <= 9] := a[n] = {1, 0, 0, 0, 0, 0, 1, 0, 2, 1}[[n + 1]]; a[n_] := Total[a[#] + 1 &  /@ (id = IntegerDigits[n])] - Length[id];  Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 22 2013 *)
    Table[DigitCount[x].{0, 0, 0, 0, 0, 1, 0, 2, 1, 1}, {x, 0, 104}] (* Michael De Vlieger, Feb 02 2017, after Zak Seidov at A064692 *)
  • PARI
    h(n) = [1, 0, 0, 0, 0, 0, 1, 0, 2, 1][n];
    a(n) = if (n, my(d=digits(n)); sum(i=1, #d, h(d[i]+1)), 1); \\ Michel Marcus, Nov 11 2022
  • Python
    def A064532(n):
        x=str(n)
        return x.count("0")+x.count("6")+x.count("8")*2+x.count("9") # Indranil Ghosh, Feb 02 2017
    

Formula

a(10i+j) = a(i) + a(j), etc.

Extensions

More terms from Matthew Conroy, Oct 09 2001

A064531 Number of connected components remaining when decimal expansion of the number n is cut from a piece of paper.

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 2, 1, 1, 1, 1, 1, 2, 1, 3, 2, 4, 3, 3, 3, 3, 3, 4, 3, 5, 4, 3, 2, 2, 2, 2, 2, 3, 2, 4, 3, 3, 2, 2, 2, 2
Offset: 0

Views

Author

N. J. A. Sloane, Oct 07 2001

Keywords

Comments

Assumes that 4 is represented without a hole.

Crossrefs

Cf. A064529, A064530. Equals A064532 + 1.

Programs

  • Mathematica
    a[n_ /; 0 <= n <= 9] := a[n] = {2, 1, 1, 1, 1, 1, 2, 1, 3, 2}[[n + 1]]; a[n_] := Total[a /@ (id = IntegerDigits[n])] - Length[id] + 1 ; Table[a[n], {n, 0, 104}] (* Jean-François Alcover, Nov 22 2013 *)

Extensions

More terms from Matthew Conroy, Oct 09 2001

A064529 Number of connected components remaining when n-th letter of English alphabet is cut from a piece of paper.

Original entry on oeis.org

2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, Oct 07 2001

Keywords

Crossrefs

Equals A064530 + 1. Cf. A064531, A064532.

A208568 Number of holes in n-th lower case letter of English alphabet (in hand-written form using a cursive script).

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 2, 1, 0, 1, 2, 1, 0, 0, 1, 1, 2, 0, 1, 0, 0, 0, 0, 0, 1, 1
Offset: 1

Views

Author

Alex Bellos and N. J. A. Sloane, Feb 28 2012, corrected Mar 01 2012

Keywords

Examples

			a has one hole, b has one hole, c has no holes, ... (though the sequence refers to hand-written letters, not these printed letters).
		

Crossrefs

A185374 Number of holes in n-th lower case letter of English alphabet (in printed form using standard Times New Roman font).

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Alex Bellos, Feb 29 2012

Keywords

Comments

The letter a has one hole, b has one hole, c has no holes, ...

Crossrefs

Showing 1-5 of 5 results.