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

A079714 Number of 2's in n!.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 0, 3, 2, 0, 3, 1, 2, 2, 3, 1, 2, 2, 2, 1, 2, 1, 0, 0, 4, 7, 3, 1, 4, 3, 3, 3, 7, 4, 5, 4, 3, 4, 4, 4, 8, 6, 6, 10, 3, 10, 3, 6, 9, 6, 1, 9, 10, 6, 9, 10, 13, 8, 6, 11, 8, 8, 8, 14, 7, 8, 10, 8, 14, 9, 12, 10, 16, 8, 12, 9, 5, 9, 12, 14, 17, 16, 12, 9, 10, 8, 8, 17, 11, 19, 7, 13, 16, 19, 19, 14
Offset: 0

Views

Author

Cino Hilliard, Jan 31 2003

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> numboccur(2, convert(n!, base, 10)):
    seq(a(n), n=0..101);  # Alois P. Heinz, Apr 26 2021
  • Mathematica
    Table[DigitCount[n!,10,2],{n,0,110}] (* Harvey P. Dale, Jun 20 2021 *)
  • PARI
    a(n) = #select(x->(x==2), digits(n!)); \\ Michel Marcus, Apr 26 2021

Formula

a(n) = A034886(n) - (A027869(n) + A079680(n) + A079684(n) + A079688(n) + A079690(n) + A079691(n) + A079692(n) + A079693(n) + A079694(n)). - Reinhard Zumkeller, Jan 27 2008

Extensions

a(36) ff. corrected by Georg Fischer, Apr 26 2021

A100910 Table of number of occurrences in n of each decimal digit from 0 to 9.

Original entry on oeis.org

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

Views

Author

Rick L. Shepherd, Nov 21 2004

Keywords

Comments

Each row of this table has length 10 and corresponds to one term of A100909. n = 0 is normally represented as the single digit 0, so the first row here is 1, 0, 0, 0, 0, 0, 0, 0, 0, 0.

Crossrefs

Cf. A100909 (similar but each row of A100910 provides one A100909 term).
Cf. A055642 (row sums), A055641 (column 0), A268643 (column 1), A316863 (column 2), A316864 (column 3), A316865 (column 4), A316866 (column 5), A316867 (column 6), A316868 (column 7), A316869 (column 8), A102683 (column 9).

Programs

  • Maple
    seq(seq(numboccur(k, convert(n,base,10)),k=0..9),n=0..100); # Robert Israel, Jul 08 2016
  • Mathematica
    A100910row[n_] := RotateRight[DigitCount[n]];
    Array[A100910row, 10, 0] (* Paolo Xausa, Jul 16 2025 *)
  • PARI
    T(n, k) = #select(x->x==k, digits(n))+!(n+k); \\ Jinyuan Wang, Mar 01 2020

Formula

From Robert Israel, Jul 08 2016: (Start)
a(n,k) = a(A059995(n),k) + (1 if A010879(n)=k, otherwise 0).
G.f. g(x,y) satisfies g(x,y) = ((1-x^10)/(1-x))*g(x^10,y) + (x^10-x)/(1-x) + x^10/(1-x^10) + x*y*(1-x^9*y^9)/((1-x^10)*(1-x*y)). (End)

A316868 Number of times 7 appears in decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 15 2018

Keywords

Examples

			a(0) = 0 since the decimal representation of 0 does not contain the digit 7.
a(7) = 1 since 7 appears once in the decimal expansion of 7.
		

Crossrefs

Programs

  • Mathematica
    Array[ DigitCount[#, 10, 7] &, 105, 0]
  • PARI
    a(n) = #select(x->x==7, digits(n)); \\ Michel Marcus, Jul 20 2018

A316869 Number of times 8 appears in decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 15 2018

Keywords

Examples

			a(0) = 0 since the decimal representation of 0 does not contain the digit 8.
a(8) = 1 since 8 appears once in the decimal expansion of 8.
		

Crossrefs

Programs

  • Mathematica
    Array[ DigitCount[#, 10, 8] &, 105, 0]
  • PARI
    a(n) = #select(x->x==8, digits(n)); \\ Michel Marcus, Jul 20 2018

A316865 Number of times 4 appears in decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 15 2018

Keywords

Examples

			a(0) = 0 since the decimal representation of 0 does not contain the digit 4.
a(4) = 1 since 4 appears once in the decimal expansion of 4.
		

Crossrefs

Programs

  • Mathematica
    Array[ DigitCount[#, 10, 4] &, 105, 0]
  • PARI
    a(n) = #select(x->x==4, digits(n)); \\ Michel Marcus, Jul 20 2018

A316866 Number of times 5 appears in decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 15 2018

Keywords

Examples

			a(0) = 0 since the decimal representation of 0 does not contain the digit 5.
a(5) = 1 since 5 appears once in the decimal expansion of 5.
		

Crossrefs

Programs

  • Mathematica
    Array[ DigitCount[#, 10, 5] &, 105, 0]
  • PARI
    a(n) = #select(x->x==5, digits(n)); \\ Michel Marcus, Jul 20 2018

A316867 Number of times 6 appears in decimal expansion of n.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jul 15 2018

Keywords

Examples

			a(0) = 0 since the decimal representation of 0 does not contain the digit 6.
a(6) = 1 since 6 appears once in the decimal expansion of 6.
		

Crossrefs

Programs

  • Mathematica
    Array[ DigitCount[#, 10, 6] &, 105, 0]
  • PARI
    a(n) = #select(x->x==6, digits(n)); \\ Michel Marcus, Jul 20 2018

A280916 Number of dashes in International Morse numeral representation of n.

Original entry on oeis.org

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

Views

Author

Indranil Ghosh, Jan 10 2017

Keywords

Comments

The Morse Code is written in current ITU standard.

Examples

			For n = 4, the Morse numeral representation of 4 is "....-" i.e., 1 dash. So, a(4) = 1.
For n = 26, the Morse numeral representation of 26 is "..--- -...." i.e, 4 dashes. So, a(26) = 4.
		

Crossrefs

Cf. A060109 (Morse code of n), A280913 (number of dots).
Cf. A006968, A278182 (for Roman resp. Maya representation of n).

Programs

  • Mathematica
    Array[Total@ Map[Abs[# - 5] &, IntegerDigits[#]] &, 101, 0] (* Michael De Vlieger, Jun 28 2020 *)
  • PARI
    apply( {A280916(n)=if(n>9, self()(n\10)+self()(n%10), abs(n-5))}, [0..88]) \\ M. F. Hasler, Jun 22 2020
  • Python
    M={"1":".----","2":"..---","3":"...--","4":"....-","5":".....","6":"-....","7":"--...","8":"---..","9":"----.","0":"-----"}
    def A280916(n):
        z="".join(M[i] for i in str(n))
        return z.count("-")
    print([A280916(n) for n in range(100)])
    

Formula

a(n) = A316863(A060109(n)) = floor(1+n/10)*5 - A280913(n) = a(floor(n/10)) + a(n%10) if n > 9 or |5 - n| otherwise, where % is the modulo (remainder) operator. - M. F. Hasler, Jun 22 2020

A342115 Lexicographically latest sequence of distinct nonnegative integers such that the multisets of frequencies of digits in the decimal representations of n and of a(n) are the same.

Original entry on oeis.org

0, 9, 8, 7, 6, 5, 4, 3, 2, 1, 98, 99, 97, 96, 95, 94, 93, 92, 91, 90, 89, 87, 88, 86, 85, 84, 83, 82, 81, 80, 79, 78, 76, 77, 75, 74, 73, 72, 71, 70, 69, 68, 67, 65, 66, 64, 63, 62, 61, 60, 59, 58, 57, 56, 54, 55, 53, 52, 51, 50, 49, 48, 47, 46, 45, 43, 44, 42
Offset: 0

Views

Author

Rémy Sigrist, Feb 28 2021

Keywords

Comments

We ignore leading zeros (hence a(0) = 0).
This sequence is a self-inverse permutation of the nonnegative integers.

Examples

			Consider the set of numbers T with two distinct digits, say u and v, such that u appears once and v appears twice:
- the least elements of T are: 100, 101, 110, 112,
- the greatest elements of T are: 995, 996, 997, 998,
- so a(100) = 998, a(101) = 997, a(110) = 996, a(112) = 995.
		

Crossrefs

Programs

  • PARI
    See Links section.

Formula

a(d * (10^k-1)/9) = (10-d) * (10^k-1)/9 for any k >= 0 and d = 1..9.
a(n) < 10^k for any n < 10^k.
Showing 1-9 of 9 results.