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 21-30 of 41 results. Next

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

A189398 a(n) = 2^d(1) * 3^d(2) * ... * prime(k)^d(k), where d(1)d(2)...d(k) is the decimal representation of n.

Original entry on oeis.org

2, 4, 8, 16, 32, 64, 128, 256, 512, 2, 6, 18, 54, 162, 486, 1458, 4374, 13122, 39366, 4, 12, 36, 108, 324, 972, 2916, 8748, 26244, 78732, 8, 24, 72, 216, 648, 1944, 5832, 17496, 52488, 157464, 16, 48, 144, 432, 1296, 3888, 11664, 34992, 104976, 314928, 32
Offset: 1

Views

Author

Reinhard Zumkeller, May 03 2011

Keywords

Comments

Not the same as A061509: a(n) = A061509(n) for n <= 100; a(101)=2^1*3^0*5^1=10 <> A061509(101)=2^1*3^1=6;
a(A052382(n)) = A000079(A000030(a052382(n))) = A061509(A052382(n));
a(A002275(n)) = A002110(n): a(n-th rep-unit) = n-th primorial;
a(n*A011557(k)) = a(n): trailing zeros don't matter;
A001221(a(n)) = A055640(n): number of distinct prime factors of a(n) = number of nonzero digits of n;
A001222(a(n)) = A007953(n): number of all prime factors of a(n) = sum of digits of n;
a(81312000) = 2^8*3^1*5^3*7^1*11^2*13^0*17^0*19^0 = 81312000, the smallest fixed point, is called the Meertens number.

Crossrefs

Cf. A000040.

Programs

  • Haskell
    import Data.Char (digitToInt)
    import Data.List (findIndices)
    a189398 n = product $ zipWith (^) a000040_list (map digitToInt $ show n)
    -- Two computations of the Meertens number: the first is brute force,
    meertens = map succ $ findIndices (\x -> a189398 x == x) [1..]
    -- ... and the second is more efficient, from Bird reference, page 87:
    meertens' k = [n | (n,g) <- candidates (0,1), n == g] where
      candidates        = concat . map (search pps) . tail . labels ps
      ps : pps          = map (\p -> iterate (p *) 1) $ take k a000040_list
      search [] x       = [x]
      search (ps:pps) x = x : concat (map (search pps) (labels ps x))
      labels ps (n,g)   = zip (map (10*n +) [0..9]) (chop $ map (g *) ps)
      chop              = takeWhile (< 10^k)
    -- Time and space required, GHC interpreted, Mac OS X, 2.66 GHz:
    -- for >head meertens: (466.87 secs, 254780027728 bytes);
    -- for >meertens' 8:   (  0.28 secs,     62027124 bytes).
    
  • Maple
    a:= n-> `if`(n=0, 1, ithprime(length(n))^irem(n, 10, 'm') *a(m)):
    seq(a(n), n=1..110);  # Alois P. Heinz, May 04 2011
  • Mathematica
    a[n_] := (p = Prime[Range[Length[d = IntegerDigits[n]]]]; Times @@ (p^d)); Array[a, 50] (* Jean-François Alcover, Jan 09 2016 *)
  • PARI
    a(n)=my(d=digits(n),p=primes(#d)); prod(i=1,#d,p[i]^d[i]) \\ Charles R Greathouse IV, Aug 19 2014
    
  • Python
    from sympy import prime
    from operator import mul
    from functools import reduce
    def A189398(n):
        return reduce(mul, (prime(i)**int(d) for i,d in enumerate(str(n),start=1)))
    # Chai Wah Wu, Aug 31 2014
    
  • Python
    # implementation using recursion
    from sympy import prime
    def _A189398(n):
        nlen = len(n)
        return _A189398(n[:-1])*prime(nlen)**int(n[-1]) if nlen > 1 else 2**int(n)
    def A189398(n):
        return _A189398(str(n))
    # Chai Wah Wu, Aug 31 2014

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

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

A356861 a(n) is the number of nonzero digits in the product of the first n numbers not divisible by 5.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 3, 5, 6, 5, 8, 10, 10, 11, 12, 15, 14, 16, 19, 20, 20, 19, 23, 24, 25, 27, 24, 27, 31, 32, 32, 34, 38, 36, 40, 41, 40, 44, 47, 43, 50, 52, 53, 50, 51, 56, 61, 60, 58, 63, 61, 64, 67, 72, 67, 70, 72, 76, 72, 78, 84, 83, 85, 84, 90, 91, 91, 90
Offset: 0

Views

Author

Stefano Spezia, Sep 01 2022

Keywords

Crossrefs

Cf. A356859 (number of zero digits), A356860 (number of digits).

Programs

  • Mathematica
    Table[Length[Select[IntegerDigits[Product[Floor[(5i-1)/4], {i,n}]], Positive]], {n,0,68}]
  • Python
    from math import prod
    def a(n): s = str(prod((5*k-1)//4 for k in range(1, n+1))); return len(s) - s.count("0")
    print([a(n) for n in range(69)]) # Michael S. Branicky, Sep 01 2022

Formula

a(n) = A055640(A356858(n)).

A190311 Number of nonzero digits when writing n in base where place values are positive cubes, cf. A000433.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, May 08 2011

Keywords

Comments

For n > 0: a(A000578(n)) = 1; for n > 1: a(A001093(n)) = 2;
a(n) <= A048766(n).

Crossrefs

Programs

  • Haskell
    a190311 n = g n $ reverse $ takeWhile (<= n) $ tail a000578_list where
      g _ []                 = 0
      g m (x:xs) | x > m     = g m xs
                 | otherwise = signum m' + g r xs where (m',r) = divMod m x

A358993 a(n) is the number of nonzero digits in the product of the first n odd numbers not divisible by 5.

Original entry on oeis.org

1, 1, 1, 2, 3, 3, 4, 6, 7, 9, 10, 12, 12, 13, 15, 18, 17, 20, 21, 22, 24, 25, 27, 29, 31, 32, 34, 34, 35, 40, 40, 45, 45, 45, 46, 47, 46, 52, 55, 55, 59, 58, 60, 59, 66, 66, 65, 69, 70, 74, 80, 79, 84, 75, 83, 90, 89, 87, 92, 95, 91, 95, 104, 98, 102, 110, 107
Offset: 0

Views

Author

Stefano Spezia, Dec 09 2022

Keywords

Crossrefs

Cf. A358991 (number of zero digits), A358992 (number of digits).

Programs

  • Mathematica
    Table[Length[Select[IntegerDigits[Product[2i+2Floor[(i-3)/4]+1, {i, n}]], Positive]], {n, 0, 66}]

Formula

a(n) = A055640(A358990(n)).

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

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 26, 28, 30, 32, 34, 35, 36, 38, 40, 42, 44, 46, 48, 50, 52, 53, 54, 56, 58, 60, 62, 64, 66, 68, 70, 71, 72, 74, 76, 78, 80, 82, 84, 86, 88, 89, 90, 92, 94, 96, 98, 100, 102, 104, 106, 107, 108
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

The total number of digits >= 2 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]>=2 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(add(p(i),i=0..n), n=0..77); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Accumulate[Table[Count[IntegerDigits[n],?(#>1&)],{n,0,80}]] (* _Harvey P. Dale, Apr 17 2014 *)

Formula

From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + 0.8)*(2n + 2 + ((3/5) - floor(n/10^j + 4/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)* A102669(n) + (1/2)*Sum_{j=1..m+1} (((3/5)*floor(n/10^j + 4/5) + floor(n/10^j))*10^j - (floor(n/10^j + 4/5)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)).
a(10^m - 1) = 8*m*10^(m-1).
(This is the total number of digits >= 2 occurring in all the numbers with <= m places.)
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(2*10^j) - x^(10*10^j))/(1 - x^10^(j+1)).
General formulas for the total number of digits >= d in the decimal representations of all integers from 0 to n.
a(n) = (1/2)*Sum_{j=1..m+1} (floor(n/10^j + (10-d)/10) *(2n + 2 + ((5-d)/5 - floor(n/10^j + (10-d)/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)*F(n,d) + (1/2)*Sum_{j=1..m+1} ((((5-d)/5)*floor(n/10^j + (10-d)/10) + floor(n/10^j))*10^j - (floor(n/10^j + (10-d)/10)^2 - floor(n/10^j)^2)*10^j), where m = floor(log_10(n)) and F(n,d) = number of digits >= d in the decimal representation of n.
a(10^m - 1) = (10-d)*m*10^(m-1).
(This is the total number of digits >= d occurring in all the numbers with <= m places.)
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(d*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A102671 Number of digits >= 3 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007089 (numbers in base 3). - Bernard Schott, Nov 20 2022

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]>=3 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(p(n),n=0..116); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Table[Count[IntegerDigits[n],?(#>2&)],{n,0,110}] (* _Harvey P. Dale, Mar 07 2012 *)

Formula

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

Extensions

More terms from Emeric Deutsch, Feb 23 2005

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

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 7, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 28, 30, 32, 34, 36, 38, 39, 40, 41, 43, 45, 47, 49, 51, 53, 55, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 73, 74, 75, 77, 79, 81, 83, 85, 87, 89, 90, 91, 92, 94
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

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

Crossrefs

Partial sums of A102671.
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]>=3 then ct:=ct+1 else ct:=ct fi od: ct: end: seq(add(p(i),i=0..n), n=0..80); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    Accumulate[Table[Count[IntegerDigits[n],?(#>2&)],{n,0,80}]] (* _Harvey P. Dale, Nov 23 2014 *)

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)*A102671(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) = 7*m*10^(m-1).
(This is the total number of digits >= 3 occurring in all the numbers with <= m places.)
G.f.: g(x) = (1/(1-x)^2)*Sum_{j>=0} (x^(3*10^j) - x^(10*10^j))/(1 - x^10^(j+1)). (End)

Extensions

More terms from Emeric Deutsch, Feb 23 2005
Previous Showing 21-30 of 41 results. Next