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 41-50 of 53 results. Next

A102678 Number of digits >= 6 in the decimal representations of all integers from 0 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 8, 8, 8, 8, 8, 8, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 13, 14, 15, 16, 16, 16, 16, 16, 16, 16, 17, 18, 19, 20, 20, 20, 20, 20, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 32, 34, 36, 38, 39, 40, 41, 42, 43, 44, 46, 48
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

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

Crossrefs

Partial sums of A102677.
Cf. A000120, A000788, A023416, A059015 (for base 2).

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(add(p(i),i=0..n), n=0..86); # Emeric Deutsch, Feb 23 2005

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 2/5)*(2n + 2 - (1/5 + floor(n/10^j + 2/5))*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)*A102677(n) + (1/2)*Sum_{j=1..m+1} ((-1/5*floor(n/10^j + 2/5) + floor(n/10^j))*10^j - (floor(n/10^j + 2/5)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
a(10^m-1) = 4*m*10^(m-1).
(this is total number of digits >= 6 occurring in all the numbers with <= m places).
G.f.: g(x) = (1/(1-x)^2)*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
An incorrect g.f. was deleted by N. J. A. Sloane, Sep 16 2009

A102680 Number of digits >= 7 in the decimal representations of all integers from 0 to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 30, 32, 34, 35, 36
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

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

Crossrefs

Partial sums of A102679.
Cf. A000120, A000788, A023416, A059015 (for base 2).

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(add(p(i),i=0..n), n=0..90);
    # Emeric Deutsch
  • Mathematica
    Accumulate[Table[Count[IntegerDigits[n],?(#>6&)],{n,0,90}]] (* _Harvey P. Dale, Sep 04 2018 *)

Formula

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

A102682 Number of digits >= 8 in the decimal representations of all integers from 0 to n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

The total number of digits >= 8 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]>=8 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(add(p(i),i=0..n), n=0..95); # Emeric Deutsch, Feb 23 2005

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 1/5)*(2n + 2 - (3/5 + floor(n/10^j + 1/5))*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)*A102681(n) + (1/2)*Sum_{j=1..m+1} ((-3/5*floor(n/10^j + 1/5) + floor(n/10^j))*10^j - (floor(n/10^j + 1/5)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
a(10^m-1) = 2*m*10^(m-1). (this is total number of digits >= 8 occurring in all the numbers with <= m places).
G.f.: g(x) = (1/(1-x)^2)*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
An incorrect g.f. was deleted by N. J. A. Sloane, Sep 16 2009

A136610 Number of odd digits in Fibonacci numbers.

Original entry on oeis.org

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

Views

Author

Parthasarathy Nambi, May 11 2008

Keywords

Examples

			1597 = Fibonacci(17) and has four odd digits, so a(17) = 4.
		

Crossrefs

Cf. A060384, A085855. - R. J. Mathar, Jul 08 2009

Programs

  • Maple
    nodss := proc(n) local dgs,d; dgs := convert(n,base,10) ; add( d mod 2, d=dgs) ; end: A136610 :=proc(n) nodss(combinat[fibonacci](n)) ; end: seq( A136610(n),n=0..80) ; # R. J. Mathar, Jul 08 2009
  • Mathematica
    a[n_]:=Total[Boole[OddQ/@IntegerDigits[Fibonacci[n]]]] (* James C. McMahon, May 06 2025 *)

Formula

a(n) = A196564(A000045(n)). - Michel Marcus, May 06 2025
a(n) = A060384(n) - A138468(n). - James C. McMahon, Jun 07 2025

Extensions

a(13) corrected and more terms added by R. J. Mathar, Jul 08 2009

A294601 Numbers with exactly one odd decimal digit.

Original entry on oeis.org

1, 3, 5, 7, 9, 10, 12, 14, 16, 18, 21, 23, 25, 27, 29, 30, 32, 34, 36, 38, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 61, 63, 65, 67, 69, 70, 72, 74, 76, 78, 81, 83, 85, 87, 89, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 120, 122, 124, 126, 128, 140, 142, 144, 146, 148, 160, 162, 164, 166, 168, 180
Offset: 1

Views

Author

Robert Israel, Nov 03 2017

Keywords

Comments

First differs from A054684 at position 56.
Numbers n such that A196564(n) = 1. - Felix Fröhlich, Nov 03 2017
There are (1+4*d)*5^(d-1) = 5*A081040(d+1) terms with d digits. - Robert Israel, Nov 06 2017

Crossrefs

Programs

  • Maple
    Res:= NULL:
    for t from 0 to 1000 do
      if nops(select(type,convert(t,base,10),odd))=1 then Res:= Res,t fi
    od:
    Res;
  • Mathematica
    Select[Range@ 200, Count[IntegerDigits@ #, ?OddQ] == 1 &] (* _Michael De Vlieger, Nov 03 2017 *)
  • PARI
    a196564(n) = #select(x->x%2, digits(n)) \\ after Michel Marcus
    is(n) = a196564(n)==1 \\ Felix Fröhlich, Nov 03 2017

A308005 A modified Sisyphus function: a(n) = concatenation of (number of odd digits in n) (number of digits in n) (number of even digits in n).

Original entry on oeis.org

11, 110, 11, 110, 11, 110, 11, 110, 11, 110, 121, 220, 121, 220, 121, 220, 121, 220, 121, 220, 22, 121, 22, 121, 22, 121, 22, 121, 22, 121, 121, 220, 121, 220, 121, 220, 121, 220, 121, 220, 22, 121, 22, 121, 22, 121, 22, 121, 22, 121, 121, 220, 121, 220, 121, 220, 121, 220, 121, 220, 22, 121, 22, 121, 22
Offset: 0

Views

Author

N. J. A. Sloane, May 12 2019

Keywords

Comments

If we start with n and repeatedly apply the map i -> a(i), it appears that we eventually reach one of the two fixed points 22 or 231, or enter the two-cycle (33, 220). Are there any other possibilities? This is in contrast to the behavior of the closely related A308003.

Examples

			11 has 2 digits, both odd, so a(11)=220.
12 has 2 digits, one even and one odd, so a(12)=121. Then a(121) = 231, a fixed point.
22 has two digits, both even, so 22 -> 22, another fixed point  (leading zeros are omitted).
		

References

  • M. E. Coppenbarger, Iterations of a modified Sisyphus function, Fib. Q., 56 (No. 2, 2018), 130-141.

Crossrefs

Programs

  • Maple
    Maple code based on R. J. Mathar's code for A171797:
    nevenDgs := proc(n) local a, d; a := 0 ; for d in convert(n, base, 10) do if type(d, 'even') then a :=a +1 ; end if; end do; a ; end proc:
    cat2 := proc(a, b) local ndigsb; ndigsb := max(ilog10(b)+1, 1) ; a*10^ndigsb+b ; end:
    catL := proc(L) local a, i; a := op(1, L) ; for i from 2 to nops(L) do a := cat2(a, op(i, L)) ; end do; a; end proc:
    A055642 := proc(n) max(1, ilog10(n)+1) ; end proc:
    A308005 := proc(n) local n1, n2 ; n1 := A055642(n) ; n2 := nevenDgs(n) ; catL([n1-n2, n1, n2]) ; end proc:
    [seq(A308005(n), n=0..80)];

A372585 Decimal expansion of (25/297)*Pi^2.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, May 06 2024

Keywords

Examples

			0.8307747812364779982183914983060733278883585359630295140...
		

Crossrefs

Programs

  • Mathematica
    First[RealDigits[25*Pi^2/297, 10, 100]]

Formula

Equals Sum_{k >= 1} A196564(k)*(1/k^2 - 1/(k+1)^2). See Sum 3 in Borwein and Borwein (1992), p. 622.

A372609 Decimal expansion of (10/9)*log(2).

Original entry on oeis.org

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

Views

Author

Paolo Xausa, May 07 2024

Keywords

Examples

			0.77016353395549478824136902384241840897277792706695028235631...
		

Crossrefs

Programs

Formula

Equals Sum_{k >= 1} A196564(k)/(k*(k + 1)). See eq. 2.6 and Sum 13 in Borwein and Borwein (1992), p. 626.
Equals (10/3)*A193535. - Hugo Pfoertner, May 07 2024

A272896 Difference between the number of odd and even digits in the decimal expansion of 2^n.

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, May 09 2016

Keywords

Comments

All vanishing entries are a(A272898(k)) = 0, k >= 1. - Wolfdieter Lang, May 24 2016

Examples

			2^10 = 1024, 2^11 = 2048, 2^12 = 4096, 2^13 = 8192.
So a(10) = 1 - 3 = -2, a(11) = 0 - 4 = -4, a(12) = 1 - 3 = -2, a(13) = 2 - 2 = 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[#, ?OddQ] - Count[#, ?EvenQ] &@ IntegerDigits[2^n], {n, 0, 100}] (* Michael De Vlieger, May 09 2016 *)
  • PARI
    a(n) = #select(x -> x%2, digits(2^n)) - #select(x -> !(x%2), digits(2^n));
    for(n=0, 78, print1(a(n),", ")) \\ Indranil Ghosh, Mar 13 2017
    
  • Python
    def A272896(n):
        x=y=0
        for i in str(2**n):
            if int(i)%2: x+=1
            else: y+=1
        return x - y # Indranil Ghosh, Mar 13 2017
  • Ruby
    def a(n)
      str = (2 ** n).to_s
      str.size - str.split('').map(&:to_i).select{|i| i % 2 == 0}.size * 2
    end
    (0..n).each{|i| p a(i)}
    

Formula

a(n) = A055254(n) - A055253(n) = A196564(2^n) - A196563(2^n). - Indranil Ghosh, Mar 13 2017

A307153 Sequence gives pair of terms giving the numbers of previous even digits and previous odd digits; a(0)=0.

Original entry on oeis.org

0, 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 11, 1, 14, 2, 15, 3, 18, 4, 19, 5, 22, 7, 23, 8, 24, 11, 26, 13, 28, 15, 30, 16, 32, 18, 34, 20, 35, 22, 37, 24, 39, 26, 41, 29, 43, 31, 46, 33, 48, 35, 50, 36, 52, 38, 54, 40, 55, 42, 57, 44, 59, 46, 61, 49, 63, 51, 66, 53, 68
Offset: 0

Views

Author

Paolo P. Lava, Mar 27 2019

Keywords

Comments

Up to n = 10^5, any integer generally appears 0, 1 or 2 times. Only 248, 428 and 806 appear 3 times and 1 appears 8 times.
Are there any numbers that appear 4, 5 or more times?
From Giovanni Resta, Apr 01 2019: (Start)
4 times: 15711971, 22606282, 22826268, ...
5 times: 42862042, 44464482, 82802082, ...
6 times: 224026426, 224028040, 224042062, ...
7 times: 242620882, 244220442, 260088080, ...
Therefore, the first terms that appear n times, with n >= 0, are 6, 0, 3, 248, 15711971, 42862042, 224026426, 242620882, 1, ... (End)

Examples

			a(1) = 1 because there is only one even digit before a(1): a(0) = 0.
a(2) = 1 because there is only one odd digit before a(2): a(1) = 1. Etc.
		

Crossrefs

Programs

  • Maple
    P:=proc(q) local a,b,d,d1,k,n,p,p1; a:=[0]: p:=1; d:=0;
    for n from 2 to q do a:=[op(a),p]: b:=[op(convert(p,base,10))]:
    p1:=0: d1:=0: for k from 1 to nops(b) do if b[k] mod 2=0
    then p1:=p1+1: else d1:=d1+1: fi; od; d:=d+d1: p:=p+p1:
    a:=[op(a),d]: b:=[op(convert(d,base,10))]: p1:=0: d1:=0:
    for k from 1 to nops(b) do if b[k] mod 2=0 then p1:=p1+1:
    else d1:=d1+1: fi; od; d:=d+d1: p:=p+p1: od; op(a); end: P(35);
  • PARI
    nb = [0,0]; for (n=1, 71, print1 (v=nb[1+n%2]", "); apply(d -> nb[1+d%2]++, if (v, digits(v), [0]))) \\ Rémy Sigrist, May 04 2019

Formula

a(2n+1) = total number of even digits from a(0) to a(2n).
a(2n+2) = total number of odd digits from a(0) to a(2n+1).
Previous Showing 41-50 of 53 results. Next