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.

Previous Showing 11-20 of 36 results. Next

A061217 Number of zeros in the concatenation n(n-1)(n-2)(n-3)...321.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Apr 22 2001

Keywords

Comments

The number of zeros necessary to write down all the numbers 1, 2, ..., n. Thus, the partial sums of A055641 are given by a(n)+1 (for n>=1). - Hieronymus Fischer, Jun 12 2012

Examples

			a(30) = 3 since number of zeros in 302928272625242322212019181716151413121110987654321 is 3. (This example implies offset = 1.)
		

Crossrefs

Programs

  • Haskell
    a061217 n = a061217_list !! (n-1)
    a061217_list = scanl1 (+) $ map a055641 [1..]
    -- Reinhard Zumkeller, Oct 27 2013
    
  • Mathematica
    Table[Count[Flatten[IntegerDigits/@Table[x-n,{n,0,x-1}]],0],{x,110}] (* Harvey P. Dale, Aug 10 2011 *)
  • PARI
    a(n) = my(m=logint(n,10)); (m+1)*(n+1) - (10^(m+1)-1)/9 + (1/2) * sum(j=1, m+1, (n\10^j * (2*n+2 - (1 + n\10^j) * 10 ^ j) - floor(n/10^j+9/10) * (2*n+2 + ((4/5 - floor(n / 10^j + 9 / 10))*10^j)))) \\ adapted from formula by Hieronymus Fischer \\ David A. Corneth, Jan 23 2019

Formula

From Hieronymus Fischer, Jun 12 2012: (Start)
a(n) = (m+1)*(n+1) - (10^(m+1)-1)/9 + (1/2)*Sum_{j=1..m+1} (floor(n/10^j)*(2*n + 2 - (1 + floor(n/10^j))*10^j) - floor(n/10^j + 9/10)*(2*n + 2 + (4/5 - floor(n/10^j + 9/10))*10^j)), where m=floor(log_10(n)).
a(n) = A117804(n+1) - (n+1)*A054640(n) + (1/2)*Sum_{j=1..m+1} ((floor(n/10^j + 9/10)^2 - floor(n/10^j)^2)*10^j - (4/5*floor(n/10^j + 9/10) + floor(n/10^j))*10^j), where m=floor(log_10(n)).
a(10^m-1) = m*10^(m-1) - (10^m-1)/9.
(This is the total number of zeros occurring in all the numbers 1..10^m-1 or numbers with <= m places excluding zero.)
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (1-x^10^j)*x^10^(j+1)/(1-x^10^(j+1)). (End)

Extensions

Corrected and extended by Patrick De Geest, Jun 05 2001
Offset changed to 1 by Hieronymus Fischer, Jun 12 2012

A102679 Number of digits >= 7 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007093 (numbers in base 7). - Bernard Schott, Feb 12 2023

Crossrefs

Programs

  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=7 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..125); # Emeric Deutsch, Feb 23 2005

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 3/10) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(7*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A102681 Number of digits >= 8 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007094 (numbers in base 8). - Bernard Schott, Feb 18 2023

Crossrefs

Programs

  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=8 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..120); # Emeric Deutsch, Feb 23 2005

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 1/5) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(8*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A132133 Number of n-digit "Punctual Birds" (cf. A131881).

Original entry on oeis.org

1, 9, 45, 270, 2104, 16941, 142245, 1226146
Offset: 0

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

The number of n-digit "Early Birds" is 9*10^(n-1) - A132133(n), which is 0, 45, 630, 6896, 73059, 757755, 7773854, ... for n = 1, 2, ...
Here a(0) = 1 corresponds to the number 0 which is punctual in the sense that it does not occur before position 0, and which may be considered to have 0 digits for convenience: The index of 10^n in A131881 is then Sum_{k=0..n} a(k). - M. F. Hasler, Oct 25 2019

Examples

			a(2) = 45 because there are 45 2-digit Punctual Birds (10, 11, 13-20, 22, 24-30, 33, 35-40, 44, 46-50, 55, 57-60, 66, 68-70, 77, 79, 80, 88 and 90)
		

Crossrefs

Extensions

Extended to a(0) = 1 by M. F. Hasler, Oct 25 2019

A102677 Number of digits >= 6 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007092 (numbers in base 6). - Bernard Schott, Feb 02 2023

Crossrefs

Programs

  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=6 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..116); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Table[Total@ Take[Most@ DigitCount@ n, -4], {n, 0, 104}] (* Michael De Vlieger, Aug 17 2017 *)

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 2/5) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(6*10^j) - x^(10*10^j))/(1-x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A132131 "Punctual Bird" numbers n with the additional property that n-1 is not a Punctual Bird (cf. A131881).

Original entry on oeis.org

1, 13, 22, 24, 33, 35, 44, 46, 55, 57, 66, 68, 77, 79, 88, 90, 100, 102, 113, 124, 133, 143, 153, 163, 173, 183, 193, 203, 224, 235, 244, 254, 264, 274, 284, 294, 304, 335, 346, 355, 365, 375, 385, 395, 405, 446, 457, 466, 476, 486, 496, 506, 557, 568, 577, 587
Offset: 1

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

Punctual Birds (A131881) are all numbers k with A132131(n) <= k < A132132(n) for some n Early Birds (A116700) are all numbers k with A132132(n) <= k < A132131(n+1) for some n

Examples

			a(1)=1 because 1 is the first Punctual Bird.
a(2)=13 because 1-11 are Punctual Birds and 12 is not a Punctual Bird.
a(3)=22 because 13-20 are Punctual Birds and 21 is not a Punctual Bird.
		

Crossrefs

A102684 Number of times the digit 9 appears in the decimal representations of all integers from 0 to n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

This is the total number of digits = 9 occurring in all the numbers 0, 1, 2, ... n (in decimal representation). - Hieronymus Fischer, Jun 10 2012

Crossrefs

Programs

  • Maple
    p:=proc(n) local b,ct,j: b:=convert(n,base,10): ct:=0: for j from 1 to nops(b) do if b[j]>=9 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(add(p(i),i=0..n), n=0..105); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Accumulate[DigitCount[Range[0,100],10,9]] (* Harvey P. Dale, Mar 30 2018 *)
  • PARI
    a(n) = sum(k=0, n, #select(x->(x==9), digits(k))); \\ Michel Marcus, Oct 03 2023

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 1/10)*(2n + 2 - (4/5 + floor(n/10^j + 1/10))*10^j) - floor(n/10^j)*(2n + 2 - (1+floor(n/10^j)) * 10^j)), where m = floor(log_10(n)).
a(n) = (n+1)*A102683(n) + (1/2)*Sum_{j=1..m+1} ((-4/5*floor(n/10^j + 1/10) + floor(n/10^j))*10^j - (floor(n/10^j + 1/10)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
a(10^m-1) = m*10^(m-1).
(this is total number of digits = 9 occurring in all the numbers with <= m places).
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(9*10^j) - x^(10*10^j))/(1-x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005
Definition revised by N. J. A. Sloane, Mar 30 2018

A132132 "Early Bird" numbers n such that n-1 is not an Early Bird (cf. A116700).

Original entry on oeis.org

12, 21, 23, 31, 34, 41, 45, 51, 56, 61, 67, 71, 78, 81, 89, 91, 101, 110, 121, 131, 141, 151, 161, 171, 181, 191, 201, 210, 231, 241, 251, 261, 271, 281, 291, 301, 310, 341, 351, 361, 371, 381, 391, 401, 410, 451, 461, 471, 481, 491, 501, 510, 561, 571, 581
Offset: 1

Views

Author

Graeme McRae, Aug 11 2007

Keywords

Comments

Punctual Birds (A131881) are all numbers k with A132131(n) <= k < A132132(n) for some n Early Birds (A116700) are all numbers k with A132132(n) <= k < A132131(n+1) for some n

Examples

			a(1)=12 because 12 is the first Early Bird.
a(2)=21 because 21 is the second Early Bird.
a(3)=23 because 23 is the third Early Bird.
a(4)=31 because 31 is the fourth Early Bird.
a(5)=34 because 31-32 are Early Birds and 33 is not an Early Bird.
		

Crossrefs

A331162 a(n) is the number of digits in the concatenation of a(0) to a(n-1) that are equal to the corresponding digit in the concatenation of all integers >= 0, with a(0) = 0.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 60, 62, 63, 64, 65, 66, 67, 68, 69, 70, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 80
Offset: 0

Views

Author

Scott R. Shannon, Jan 11 2020

Keywords

Comments

Let 'G' be the infinite string of numbers formed by the concatenation of all integers >= 0. Under the first '0' write '0', and from then on write the number of digits so far written that equal the corresponding digit in G. The numbers thus written form this sequence.
For the first 10 million terms the largest single increment occurs after a(166308) = 52903, and all 5 digits of 52903 match the digits in G, thus a(166309) = 52908. An increment of 5 also occurs after 190 other terms. The longest run of terms which do not change starts at a(112962) = 23232, and 23232 continues for another 87 terms. Although '2' and '3' appear in G during this run it so happens that they are in the alternating position to the '2' and '3' in 23232. This raises the question of whether the longest possible run of non-changing terms is finite or unbounded as n goes to infinity. a(10000000) = 1792311.

Examples

			a(1) = 1 as a(0) = 0, and 0 equals the corresponding digit 0 in G.
a(10) = 10 as a(0) = 0, a(1) = 1, ... a(9) = 9, and the digits in all entries a(0) to a(9) equal the corresponding digit in G.
a(11) = 12 as a(10) = 10, and the digits '1' and '0' from '10' equal the corresponding digits '1' and '0' in G, thus a(11) = a(10) + 2 = 12.
a(12) = 13 as a(11) = 12, and the digit '1' from '12' equals the corresponding digit '1' in G. However the digit '2' in '12' corresponds to the second digit of '11' in G. Thus a(12) = a(11) + 1 = 13.
		

Crossrefs

A279766 Number of odd digits in the decimal expansions of integers 1 to n.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 60, 61, 61, 62, 62, 63, 63, 64, 64
Offset: 0

Views

Author

Joseph Myers, Dec 18 2016

Keywords

Comments

From Bernard Schott, Feb 19 2023: (Start)
Problem 1 of the British Mathematical Olympiad, round 1, in 2016/2017 asked: when the integers 1, 2, 3, ..., 2016 are written down in base 10, how many of the digits in the list are odd? The answer is a(2016) = 4015.
The similar sequence but with number of even digits is A358854. (End)

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0, a(n-1)+
          nops(select(x-> x::odd, convert(n,base,10))))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 22 2016
  • Mathematica
    Table[Count[Flatten@ IntegerDigits@ Range[0, n], d_ /; OddQ@ d], {n, 0, 68}] (* or *)
    Accumulate@ Table[Count[IntegerDigits@ n, d_ /; OddQ@ d], {n, 0, 68}] (* Michael De Vlieger, Dec 22 2016 *)

Formula

a(n) = A196564(A007908(n)). - Michel Marcus, Dec 18 2016
a(n) = A117804(n+1) - A358854(n) (number of total digits - number of even digits). - Bernard Schott, Feb 19 2023
Previous Showing 11-20 of 36 results. Next