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

A117804 Natural position of n in the string 12345678910111213....

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 1

Views

Author

Warut Roonguthai, Jul 23 2007

Keywords

Comments

The number of digits necessary to write down all the numbers 0, 1, 2, ..., n-1. Thus, the partial sums of A055642 are given by a(n+1). - Hieronymus Fischer, Jun 08 2012
From Daniel Forgues, Mar 21 2013: (Start)
From n = 10^0 + 1 to 10^1: a(n) - a(n-1) = 1 (9 * 10^0 terms);
From n = 10^1 + 1 to 10^2: a(n) - a(n-1) = 2 (9 * 10^1 terms);
From n = 10^2 + 1 to 10^3: a(n) - a(n-1) = 3 (9 * 10^2 terms);
...
From n = 10^k + 1 to 10^(k+1): a(n) - a(n-1) = k+1 (9 * 10^k terms). (End)
By the "number of digits" definition, a(n) = 1 + A058183(n-1) for n > 1. - David Fifield, Jun 02 2019

Examples

			12 begins at the 14th place in 12345678910111213... (we are ignoring "early bird" occurrences here, cf. A116700), so a(12) = 14.
From _Daniel Forgues_, Mar 21 2013: (Start)
a(10^1) = 10. (1*10^1 - 0)
a(10^2) = 190. (2*10^2 - 10)
a(10^3) = 2890. (3*10^3 - 110)
a(10^4) = 38890. (4*10^4 - 1110)
a(10^5) = 488890. (5*10^5 - 11110)
a(10^6) = 5888890. (6*10^6 - 111110)
...
a(10^k) = k*10^k - R_k + 1, R_k := k-th repunit (cf. A002275)
(the number of digits necessary to write down the numbers 0..10^k-1). (End)
		

Crossrefs

Formula

a(n) = d*n + 1 - (10^d - 1)/9 where d is the number of decimal digits in n, i.e., d = floor(log_10(n)) + 1.
From Hieronymus Fischer, Jun 08 2012: (Start)
a(n) = Sum_{j=0..n-1} A055642(j).
a(n) = 1 + A055642(n-1)*n - (10^A055642(n-1)-1)/9.
a(n) = 1 + A055642(n)*n - (10^A055642(n)-1)/9.
a(10^n) = (9*n-1)*(10^n-1)/9 + n + 1. (This is the total number of digits necessary to write down all the numbers with <= n places.)
G.f.: g(x) = x/(1-x) + (x/(1-x)^2)*Sum_{j>=0} x^10^j; corrected by Ilya Gutkovskiy, Jan 09 2017 (End)

A102669 Number of digits >= 2 in decimal representation of n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Comments

a(n) = 0 iff n is in A007088 (numbers in base 2). - Bernard Schott, Feb 19 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]>=2 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[DigitCount@ n, {2, 9}], {n, 0, 104}] (* Michael De Vlieger, Aug 17 2017 *)

Formula

Contribution from Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 4/5) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(2*10^j) - x^(10*10^j))/(1 - x^10^(j+1)).
General formulas for the number of digits >= d in the decimal representations of n, where 1 <= d <= 9:
a(n) = Sum_{j=1..m+1} (floor(n/10^j + (10-d)/10) - floor(n/10^j)), where m = floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*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

A160094 a(n) = 1 + A122840(n).

Original entry on oeis.org

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

Views

Author

Anonymous, May 01 2009

Keywords

Comments

a(n) is the Levenshtein distance from the decimal expansion of n - 1 to the decimal expansion of n. For example, to convert "9" to "10", substitute "0" for "9" and insert "1". Since two such operations are required, a(10) = 2. See the analogous A091090 (binary expansion) and A115777 (full definition). - Rick L. Shepherd, Mar 25 2015

Examples

			a(160) = 2 because the last nonzero digit of 160 (counting from left to right), when 160 is written in base 10, is 6, and that 6 occurs 2 digits from the right in 160.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[Range[150]]+1 (* Harvey P. Dale, Feb 06 2015 *)

Formula

From Hieronymus Fischer, Jun 08 2012: (Start)
With m = floor(log_10(n)), frac(x) = x-floor(x):
a(n) = Sum_{j=0..m} (1 - ceiling(frac(n/10^j))).
a(n) = m + 1 + Sum_{j=1..m} (floor(-frac(n/10^j))).
a(n) = 1 + A054899(n) - A054899(n-1).
G.f.: g(x) = (x/(1-x)) + Sum_{j>0} x^10^j/(1-x^10^j). (End)
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 10/9. - Amiram Eldar, Jul 10 2023
a(n) = A122840(10*n). - R. J. Mathar, Jun 28 2025

Extensions

Name simplified by Jon E. Schoenfield, Feb 26 2014

A160093 Number of digits in n, excluding any trailing zeros.

Original entry on oeis.org

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

Views

Author

Anonymous, May 01 2009

Keywords

Examples

			a(1060000) = 3 because discarding the trailing zeros from 1060000 leaves 106, which is a 3-digit number.
		

Crossrefs

Programs

  • Mathematica
    lnzd[n_]:=Module[{spl=Last[Split[IntegerDigits[n]]]},If[!MemberQ[ spl,0], IntegerLength[n], IntegerLength[n]-Length[spl]]]; Array[lnzd,110] (* Harvey P. Dale, Jun 05 2013 *)
    Table[IntegerLength[n] - IntegerExponent[n, 10], {n, 100}] (* Amiram Eldar, Sep 14 2020 *)
  • PARI
    a(n)=if(n==0,1,#digits(n/10^valuation(n,10))) \\ Joerg Arndt, Jan 11 2017
    
  • PARI
    a(n)=logint(n,10)+1-valuation(n,10) \\ Charles R Greathouse IV, Jan 12 2017
  • Python
    def A160093(n):
         return len(str(int(str(n)[::-1]))) # Indranil Ghosh, Jan 11 2017
    

Formula

From Hieronymus Fischer, Jun 08 2012: (Start)
With m = floor(log_10(n)), frac(x) = x-floor(x):
a(n) = 1 + Sum_{j=0..m} ceiling(frac(n/10^j)).
a(n) = 1 - Sum_{j=1..m} (floor(-frac(n/10^j))).
a(n)= A055642(n) + A054899(n-1) - A054899(n).
G.f.: (x/(1-x)) + (1/(1-x))*Sum_{j>0} x^(10^j+1)*(1 - x^(10^j-1))/(1-x^10^j). (End)
a(n) = A055642(A004086(n)). - Indranil Ghosh, Jan 11 2017
a(n) = A055642(A004151(n)). - Amiram Eldar, Sep 14 2020

Extensions

Simpler definition and changed example from Jon E. Schoenfield, Feb 15 2014

A037124 Numbers that contain only one nonzero digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

Starting with 1: next greater number not containing the highest digit (see also A098395). - Reinhard Zumkeller, Oct 31 2004
A061116 is a subsequence. - Reinhard Zumkeller, Mar 26 2008
Subsequence of A193460. - Reinhard Zumkeller, Jul 26 2011

Crossrefs

Programs

  • Haskell
    a037124 n = a037124_list !! (n-1)
    a037124_list = f [1..9] where f (x:xs) = x : f (xs ++ [10*x])
    -- Reinhard Zumkeller, May 03 2011
    
  • Magma
    [((n mod 9)+1) * 10^Floor(n/9): n in [0..50]]; // Vincenzo Librandi, Nov 11 2014
    
  • Mathematica
    Table[(10^Floor[(n - 1)/9])*(n - 9*Floor[(n - 1)/9]), {n, 1, 50}] (* José de Jesús Camacho Medina, Nov 10 2014 *)
    Array[(Mod[#, 9] + 1) * 10^Floor[#/9] &, 50, 0] (* Paolo Xausa, Oct 10 2024 *)
  • PARI
    is(n)=n>0 && n/10^valuation(n,10)<10 \\ Charles R Greathouse IV, Jan 29 2017
    
  • Python
    def A037124(n):
        a, b = divmod(n-1,9)
        return 10**a*(b+1) # Chai Wah Wu, Oct 16 2024

Formula

a(n) = (((n - 1) mod 9) + 1) * 10^floor((n - 1)/9). E.g., a(40) = ((39 mod 9) + 1) * 10^floor(39/9) = (3 + 1) * 10^4 = 40000. - Carl R. White, Jan 08 2004
a(n) = A051885(n-1) + 1. - Reinhard Zumkeller, Jan 03 2008, Jul 10 2011
A138707(a(n)) = A000005(a(n)). - Reinhard Zumkeller, Mar 26 2008
From Reinhard Zumkeller, May 26 2008: (Start)
a(n+1) = a(n) + a(n - n mod 9).
a(n) = A140740(n+9, 9). (End)
A055640(a(n)) = 1. - Reinhard Zumkeller, May 03 2011
A193459(a(n)) = A000005(a(n)). - Reinhard Zumkeller, Jul 26 2011
Sum_{n>0} 1/a(n)^s = (10^s)*(zeta(s) - zeta(s,10))/(10^s-1), with (s>1). - Enrique Pérez Herrero, Feb 05 2013
a(n) = (10^floor((n - 1)/9))*(n - 9*floor((n - 1)/9)). - José de Jesús Camacho Medina, Nov 10 2014
From Chai Wah Wu, May 28 2016: (Start)
a(n) = 10*a(n-9).
G.f.: x*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(1 - 10*x^9). (End)
a(n) ≍ 1.2589...^n, where the constant is A011279. (f ≍ g when f << g and g << f, that is, there are absolute constants c,C > 0 such that for all large n, |f(n)| <= c|g(n)| and |g(n)| <= C|f(n)|.) - Charles R Greathouse IV, Mar 11 2021
Sum_{n>=1} 1/a(n) = 7129/2268. - Amiram Eldar, Jan 21 2022

A102683 Number of digits 9 in decimal representation of n.

Original entry on oeis.org

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, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0
Offset: 0

Views

Author

N. J. A. Sloane, Feb 03 2005

Keywords

Crossrefs

Programs

  • Haskell
    a102683 =  length . filter (== '9') . show
    -- Reinhard Zumkeller, Dec 29 2011
  • 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(p(n),n=0..116); # Emeric Deutsch, Feb 23 2005
  • Mathematica
    a[n_] := DigitCount[n, 10, 9]; Array[a, 100, 0] (* Amiram Eldar, Jul 24 2023 *)

Formula

a(A007095(n)) = 0; a(A011539(n)) > 0. - Reinhard Zumkeller, Dec 29 2011
From Hieronymus Fischer, Jun 10 2012: (Start)
a(n) = Sum_{j=1..m+1} (floor(n/10^j + 1/10) - floor(n/10^j)), where m=floor(log_10(n)).
G.f.: g(x) = (1/(1-x))*Sum_{j>=0} (x^(9*10^j) - x^(10*10^j))/(1-x^10^(j+1)). (End)
a(A235049(n)) = 0. - Reinhard Zumkeller, Apr 16 2014

Extensions

More terms from Emeric Deutsch, Feb 23 2005

A193238 Number of prime digits in decimal representation of n.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 19 2011

Keywords

Crossrefs

Programs

Formula

a(A084984(n))=0; a(A118950(n))>0; a(A092620(n))=1; a(A092624(n))=2; a(A092625(n))=3; a(A046034(n))=A055642(A046034(n));
a(A000040(n)) = A109066(n).
From Hieronymus Fischer, May 30 2012: (Start)
a(n) = sum_{j=1..m+1} (floor(n/10^j+0.3) + floor(n/10^j+0.5) + floor(n/10^j+0.8) - floor(n/10^j+0.2) - floor(n/10^j+0.4) - floor(n/10^j+0.6)), where m=floor(log_10(n)), n>0.
a(10n+k) = a(n) + a(k), 0<=k<10, n>=0.
a(n) = a(floor(n/10)) + a(n mod 10), n>=0.
a(n) = sum_{j=0..m} a(floor(n/10^j) mod 10), n>=0.
a(A046034(n)) = floor(log_4(3n+1)), n>0.
a(A211681(n)) = 1 + floor((n-1)/4), n>0.
G.f.: g(x) = (1/(1-x))*sum_{j>=0} (x^(2*10^j) + x^(3*10^j)+ x^(5*10^j) + x^(7*10^j))*(1-x^10^j)/(1-x^10^(j+1)).
Also: g(x) = (1/(1-x))*sum_{j>=0} (x^(2*10^j)- x^(4*10^j)+ x^(5*10^j)- x^(6*10^j)+ x^(7*10^j)- x^(8*10^j))/(1-x^10^(j+1)). (End)

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

A061509 Write n in decimal, omit 0's, replace the k-th digit d[k] with the k-th prime, raised to d[k]-th power and multiply.

Original entry on oeis.org

1, 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
Offset: 0

Views

Author

Amarnath Murthy, May 06 2001

Keywords

Comments

Not the same as A189398: see formula.

Examples

			a(4) = 2^4 = 16, a(123) = (2^1)*(3^2)*(5^3) = 2250.
For n = 0, the list of nonzero digits is empty, and the empty product equals 1.
		

Crossrefs

Programs

  • Haskell
    a061509 n = product $ zipWith (^)
      a000040_list (map digitToInt $ filter (/= '0') $ show n)
    -- Reinhard Zumkeller, May 03 2011
    
  • Mathematica
    A061509[n_] := If[n == 0, 1, Times @@ (Prime[Range[Length[#]]]^#) & [DeleteCases[IntegerDigits[n], 0]]];
    Array[A061509, 100, 0] (* Paolo Xausa, Nov 26 2024 *)
  • PARI
    A061509(n)=prod(k=1,#n=select(t->t,digits(n)),prime(k)^n[k]) \\ M. F. Hasler, Aug 16 2014

Formula

a(n) = a(n*10^k). a((10^k-1)/9) = primorial(k) = A002110(k).
a(n) = A189398(n) for n <= 100; a(101)=2^1*3^1 = 6 <> A189398(101) = 2^1*3^0*5^1 = 10; a(A052382(n)) = A189398(A052382(n)); a(n) = A000079(A000030(n)) if n has only one nonzero digit; A001221(a(n)) = A055640(n); A001222(a(n)) = A007953(n). - Reinhard Zumkeller, May 03 2011
If n=d[1]d[2]...d[m] in decimal (0M. F. Hasler, Aug 16 2014
A007814(a(n)) = A000030(n). - M. F. Hasler, Aug 18 2014

Extensions

Corrected and extended by Matthew Conroy, May 13 2001
Offset corrected by Reinhard Zumkeller, May 03 2011
Definition corrected by M. F. Hasler, Aug 16 2014
Extended to a(0) = 1 by M. F. Hasler, Oct 12 2018
Previous Showing 11-20 of 41 results. Next