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-10 of 34 results. Next

A007954 Product of decimal digits of n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 0, 6, 12, 18, 24, 30, 36, 42, 48, 54, 0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 0, 9, 18, 27, 36, 45, 54, 63, 72, 81, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

R. Muller

Keywords

Comments

Moebius transform of A093811(n). a(n) = A093811(n) * A008683(n), where operation * denotes Dirichlet convolution, namely b(n) * c(n) = Sum_{d|n} b(d) * c(n/d). Simultaneously holds Dirichlet multiplication: a(n) * A000012(n) = A093811(n). - Jaroslav Krizek, Mar 22 2009
Apart from the 0's, all terms are in A002473. Further, for all m in A002473 there is some n such that a(n) = m, see A096867. - Charles R Greathouse IV, Sep 29 2013
a(n) = 0 asymptotically almost surely, namely for all n except for the set of numbers without digit '0'; this set is of density zero, since it is less and less probable to have no '0' as the number of digits of n grows. (See also A054054.) - M. F. Hasler, Oct 11 2015

Crossrefs

Cf. A031347 (different from A035930), A007953, A007602, A010888, A093811, A008683, A000012, A061076 (partial sums), A230099.
Cf. A051802 (ignoring zeros).

Programs

  • Haskell
    a007954 n | n < 10 = n
              | otherwise = m * a007954 n' where (n', m) = divMod n 10
    -- Reinhard Zumkeller, Oct 26 2012, Mar 14 2011
    
  • Magma
    [0] cat [&*Intseq(n): n in [1..110]]; // Vincenzo Librandi, Jan 03 2020
    
  • Maple
    A007954 := proc(n::integer)
        if n = 0 then
            0;
        else
            mul( d,d=convert(n,base,10)) ;
        end if;
    end proc: # R. J. Mathar, Oct 02 2019
  • Mathematica
    Array[Times @@ IntegerDigits@ # &, 108, 0] (* Robert G. Wilson v, Mar 15 2011 *)
  • PARI
    A007954(n)= { local(resul = n % 10); n \= 10; while( n > 0, resul *= n %10; n \= 10; ); return(resul); } \\ R. J. Mathar, May 23 2006, edited by M. F. Hasler, Apr 23 2015
    
  • PARI
    A007954(n)=prod(i=1,#n=Vecsmall(Str(n)),n[i]-48) \\ (...eval(Vec(...)),n[i]) is about 50% slower; (...digits(n)...) about 6% slower. \\ M. F. Hasler, Dec 06 2009
    
  • PARI
    a(n)=if(n,factorback(digits(n)),0) \\ Charles R Greathouse IV, Apr 14 2020
    
  • Python
    from math import prod
    def a(n): return prod(map(int, str(n)))
    print([a(n) for n in range(108)]) # Michael S. Branicky, Jan 16 2022
  • Scala
    (0 to 99).map(.toString.toCharArray.map( - 48).scanRight(1)( * ).head) // Alonso del Arte, Apr 14 2020
    

Formula

A000035(a(A014261(n))) = 1. - Reinhard Zumkeller, Nov 30 2007
a(n) = abs(A187844(n)). - Reinhard Zumkeller, Mar 14 2011
a(n) > 0 if and only if A054054(n) > 0. a(n) = d in {1, ..., 9} if n = (10^k - 1)/9 + (d - 1)*10^m = A002275(k) + (d - 1)*A011557(m) for some k > m >= 0. The statement holds with "if and only if" for d in {1, 2, 3, 5, 7}. For d = 4, 6, 8 or 9, one has a(n) = d if n = (10^k - 1)/9 + (a - 1)*10^m + (b - 1)*10^p with integers k > m > p >= 0 and a, b > 0 such that d = a*b. - M. F. Hasler, Oct 11 2015
From Robert Israel, May 17 2016: (Start)
G.f.: Sum_{n >= 0} Product_{j = 0..n} Sum_{k = 1..9} k*x^(k*10^j).
G.f. satisfies A(x) = (x + 2*x^2 + ... + 9*x^9)*(1 + A(x^10)). (End)
a(n) <= 9^(1 + log_10(n/9)). - Lucas A. Brown, Jun 22 2023

Extensions

Error in term 25 corrected, Nov 15 1995

A051801 Product of the nonzero digits of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 2, 4, 6, 8, 10, 12, 14, 16, 18, 3, 3, 6, 9, 12, 15, 18, 21, 24, 27, 4, 4, 8, 12, 16, 20, 24, 28, 32, 36, 5, 5, 10, 15, 20, 25, 30, 35, 40, 45, 6, 6, 12, 18, 24, 30, 36, 42, 48, 54, 7, 7, 14, 21
Offset: 0

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Examples

			a(0) = 1 since an empty product is 1 by convention. a(120) = 1*2 = 2.
		

Crossrefs

Basis for A051802.
See A338882 for similar sequences.
See also A007953 (digital sum).

Programs

  • Haskell
    a051801 0 = 1
    a051801 n = (a051801 n') * (m + 0 ^ m) where (n',m) = divMod n 10
    -- Reinhard Zumkeller, Nov 23 2011
    
  • Maple
    A051801 := proc(n) local d,j: d:=convert(n,base,10): return mul(`if`(d[j]=0,1,d[j]), j=1..nops(d)): end: seq(A051801(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    (Times@@Cases[IntegerDigits[#],Except[0]])&/@Range[0,80] (* Harvey P. Dale, Jun 20 2011 *)
    Table[Times@@(IntegerDigits[n]/.(0->1)),{n,0,80}] (* Harvey P. Dale, Apr 16 2023 *)
  • PARI
    a(n)=my(v=select(k->k>1,digits(n)));prod(i=1,#v,v[i]) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from operator import mul
    from functools import reduce
    def A051801(n):
        return reduce(mul, (int(d) for d in str(n) if d != '0')) if n > 0 else 1 # Chai Wah Wu, Aug 23 2014
    
  • Python
    from math import prod
    def a(n): return prod(int(d) for d in str(n) if d != '0')
    print([a(n) for n in range(74)]) # Michael S. Branicky, Jul 18 2021
    
  • Swift
    // Swift 5
    A051801(n): String(n).compactMap{$0.wholeNumberValue == 0 ? 1 : $0.wholeNumberValue}.reduce(1, *) // Egor Khmara, Jan 15 2021

Formula

a(n) = 1 if n=0, otherwise a(floor(n/10)) * (n mod 10 + 0^(n mod 10)). - Reinhard Zumkeller, Oct 13 2009
G.f. A(x) satisfies: A(x) = (1 + x + 2*x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 6*x^6 + 7*x^7 + 8*x^8 + 9*x^9) * A(x^10). - Ilya Gutkovskiy, Nov 14 2020
a(n) = A007954(A004719(n)). - Michel Marcus, Mar 07 2022

A086353 Fixed point if nonzero-digit product of n! is iterated.

Original entry on oeis.org

1, 2, 6, 8, 2, 4, 2, 8, 8, 8, 6, 1, 2, 8, 8, 8, 8, 6, 8, 8, 8, 8, 8, 2, 2, 8, 4, 8, 6, 2, 2, 6, 1, 8, 8, 8, 2, 2, 6, 8, 8, 8, 8, 8, 8, 6, 8, 6, 8, 8, 8, 6, 6, 1, 8, 8, 5, 8, 6, 6, 8, 6, 8, 2, 8, 8, 8, 6, 8, 2, 8, 8, 2, 6, 6, 8, 9, 6, 8, 8, 6, 2, 2, 8, 8, 8, 8, 4, 6, 8, 9, 6, 2, 2, 8, 2, 8, 8, 4, 4, 8, 8, 6, 2, 8
Offset: 1

Views

Author

Labos Elemer, Jul 21 2003

Keywords

Examples

			n=10, 10!=362880, iteration list={3628800,2304,24,8},a(10)=8.
		

Crossrefs

Programs

  • Mathematica
    prd[x_] := Apply[Times, DeleteCases[IntegerDigits[x], 0]] Table[FixedPoint[prd, w! ], {w, 1, 128}]

Formula

a(n)=A051802[n! ]=fixed-point of A051801[n! ]

A051808 Numbers with nonzero multiplicative digital root 6.

Original entry on oeis.org

6, 16, 23, 28, 32, 44, 47, 48, 60, 61, 68, 74, 82, 84, 86, 106, 116, 123, 128, 132, 144, 147, 148, 160, 161, 168, 174, 182, 184, 186, 203, 208, 213, 218, 224, 227, 228, 230, 231, 238, 242, 244, 246, 256, 264, 265, 267, 272, 276
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Programs

  • Mathematica
    nzdr6Q[n_]:=NestWhile[Times@@DeleteCases[IntegerDigits[#],0]&,n,#>9&]==6; Select[Range[ 300],nzdr6Q] (* Harvey P. Dale, Jul 20 2024 *)

Formula

A051802^-1(6)

A051803 Numbers with nonzero multiplicative digital root 1.

Original entry on oeis.org

0, 1, 10, 11, 25, 52, 55, 100, 101, 110, 111, 125, 152, 155, 205, 215, 250, 251, 455, 502, 505, 512, 515, 520, 521, 545, 550, 551, 554, 555, 888, 1000, 1001, 1010, 1011, 1025, 1052, 1055, 1100, 1101, 1110, 1111, 1125, 1152
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Formula

A051802^-1(1)

A051804 Numbers with nonzero multiplicative digital root 2.

Original entry on oeis.org

2, 12, 20, 21, 26, 34, 37, 43, 45, 54, 59, 62, 69, 73, 95, 96, 102, 112, 120, 121, 126, 134, 137, 143, 145, 154, 159, 162, 169, 173, 195, 196, 200, 201, 206, 210, 211, 216, 223, 225, 232, 239, 252, 260, 261, 268, 278, 279, 286
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Programs

  • Mathematica
    nzd[n_]:=Select[IntegerDigits[n],#!=0&]; dr2Q[m_]:=NestWhile[Times@@ nzd[#]&, m,#>9&]==2; Select[Range[300],dr2Q] (* Harvey P. Dale, Jul 01 2015 *)

Formula

A051802^-1(2)

A051805 Numbers with nonzero multiplicative digital root 3.

Original entry on oeis.org

3, 13, 30, 31, 56, 65, 78, 87, 103, 113, 130, 131, 156, 165, 178, 187, 235, 247, 253, 274, 300, 301, 310, 311, 325, 352, 427, 472, 506, 516, 523, 532, 560, 561, 605, 615, 650, 651, 708, 718, 724, 742, 780, 781, 807, 817, 870
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Formula

A051802^-1(3)

A051806 Numbers with nonzero multiplicative digital root 4.

Original entry on oeis.org

4, 14, 22, 27, 39, 40, 41, 58, 72, 85, 89, 93, 98, 104, 114, 122, 127, 139, 140, 141, 158, 172, 185, 189, 193, 198, 202, 207, 212, 217, 220, 221, 245, 249, 254, 266, 270, 271, 277, 294, 309, 319, 333, 338, 346, 364, 379, 383
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Programs

  • Mathematica
    mdr4Q[n_]:=NestWhile[Times@@(IntegerDigits[#]/.(0->1))&,n,#>9&]==4; Select[ Range[ 400],mdr4Q] (* Harvey P. Dale, Jul 02 2021 *)

Formula

A051802^-1(4)

A051807 Numbers with nonzero multiplicative digital root 5.

Original entry on oeis.org

5, 15, 35, 50, 51, 53, 57, 75, 105, 115, 135, 150, 151, 153, 157, 175, 255, 305, 315, 350, 351, 355, 357, 359, 375, 395, 500, 501, 503, 507, 510, 511, 513, 517, 525, 530, 531, 535, 537, 539, 552, 553, 556, 557, 565, 570, 571
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Formula

A051802^-1(5)

A051809 Numbers with nonzero multiplicative digital root 7.

Original entry on oeis.org

7, 17, 70, 71, 107, 117, 170, 171, 257, 275, 527, 572, 700, 701, 710, 711, 725, 752, 1007, 1017, 1070, 1071, 1107, 1117, 1170, 1171, 1257, 1275, 1527, 1572, 1700, 1701, 1710, 1711, 1725, 1752, 2057, 2075, 2157, 2175
Offset: 1

Views

Author

Dan Hoey, Dec 09 1999

Keywords

Crossrefs

Part of histogram of A051802.

Programs

  • Mathematica
    Select[Range[2500],NestWhile[Times@@(IntegerDigits[#]/.(0->1))&,#,#>9&] == 7&] (* Harvey P. Dale, Jan 18 2019 *)

Formula

A051802^-1(7)
Showing 1-10 of 34 results. Next