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

A381965 Irregular triangle read by rows, where row n lists the iterates of f(x), starting at x = n until f(x) < 10, where f(x) is the multiplicative digital root of x (A031347).

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Mar 11 2025

Keywords

Examples

			Triangle begins:
  n\k|  0   1   2
  ---------------
   0 |  0;
   1 |  1;
   2 |  2;
   3 |  3;
   4 |  4;
   5 |  5;
   6 |  6;
   7 |  7;
   8 |  8;
   9 |  9;
  10 | 10,  0;
  11 | 11,  1;
  12 | 12,  2;
  13 | 13,  3;
  14 | 14,  4;
  15 | 15,  5;
  16 | 16,  6;
  17 | 17,  7;
  18 | 18,  8;
  19 | 19,  9;
  20 | 20,  0;
  21 | 21,  2;
  22 | 22,  4;
  23 | 23,  6;
  24 | 24,  8;
  25 | 25, 10,  0;
  ...
		

Crossrefs

Cf. A031346 (row lengths - 1), A031347 (right border), A381966 (row sums).

Programs

  • Mathematica
    A381965row[n_] := NestWhileList[Times @@ IntegerDigits[#] &, n, # >= 10 &];
    Array[A381965row, 50, 0]

Formula

T(n,0) = n and, for k = 1..A031346(n), T(n,k) = A031347(T(n,k-1)).

A357131 Numbers m such that A010888(m) = A031347(m) = A031286(m) = A031346(m); only the least of the anagrams are considered.

Original entry on oeis.org

0, 137, 11126, 111134, 111278, 1111223, 11111447, 111112247, 1111122227, 111111111137, 11111111111126, 111111111111134, 1111111111111223, 111111111111111111111111111111111111111111111111111111111111111111111111111111111111278
Offset: 1

Views

Author

Mohammed Yaseen, Sep 14 2022

Keywords

Comments

The infinite sequence {(R_1)37, (R_91)37, (R_991)37, (R_9991)37, (R_99991)37, ...} is a subsequence, where R_k is the repunit of length k. Hence this sequence is infinite.
a(14) <= (R_84)278.
Some additional terms < 10^100: (R_84)278, (R_86)447, (R_86)2247, (R_86)22227, (R_91)37, (R_93)26, (R_94)34, (R_93)278, (R_94)223, (R_95)447, (R_95)2247, (R_95)22227.
If a term k > 0 then k cannot contain a digit 0 as if it does A031347(k) = 0 while A031346(k) = 1, contradicting equality. - David A. Corneth, Sep 15 2022
a(14) > 10^50. - Michael S. Branicky, Sep 16 2022
From Michael S. Branicky, Sep 17 2022: (Start)
(R_{10^k})37 and (R_{2*10^k - 10})37 also form infinite subsequences for k >= 0.
Indeed, terms of the form (R_k)e form infinite subsequences for each e in 26, 34, 37, 223, 278, 447, 2247, 22227 for k such that A007953(k + A007953(e)) = 2.
a(2)-a(14) and all terms of the forms above have 2 = A010888(m) = A031347(m) = A031286(m) = A031346(m).
(R_{t})277 where t+2+7+7 = 4 followed by 55555 9's is a term with 4 = A010888(m) = A031347(m) = A031286(m) = A031346(m).
Likewise, there exists a term of the form (R_{t})5579 with 5 = A010888(m) = A031347(m) = A031286(m) = A031346(m), where t+26 is part of the additive persistence chain ending ..., 5999999, 59, 14, 5. Likewise for 888899 and 6, and so on.
However, there are no terms with A010888(m) = A031347(m) = A031286(m) = A031346(m) = 1 or 3. (End)

Examples

			137 is in the sequence as A010888(137) = 137 mod 9 = 2, A031347(137) = 2 via 1*3*7 = 21 -> 2*1 = 2 < 10, A031286(137) = 2 via 1+3+7 = 11 -> 1+1 = 2 so two steps, A031346(137) = 2 via 1*3*7 = 21 -> 2*1 = 2 so two steps. As all these outcomes are 2, 137 is a term. - _David A. Corneth_, Sep 15 2022
		

Crossrefs

Subsequence of A179239.

Extensions

a(8)-a(13) from Pontus von Brömssen, Sep 14 2022
a(14) confirmed by Michael S. Branicky, Sep 17 2022

A007953 Digital sum (i.e., sum of digits) of n; also called digsum(n).

Original entry on oeis.org

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

Views

Author

R. Muller

Keywords

Comments

Do not confuse with the digital root of n, A010888 (first term that differs is a(19)).
Also the fixed point of the morphism 0 -> {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}, 1 -> {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 2 -> {2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, etc. - Robert G. Wilson v, Jul 27 2006
For n < 100 equal to (floor(n/10) + n mod 10) = A076314(n). - Hieronymus Fischer, Jun 17 2007
It appears that a(n) is the position of 10*n in the ordered set of numbers obtained by inserting/placing one digit anywhere in the digits of n (except a zero before 1st digit). For instance, for n=2, the resulting set is (12, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 42, 52, 62, 72, 82, 92) where 20 is at position 2, so a(2) = 2. - Michel Marcus, Aug 01 2022
Also the total number of beads required to represent n on a Russian abacus (schoty). - P. Christopher Staecker, Mar 31 2023
a(n) / a(2n) <= 5 with equality iff n is in A169964, while a(n) / a(3n) is unbounded, since if n = (10^k + 2)/3, then a(n) = 3*k+1, a(3n) = 3, so a(n) / a(3n) = k + 1/3 -> oo when k->oo (see Diophante link). - Bernard Schott, Apr 29 2023
Also the number of symbols needed to write number n in Egyptian numerals for n < 10^7. - Wojciech Graj, Jul 10 2025

Examples

			a(123) = 1 + 2 + 3 = 6, a(9875) = 9 + 8 + 7 + 5 = 29.
		

Crossrefs

Programs

  • Haskell
    a007953 n | n < 10 = n
              | otherwise = a007953 n' + r where (n',r) = divMod n 10
    -- Reinhard Zumkeller, Nov 04 2011, Mar 19 2011
    
  • Magma
    [ &+Intseq(n): n in [0..87] ];  // Bruno Berselli, May 26 2011
    
  • Maple
    A007953 := proc(n) add(d,d=convert(n,base,10)) ; end proc: # R. J. Mathar, Mar 17 2011
  • Mathematica
    Table[Sum[DigitCount[n][[i]] * i, {i, 9}], {n, 50}] (* Stefan Steinerberger, Mar 24 2006 *)
    Table[Plus @@ IntegerDigits @ n, {n, 0, 87}] (* or *)
    Nest[Flatten[# /. a_Integer -> Array[a + # &, 10, 0]] &, {0}, 2] (* Robert G. Wilson v, Jul 27 2006 *)
    Total/@IntegerDigits[Range[0,90]] (* Harvey P. Dale, May 10 2016 *)
    DigitSum[Range[0, 100]] (* Requires v. 14 *) (* Paolo Xausa, May 17 2024 *)
  • PARI
    a(n)=if(n<1, 0, if(n%10, a(n-1)+1, a(n/10))) \\ Recursive, very inefficient. A more efficient recursive variant: a(n)=if(n>9, n=divrem(n, 10); n[2]+a(n[1]), n)
    
  • PARI
    a(n, b=10)={my(s=(n=divrem(n, b))[2]); while(n[1]>=b, s+=(n=divrem(n[1], b))[2]); s+n[1]} \\ M. F. Hasler, Mar 22 2011
    
  • PARI
    a(n)=sum(i=1, #n=digits(n), n[i]) \\ Twice as fast. Not so nice but faster:
    
  • PARI
    a(n)=sum(i=1,#n=Vecsmall(Str(n)),n[i])-48*#n \\ M. F. Hasler, May 10 2015
    /* Since PARI 2.7, one can also use: a(n)=vecsum(digits(n)), or better: A007953=sumdigits. [Edited and commented by M. F. Hasler, Nov 09 2018] */
    
  • PARI
    a(n) = sumdigits(n); \\ Altug Alkan, Apr 19 2018
    
  • Python
    def A007953(n):
        return sum(int(d) for d in str(n)) # Chai Wah Wu, Sep 03 2014
    
  • Python
    def a(n): return sum(map(int, str(n))) # Michael S. Branicky, May 22 2021
    
  • Scala
    (0 to 99).map(.toString.map(.toInt - 48).sum) // Alonso del Arte, Sep 15 2019
    
  • Smalltalk
    "Recursive version for general bases. Set base = 10 for this sequence."
    digitalSum: base
    | s |
    base = 1 ifTrue: [^self].
    (s := self // base) > 0
      ifTrue: [^(s digitalSum: base) + self - (s * base)]
      ifFalse: [^self]
    "by Hieronymus Fischer, Mar 24 2014"
    
  • Swift
    A007953(n): String(n).compactMap{$0.wholeNumberValue}.reduce(0, +) // Egor Khmara, Jun 15 2021

Formula

a(A051885(n)) = n.
a(n) <= 9(log_10(n)+1). - Stefan Steinerberger, Mar 24 2006
From Benoit Cloitre, Dec 19 2002: (Start)
a(0) = 0, a(10n+i) = a(n) + i for 0 <= i <= 9.
a(n) = n - 9*(Sum_{k > 0} floor(n/10^k)) = n - 9*A054899(n). (End)
From Hieronymus Fischer, Jun 17 2007: (Start)
G.f. g(x) = Sum_{k > 0, (x^k - x^(k+10^k) - 9x^(10^k))/(1-x^(10^k))}/(1-x).
a(n) = n - 9*Sum_{10 <= k <= n} Sum_{j|k, j >= 10} floor(log_10(j)) - floor(log_10(j-1)). (End)
From Hieronymus Fischer, Jun 25 2007: (Start)
The g.f. can be expressed in terms of a Lambert series, in that g(x) = (x/(1-x) - 9*L[b(k)](x))/(1-x) where L[b(k)](x) = sum{k >= 0, b(k)*x^k/(1-x^k)} is a Lambert series with b(k) = 1, if k > 1 is a power of 10, else b(k) = 0.
G.f.: g(x) = (Sum_{k > 0} (1 - 9*c(k))*x^k)/(1-x), where c(k) = Sum_{j > 1, j|k} floor(log_10(j)) - floor(log_10(j-1)).
a(n) = n - 9*Sum_{0 < k <= floor(log_10(n))} a(floor(n/10^k))*10^(k-1). (End)
From Hieronymus Fischer, Oct 06 2007: (Start)
a(n) <= 9*(1 + floor(log_10(n))), equality holds for n = 10^m - 1, m > 0.
lim sup (a(n) - 9*log_10(n)) = 0 for n -> oo.
lim inf (a(n+1) - a(n) + 9*log_10(n)) = 1 for n -> oo. (End)
a(n) = A138530(n, 10) for n > 9. - Reinhard Zumkeller, Mar 26 2008
a(A058369(n)) = A004159(A058369(n)); a(A000290(n)) = A004159(n). - Reinhard Zumkeller, Apr 25 2009
a(n) mod 2 = A179081(n). - Reinhard Zumkeller, Jun 28 2010
a(n) <= 9*log_10(n+1). - Vladimir Shevelev, Jun 01 2011
a(n) = a(n-1) + a(n-10) - a(n-11), for n < 100. - Alexander R. Povolotsky, Oct 09 2011
a(n) = Sum_{k >= 0} A031298(n, k). - Philippe Deléham, Oct 21 2011
a(n) = a(n mod b^k) + a(floor(n/b^k)), for all k >= 0. - Hieronymus Fischer, Mar 24 2014
Sum_{n>=1} a(n)/(n*(n+1)) = 10*log(10)/9 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

Extensions

More terms from Hieronymus Fischer, Jun 17 2007
Edited by Michel Marcus, Nov 11 2013

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

A010888 Digital root of n (repeatedly add the digits of n until a single digit is reached).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is sometimes also called the additive digital root of n.
n mod 9 (A010878) is a very similar sequence.
Partial sums are given by A130487(n-1) + n (for n > 0). - Hieronymus Fischer, Jun 08 2007
Decimal expansion of 13717421/111111111 is 0.123456789123456789123456789... with period 9. - Eric Desbiaux, May 19 2008
Decimal expansion of 13717421 / 1111111110 = 0.0[123456789] (periodic) - Daniel Forgues, Feb 27 2017
a(A005117(n)) < 9. - Reinhard Zumkeller, Mar 30 2010
My friend Jahangeer Kholdi has found that 19 is the smallest prime p such that for each number n, a(p*n) = a(n). In fact we have: a(m*n) = a(a(m)*a(n)) so all numbers with digital root 1 (numbers of the form 9k + 1) have this property. See comment lines of A017173. Also we have a(m+n) = a(a(m) + a(n)). - Farideh Firoozbakht, Jul 23 2010

Examples

			The digits of 37 are 3 and 7, and 3 + 7 = 10. And the digits of 10 are 1 and 0, and 1 + 0 = 1, so a(37) = 1.
		

References

  • Martin Gardner, Mathematics, Magic and Mystery, 1956.

Crossrefs

Cf. A007953, A007954, A031347, A113217, A113218, A010878 (n mod 9), A010872, A010873, A010874, A010875, A010876, A010877, A010879, A004526, A002264, A002265, A002266, A017173, A031286 (additive persistence of n), (multiplicative digital root of n), A031346 (multiplicative persistence of n).

Programs

Formula

If n = 0 then a(n) = 0; otherwise a(n) = (n reduced mod 9), but if the answer is 0 change it to 9.
Equivalently, if n = 0 then a(n) = 0, otherwise a(n) = (n - 1 reduced mod 9) + 1.
If the initial 0 term is ignored, the sequence is periodic with period 9.
From Hieronymus Fischer, Jun 08 2007: (Start)
a(n) = A010878(n-1) + 1 (for n > 0).
G.f.: g(x) = x*(Sum_{k = 0..8}(k+1)*x^k)/(1 - x^9). Also: g(x) = x(9x^10 - 10x^9 + 1)/((1 - x^9)(1 - x)^2). (End)
a(n) = n - 9*floor((n-1)/9), for n > 0. - José de Jesús Camacho Medina, Nov 10 2014

A003001 Smallest number of multiplicative persistence n.

Original entry on oeis.org

0, 10, 25, 39, 77, 679, 6788, 68889, 2677889, 26888999, 3778888999, 277777788888899
Offset: 0

Views

Author

Keywords

Comments

Probably finite.
The persistence of a number (A031346) is the number of times you need to multiply the digits together before reaching a single digit.
From David A. Corneth, Sep 23 2016: (Start)
For n > 1, the digit 0 doesn't occur. Therefore the digit 1 doesn't occur and all terms have digits in nondecreasing order.
a(n) consists of at most one three and at most one two but not both. If they contain both, they could be replaced with a single digit 6 giving a lesser number. Two threes can be replaced with a 9. Similarily, there's at most one four and one six but not both. Two sixes can be replaced with 49. A four and a six can be replaced with a three and an eight. For n > 2, an even number and a five don't occur together.
Summarizing, a term a(n) for n > 2 consists of 7's, 8's and 9's with a prefix of one of the following sets of digits: {{}, {2}, {3}, {4}, {6}, {2,6}, {3,5}, {5, 5,...}} [Amended by Kohei Sakai, May 27 2017]
No more up to 10^200. (End)
From Benjamin Chaffin, Sep 29 2016: (Start)
Let p(n) be the product of the digits of n, and P(n) be the multiplicative persistence of n. Any p(n) > 1 must have only prime factors from one of the two sets {2,3,7} or {3,5,7}. The following are true of all p(n) < 10^20000:
The largest p(n) with P(p(n))=10 is 2^4 * 3^20 * 7^5. The only other such p(n) known is p(a(11))=2^19 * 3^4 * 7^6.
The largest p(n) with P(p(n))=9 is 2^33 * 3^3 (12 digits).
The largest p(n) with P(p(n))=8 is 2^9 * 3^5 * 7^8 (12 digits).
The largest p(n) with P(p(n))=7 is 2^24 * 3^18 (16 digits).
The largest p(n) with P(p(n))=6 is 2^24 * 3^6 * 7^6 (16 digits).
The largest p(n) with P(p(n))=5 is 2^35 * 3^2 * 7^6 (17 digits).
The largest p(n) with P(p(n))=4 is 2^59 * 3^5 * 7^2 (22 digits).
The largest p(n) with P(p(n))=3 is 2^4 * 3^17 * 7^38 (42 digits).
The largest p(n) with P(p(n))=2 is 2^25 * 3^227 * 7^28 (140 digits).
All p(n) between 10^140 and 10^20000 have a persistence of 1, meaning they contain a 0 digit. (End)
Benjamin Chaffin's comments imply that there are no more terms up to 10^20585. For every number N between 10^200 with 10^20585 with persistence greater than 1, the product of the digits of N is between 10^140 and 10^20000, and each of these products has a persistence of 1. - David Radcliffe, Mar 22 2019
From A.H.M. Smeets, Nov 16 2018: (Start)
Let p_10(n) be the product of the digits of n in base 10. We can define an equivalence relation DP_10 on n by n DP_10 m if and only if p_10(n) = p_10(m); the name DP_b for the equivalence relation stands for "digits product for representation in base b". A number n is called the class representative number of class n/DP_10 if and only if p_10(n) = p_10(m), m >= n; i.e., if it is the smallest number of that class; it is also called the reduced number.
For any multiplicative persistence, except multiplicative persistence 2, the set of class representative numbers with that multiplicative persistence is conjectured to be finite.
Each class representative number represents an infinite set of numbers with the same multiplicative persistence.
For multiplicative persistence 2, only the set of class representative numbers which end in the digit zero is infinite. The table of numbers of class representative numbers of different multiplicative persistence (mp) is given by:
final digit
mp total 0 1 2 3 4 5 6 7 8 9
====================================================
0 10 1 1 1 1 1 1 1 1 1 1
1 10 1 1 1 1 1 1 1 1 1 1
2 inf inf 0 4 0 1 1 5 0 7 0
3 12199 12161 0 8 0 3 3 8 0 16 0
4 408 342 0 14 0 5 4 19 0 24 0
5 151 88 0 9 0 1 3 37 0 13 0
6 41 24 0 1 0 0 0 14 0 2 0
7 13 9 0 0 0 0 0 4 0 0 0
8 8 7 0 0 0 0 0 1 0 0 0
9 5 5 0 0 0 0 0 0 0 0 0
10 2 2 0 0 0 0 0 0 0 0 0
11 2 2 0 0 0 0 0 0 0 0 0
It is observed from this that for the reduced numbers with multiplicative persistence 1, the primes 11, 13, 17 and 19, will not occur in any trajectory of another (larger) number; i.e., all numbers represented by the reduced numbers 11, 13, 17 and 19 have a prime factor of at least 11 (conjectured from the observations).
Example for numbers represented by the reduced number 19: 91 = 7*13, 133 = 7*19, 313 is prime, 331 is prime, 119 = 7*17, 191 is prime, 911 is prime, 1133 = 11*103, 1313 = 13*101, 1331 = 11^3, 3113 = 11*283, 3131 = 31*101 and 3311 = 7*11*43.
In fact all trajectories can be projected to a trajectory in one of the ten trees with reduced numbers with roots 0..9, and the numbers represented by the reduced number of each leaf have a prime factor of at least 11 (as conjectured from the observations).
Example of the trajectory of 277777788888899 (see A121111) in the tree of reduced numbers (the unreduced numbers are given between brackets): 277777788888899 -> 3778888999 (4996238671872) -> 26888999 (438939648) -> 2677889 (4478976) -> 68889 (338688) -> 6788 (27648) -> 2688 (2688) -> 678 (768) -> 69 (336) -> 45 (54) -> 10 (20) -> 0. (End)
From Tim Peters, Sep 19 2023: (Start)
New lower bound: if a(12) exists, it must be > 2.67*10^30000. It continues to be the case that the digit products for all candidates with at least 20000 digits (roughly where the last long run reported here stopped) contain a zero digit, so the candidates all have persistence 2. More, the digit products all contain at least one zero in their last 306 digits. An extreme is the digit product 2^13802 * 3^16807 * 7^1757. That has 13659 decimal digits, 1335 of which are zeros. It ends with a zero followed by 305 nonzero digits. So to confirm that the large candidates with no more than 30000 digits have persistence 2, it would suffice to compute digit products modulo 10^306.
Note: by "candidate" I mean a digit string matching one of these eight (pairwise disjoint) simple regular expressions. Each such string gives the smallest integer with its digit product (and viewing the empty string as having digit product 1), and their union covers all digit products that don't end with a zero.
7* 8* 9*
2 7* 8* 9*
3 7* 8* 9*
4 7* 8* 9*
5 5* 7* 9*
6 7* 8* 9*
26 7* 8* 9*
35 5* 7* 9*
There are (8*N^2 + 13*N + 6)*(N + 1)/6 such strings with no more than N digits. A long computer run checked N=30000, a bit over 36*10^12 candidates. The smallest candidate with more than 30000 digits is > 2.67*10^30000, which is the smallest remaining possibility for a(12). (End)

Examples

			77 -> 49 -> 36 -> 18 -> 8 has persistence 4.
		

References

  • Alex Bellos, Here's Looking at Euclid: A Surprising Excursion Through the Astonishing World of Math, Free Press, 2010, page 176.
  • M. Gardner, Fractal Music, Hypercards and More, Freeman, NY, 1991, pp. 170, 186.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section F25.
  • C. A. Pickover, Wonders of Numbers, "Persistence", Chapter 28, Oxford University Press NY 2001.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 66.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 35.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 78.

Crossrefs

Cf. A031346 (persistence), A133500 (powertrain), A133048 (powerback), A006050, A007954, A031286, A031347, A033908, A046511, A121105-A121111.

Programs

  • Mathematica
    lst = {}; n = 0; Do[While[True, k = n; c = 0; While[k > 9, k = Times @@ IntegerDigits[k]; c++]; If[c == l, Break[]]; n++]; AppendTo[lst, n], {l, 0, 7}]; lst (* Arkadiusz Wesolowski, May 01 2012 *)
  • PARI
    persistence(x)={my(y=digits(x),c=0);while(#y>1,y=digits(vecprod(y));c++);return(c)}
    firstTermsA003001(U)={my(ans=vector(U),k=(U>1),z);while(k+1<=U,if(persistence(z)==k,ans[k++]=z);z++);return(ans)}
    \\ Finds the first U terms (is slow); R. J. Cano, Sep 11 2016

A031346 Multiplicative persistence: number of iterations of "multiply digits" needed to reach a number < 10.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			For n = 999: A007954(999) = 729, A007954(729) = 126, A007954(126) = 12 and A007954(12) = 2. The fourth iteration of "multiply digits" yields a single-digit number, so a(999) = 4. - _Felix Fröhlich_, Jul 17 2016
		

References

  • M. Gardner, Fractal Music, Hypercards and More Mathematical Recreations from Scientific American, Persistence of Numbers, pp. 120-1; 186-7, W. H. Freeman NY 1992.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 35.

Crossrefs

Cf. A007954 (product of decimal digits of n).
Cf. A010888 (additive digital root of n).
Cf. A031286 (additive persistence of n).
Cf. A031347 (multiplicative digital root of n).
Cf. A263131 (ordinal transform).
Cf. A003001.

Programs

  • Magma
    f:=func; a:=[]; for n in [0..100] do s:=0; k:=n; while k ge 10 do s:=s+1; k:=f(k); end while; Append(~a,s); end for; a; // Marius A. Burtea, Jan 12 2020
  • Maple
    A007954 := proc(n) return mul(d, d=convert(n, base, 10)): end: A031346 := proc(n) local k,m: k:=0:m:=n: while(length(m)>1)do m:=A007954(m):k:=k+1: od: return k: end: seq(A031346(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    Table[Length[NestWhileList[Times@@IntegerDigits[#]&,n,#>=10&]],{n,0,100}]-1 (* Harvey P. Dale, Aug 27 2016 *)
  • PARI
    a007954(n) = my(d=digits(n)); prod(i=1, #d, d[i])
    a(n) = my(k=n, i=0); while(#Str(k) > 1, k=a007954(k); i++); i \\ Felix Fröhlich, Jul 17 2016
    
  • Python
    from operator import mul
    from functools import reduce
    def A031346(n):
        mp = 0
        while n > 9:
            n = reduce(mul, (int(d) for d in str(n)))
            mp += 1
        return mp
    # Chai Wah Wu, Aug 23 2014
    

Formula

Probably bounded, see A003001. - Charles R Greathouse IV, Nov 15 2022

A031286 Additive persistence: number of summations of digits needed to obtain a single digit (the additive digital root).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A010888 (additive digital root of n).
Cf. A031347 (multiplicative digital root of n).
Cf. A031346 (multiplicative persistence of n).
Cf. also A006050, A045646.
Cf. Numbers with additive persistence k: A304366 (k=1), A304367 (k=2), A304368 (k=3), A304373 (k=4). - Jaroslav Krizek, May 28 2018

Programs

  • Maple
    read("transforms") ;
    A031286 := proc(n)
        local a,nper;
        nper := n ;
        a := 0 ;
        while nper > 9 do
            nper := digsum(nper) ;
            a := a+1 ;
        end do:
        a ;
    end proc:
    seq(A031286(n),n=0..80) ; # R. J. Mathar, Jan 02 2018
  • Mathematica
    lst = {}; Do[s = 0; While[n > 9, s++; n = Plus @@ IntegerDigits[n]]; AppendTo[lst, s], {n, 0, 98}]; lst (* Arkadiusz Wesolowski, Oct 17 2012 *)
  • PARI
    dsum(n)=my(s);while(n,s+=n%10;n\=10);s
    a(n)=my(s);while(n>9,s++;n=dsum(n));s \\ Charles R Greathouse IV, Sep 13 2012
    
  • Python
    def A031286(n):
        ap = 0
        while n > 9:
            n = sum(int(d) for d in str(n))
            ap += 1
        return ap
    # Chai Wah Wu, Aug 23 2014

Extensions

Corrected by Reinhard Zumkeller, Feb 05 2009

A034048 Numbers with multiplicative digital root value 0.

Original entry on oeis.org

0, 10, 20, 25, 30, 40, 45, 50, 52, 54, 55, 56, 58, 59, 60, 65, 69, 70, 78, 80, 85, 87, 90, 95, 96, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 120, 125, 130, 140, 145, 150, 152, 154, 155, 156, 158, 159, 160, 165, 169, 170, 178, 180, 185, 187, 190, 195
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

Numbers with root value 1 are the 'repunits' (see A000042).
This sequence has density 1. - Franklin T. Adams-Watters, Apr 01 2009
Any integer with at least one 0 among its base 10 digits is in this sequence. - Alonso del Arte, Aug 29 2014
This sequence is 10-automatic: it contains numbers with a 0, or with a 5 and any even digit. - Charles R Greathouse IV, Feb 13 2017

Examples

			20 is in the sequence because 2 * 0 = 0.
25 is in the sequence because 2 * 5 = 10 and 1 * 0 = 0.
		

Crossrefs

Cf. A031347, A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).
Cf. the subsets A011540 and A008592.

Programs

  • Mathematica
    mdr0Q[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>9&]==0; Select[Range[ 0,200],mdr0Q] (* Harvey P. Dale, Jul 21 2020 *)
  • PARI
    is(n)=factorback(digits(n))==0 \\ Charles R Greathouse IV, Feb 13 2017

A034052 Numbers with multiplicative digital root value 5.

Original entry on oeis.org

5, 15, 35, 51, 53, 57, 75, 115, 135, 151, 153, 157, 175, 315, 351, 355, 359, 395, 511, 513, 517, 531, 535, 539, 553, 557, 571, 575, 579, 593, 597, 715, 751, 755, 759, 795, 935, 953, 957, 975, 1115, 1135, 1151, 1153, 1157, 1175, 1315, 1351, 1355, 1359, 1395
Offset: 1

Views

Author

Patrick De Geest, Sep 15 1998

Keywords

Comments

All digits of a(n) must be odd. - Robert Israel, Oct 19 2015

Crossrefs

Cf. A034048, A002275, A034049, A034050, A034051, this sequence, A034053, A034054, A034055, A034056 (numbers having multiplicative digital roots 0-9).

Programs

  • Maple
    mdr:= proc(n) option remember;
    if n < 10 then return(n) fi;
    procname(convert(convert(n,base,10),`*`))
    end proc:
    select(mdr=5, [$1..10^5]); # Robert Israel, Oct 19 2015
  • Mathematica
    mrQ[n_]:=NestWhile[Times@@IntegerDigits[#]&,n,#>10&]==5; Select[Range[1395],mrQ[#]&] (* Jayanta Basu, May 30 2013 *)
  • PARI
    t(n) = {while(n>9, n=prod(i=1, #n=digits(n), n[i])); n};
    for(n=0, 1e4, if(t(n) == 5, print1(n", "))); \\ Altug Alkan, Oct 19 2015

Extensions

Incorrect formula removed by Martin Renner, Oct 19 2015
Showing 1-10 of 68 results. Next