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

A206439 Partial sums of A064692.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 5, 6, 7, 7, 7, 7, 8, 8, 9, 9, 11, 12, 13, 13, 13, 13, 14, 14, 15, 15, 17, 18, 19, 19, 19, 19, 20, 20, 21, 21, 23, 24, 26, 27, 28, 29, 31, 32, 34, 35, 38, 40, 41, 41, 41, 41, 42, 42, 43, 43, 45, 46, 48, 49, 50, 51, 53, 54, 56, 57, 60, 62, 63, 63, 63, 63, 64, 64, 65, 65, 67, 68, 71, 73, 75, 77, 80, 82, 85, 87, 91
Offset: 0

Views

Author

N. J. A. Sloane, Feb 27 2012

Keywords

Crossrefs

Cf. A064692.

Programs

  • Mathematica
    Table[Sum[DigitCount[x].{0,0,0,1,0,1,0,2,1,1},{x,0,m}],{m,0,88}] (* Zak Seidov, Jul 25 2015 *)

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

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

A327820 Smallest prime with n holes in its decimal digits.

Original entry on oeis.org

2, 19, 83, 89, 809, 1889, 4889, 46889, 48889, 468889, 688889, 3888889, 4888889, 28888889, 88884889, 288888889, 808888889, 4488888889, 8688888889, 48808888889, 48888888889, 288888888889, 888088888889, 1888888888889, 4888888888889, 48808888888889, 88848888888889
Offset: 0

Views

Author

Andrew Heathwaite, Sep 26 2019

Keywords

Comments

Smallest prime p such that A064692(p) = n. Also record-holders in A327462. - Felix Fröhlich, Sep 27 2019
The sequence is not monotonically increasing: a(32) > a(33). - Giovanni Resta, Sep 27 2019

Crossrefs

Programs

  • Mathematica
    s[0] = {1,2,3,5,7}; s[1] = {0,4,6,9}; s[2] = {8}; m[{sn_, t_}] := Union[Sort /@ Tuples[s[sn], {t}]]; f[nd_, nh_] := Block[{v, pa = Tally /@ IntegerPartitions[ nh, {nd}, {0, 1, 2}], bst = Infinity}, Do[v = Flatten /@ Tuples[m /@ p]; Do[z = Select[ FromDigits /@ Select[ Permutations[e], First[#] > 0 && OddQ[Last[#]] &], PrimeQ]; bst = Min[bst, {z}], {e, v}], {p, pa}]; bst]; a[0]=2; a[n_] := Block[{nd = Ceiling[(n + 1)/2], b}, While[! IntegerQ@ (b = f[nd, n]), nd++]; b]; a /@ Range[0, 30] (* Giovanni Resta, Sep 27 2019 *)
  • PARI
    count_holes(n) = my(d=digits(n), i=0); for(k=1, #d, if(d[k]==0 || d[k]==4 || d[k]==6 || d[k]==9, i++, if(d[k]==8, i+=2))); i
    a(n) = forprime(p=1, , if(count_holes(p)==n, return(p))) \\ Felix Fröhlich, Sep 27 2019

Extensions

a(7) corrected and more terms added by Felix Fröhlich, Sep 27 2019
More terms from Giovanni Resta, Sep 27 2019

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

A327462 Number of holes in decimal expansion of n-th prime.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 27 2019

Keywords

Comments

This is A064692 restricted to the primes.

Crossrefs

Programs

  • PARI
    forprime (p=2, 439, print1 (vecsum(apply(d -> [1, 0, 0, 0, 1, 0, 1, 0, 2, 1][1+d], digits(p))) ", ")) \\ Rémy Sigrist, Sep 27 2019

A064693 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, 2, 1, 2, 1, 3, 2, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 4, 3, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 3, 2, 2, 2, 3, 2, 3, 2, 4, 3, 2, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 3, 3, 3, 4, 3, 4, 3, 5, 4, 3, 2, 2, 2, 3, 2, 3, 2, 4, 3, 3, 2, 2, 2, 3
Offset: 0

Views

Author

Matthew Conroy, Oct 11 2001

Keywords

Examples

			We assume 1,2,3,5 have no hole; 0,4,6,9 have 1 hole; 8 has two holes. So cutting 8 from a piece of paper creates three connected components: one for each hole and one for the remainder of the paper. Hence a(8)=3.
		

Crossrefs

Cf. A064531. Equals A064692 + 1.

A374349 Integers >=0 whose decimal digits are topologically distinct from those of any smaller number.

Original entry on oeis.org

0, 1, 8, 10, 11, 18, 40, 48, 88, 100, 101, 108, 111, 118, 188, 400, 408, 488, 888, 1000, 1001, 1008, 1011, 1018, 1088, 1111, 1118, 1188, 1888, 4000, 4008, 4088, 4888, 8888, 10000, 10001, 10008, 10011, 10018, 10088, 10111, 10118, 10188, 10888, 11111, 11118
Offset: 1

Views

Author

Charles L. Hohn, Jul 05 2024

Keywords

Comments

Assumes 0 without a slash or a center dot, closed 4, 6, and 9, and no overlapping of multiple digits. Digits homologous to a (flattened) sphere: 1, 2, 3, 5, 7; to a torus: 0, 4, 6, 9; to a double torus: 8. Sequence is a run of the terms in ascending numeric order.
All topologically distinct terms can be represented by nondecreasing sequences of strings of 0s, 1s, and 8s. However, terms cannot begin with 0. Therefore, if a string has 0s, then (i) if there are any 1s, one of them moves to the front, (ii) else, the first 0 is replaced with 4. Sequence is the resulting strings sorted as base-10 numbers. - Michael S. Branicky, Jul 11 2024

Examples

			0 is homologous to 1 torus, so a(1)=0.
1 is homologous to 1 sphere, so a(2)=1.
2 is homologous to 1 sphere, same as 1, so it is not in the sequence.
4 is homologous to 1 torus, same as 0, so it is not in the sequence.
8 is homologous to 1 double torus, so a(3)=8.
10 is homologous to 1 sphere and 1 torus, so a(4)=10.
11 is homologous to 2 spheres, so a(5)=11.
14 is homologous to 1 sphere and 1 torus, same as 10, so it is not in the sequence.
41 is homologous to 1 sphere and 1 torus, same as 10, so it is not in the sequence.
		

Crossrefs

Programs

  • PARI
    df(d, c)=(10^c-1)/9*d
    n=0; a=0; at=1; while(true, a++; at+=a+1; ac=0; for(b=0, a, for(c=0, b, n++; print(n, " ", if(n<=2, n-1, ac+b-c+1
    				
  • Python
    from itertools import count, islice, combinations_with_replacement as cwr
    def agen(): # generator of terms
        after = {"1":"018", "4":"08", "8":"8"}
        yield from (0, 1, 8)
        for digits in count(2):
            for first in "148":
                for rest in cwr(after[first], digits-1):
                    yield int(first + "".join(rest))
    print(list(islice(agen(), 50))) # Michael S. Branicky, Jul 07 2024
Showing 1-8 of 8 results.