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

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

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

A031347 Multiplicative digital root of n (keep multiplying digits of n until reaching a single digit).

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, 0, 2, 4, 6, 8, 0, 3, 6, 9, 2, 5, 8, 2, 8, 4, 0, 4, 8, 2, 6, 0, 8, 6, 6, 8, 0, 5, 0, 5, 0, 0, 0, 5, 0, 0, 0, 6, 2, 8, 8, 0, 8, 8, 6, 0, 0, 7, 4, 2, 6, 5, 8, 8, 0, 8, 0, 8, 6, 8, 6, 0, 6
Offset: 0

Views

Author

Keywords

Comments

a(n) = 0 for almost all n. - Charles R Greathouse IV, Oct 02 2013
More precisely, a(n) = 0 asymptotically almost surely, namely, among others, for all numbers n which have a digit '0', and as n has more and more digits, it becomes increasingly less probable that no digit is equal to zero. (The set A011540 has density 1.) Thus the density of numbers for which a(n) > 0 is zero, although this happens for infinitely many numbers, for example all repunits n = (10^k - 1)/9 = A002275(k). - M. F. Hasler, Oct 11 2015

Crossrefs

Cf. A007954, A007953, A003001, A010888 (additive digital root of n), A031286 (additive persistence of n), A031346 (multiplicative persistence of n).
Numbers having multiplicative digital roots 0-9: A034048, A002275, A034049, A034050, A034051, A034052, A034053, A034054, A034055, A034056.

Programs

  • Haskell
    a031347 = until (< 10) a007954
    -- Reinhard Zumkeller, Oct 17 2011, Sep 22 2011
    
  • Maple
    A007954 := proc(n) return mul(d, d=convert(n,base,10)): end: A031347 := proc(n) local m: m:=n: while(length(m)>1)do m:=A007954(m): od: return m: end: seq(A031347(n),n=0..100); # Nathaniel Johnston, May 04 2011
  • Mathematica
    mdr[n_] := NestWhile[Times @@ IntegerDigits@# &, n, UnsameQ, All]; Table[ mdr[n], {n, 0, 104}] (* Robert G. Wilson v, Aug 04 2006 *)
    Table[NestWhile[Times@@IntegerDigits[#] &, n, # > 9 &], {n, 0, 90}] (* Harvey P. Dale, Mar 10 2019 *)
  • PARI
    A031347(n)=local(resul); if(n<10, return(n) ); resul = n % 10; n = (n - n%10)/10; while( n > 0, resul *= n %10; n = (n - n%10)/10; ); return(A031347(resul))
    for(n=1,80, print1(A031347(n),",")) \\ R. J. Mathar, May 23 2006
    
  • PARI
    A031347(n)={while(n>9,n=prod(i=1,#n=digits(n),n[i]));n} \\ M. F. Hasler, Dec 07 2014
    
  • Python
    from operator import mul
    from functools import reduce
    def A031347(n):
        while n > 9:
           n = reduce(mul, (int(d) for d in str(n)))
        return n
    # Chai Wah Wu, Aug 23 2014
    
  • Python
    from math import prod
    def A031347(n):
        while n > 9: n = prod(map(int, str(n)))
        return n
    print([A031347(n) for n in range(100)]) # Michael S. Branicky, Apr 17 2024
    
  • Scala
    def iterDigitProd(n: Int): Int = n.toString.length match {
      case 1 => n
      case  => iterDigitProd(n.toString.toCharArray.map( - 48).scanRight(1)( * ).head)
    }
    (0 to 99).map(iterDigitProd) // Alonso del Arte, Apr 11 2020

Formula

a(n) = d in {1, ..., 9} if (but not only if) n = (10^k - 1)/9 + (d - 1)*10^m = A002275(k) + (d - 1)*A011557(m) for some k > m >= 0. - M. F. Hasler, Oct 11 2015

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

A006050 Smallest number of additive persistence n.

Original entry on oeis.org

0, 10, 19, 199, 19999999999999999999999
Offset: 0

Views

Author

Keywords

Comments

The next term a(5) is 1 followed by 2222222222222222222222 9's.

References

  • Meimaris Antonios, On the additive persistence of a number in base p, Preprint, 2015.
  • H. J. Hindin, The additive persistence of a number, J. Rec. Math., 7 (No. 2, 1974), 134-135.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    lst = {0, 10}; Do[AppendTo[lst, 2*10^((lst[[-1]] - 1)/9) - 1], {3}]; lst (* Arkadiusz Wesolowski, Oct 17 2012 *)
    Join[{0},NestList[2*10^((#-1)/9)-1&,10,3]] (* Harvey P. Dale, May 08 2020 *)

Formula

For n>1 a(n) = 2*10^((a(n-1)-1)/9)-1.

A239427 Numbers such that additive and multiplicative persistences coincide.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 28, 29, 30, 31, 32, 33, 37, 38, 40, 41, 42, 46, 48, 50, 51, 56, 58, 60, 61, 64, 65, 67, 70, 71, 73, 76, 80, 81, 82, 83, 84, 85, 90, 92, 99, 100, 101, 102, 103, 104, 105, 106
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 19 2014

Keywords

Comments

Numbers n for which A031286(n) = A031346(n).

Examples

			28 -> 10 -> 1 has additive persistence 2. 28 -> 16 -> 6 has multiplicative persistence 2. 28 is therefore in the sequence.
		

Crossrefs

Supersequence of A239480. Cf. A031286, A031346, A064702.

Programs

  • PARI
    for(n=0, 106, v=n; a=0; while(n>9, a++; n=sumdigits(n)); n=v; m=0; while(n>9, m++; d=digits(n); n=prod(k=1, #d, d[k])); n=v; if(a==m, print1(n, ", ")));
    
  • Python
    from math import prod
    def A031286(n):
        ap = 0
        while n > 9: n, ap = sum(map(int, str(n))), ap+1
        return ap
    def A031346(n):
        mp = 0
        while n > 9: n, mp = prod(map(int, str(n))), mp+1
        return mp
    def ok(n): return A031286(n) == A031346(n)
    print([k for k in range(107) if ok(k)]) # Michael S. Branicky, Sep 17 2022

A304366 Numbers with additive persistence = 1.

Original entry on oeis.org

10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 30, 31, 32, 33, 34, 35, 36, 40, 41, 42, 43, 44, 45, 50, 51, 52, 53, 54, 60, 61, 62, 63, 70, 71, 72, 80, 81, 90, 100, 101, 102, 103, 104, 105, 106, 107, 108, 110, 111, 112, 113, 114, 115, 116
Offset: 1

Views

Author

Jaroslav Krizek, May 11 2018

Keywords

Comments

For d >= 2, there are A000581(d+8) terms with d digits. - Robert Israel, Dec 28 2023

Examples

			Adding the digits of 10 gives 1, a single-digit number, so 10 is a member. Adding the digits of 39 gives 12, which is a 2-digit number, so 39 is not a member. - _Michael B. Porter_, May 16 2018
		

Crossrefs

Cf. Numbers with additive persistence k: A304367 (k=2), A304368 (k=3), A304373 (k=4).

Programs

  • Maple
    select(t -> convert(convert(t,base,10),`+`) < 10, [$10 .. 200]); # Robert Israel, Dec 28 2023
  • Mathematica
    Select[Range@ 120, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 3 &] (* Michael De Vlieger, May 14 2018 *)
  • PARI
    nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;}
    isok(n) = nb(n) == 1; \\ Michel Marcus, May 13 2018

Formula

A031286(a(n)) = 1.

A304367 Numbers n with additive persistence = 2.

Original entry on oeis.org

19, 28, 29, 37, 38, 39, 46, 47, 48, 49, 55, 56, 57, 58, 59, 64, 65, 66, 67, 68, 69, 73, 74, 75, 76, 77, 78, 79, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 109, 118, 119, 127, 128, 129, 136, 137, 138, 139, 145, 146, 147, 148, 149, 154
Offset: 1

Views

Author

Jaroslav Krizek, May 11 2018

Keywords

Comments

First deviation from A298638 is at a(161); a(161) = 299, A298638(161) = 307.

Examples

			Repeatedly taking the sum of digits starting with 19 gives 10 and then 1. There are two steps, so the additive persistence is 2, and 19 is a member. - _Michael B. Porter_, May 16 2018
		

Crossrefs

Cf. A031286.
Cf. Numbers with additive persistence k: A304366 (k=1), A304368 (k=3), A304373 (k=4).

Programs

  • Mathematica
    Select[Range@ 160, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 4 &] (* Michael De Vlieger, May 14 2018 *)
  • PARI
    nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;}
    isok(n) = nb(n) == 2; \\ Michel Marcus, May 13 2018

Formula

A031286(a(n)) = 2.

A304368 Numbers n with additive persistence = 3.

Original entry on oeis.org

199, 289, 298, 379, 388, 397, 469, 478, 487, 496, 559, 568, 577, 586, 595, 649, 658, 667, 676, 685, 694, 739, 748, 757, 766, 775, 784, 793, 829, 838, 847, 856, 865, 874, 883, 892, 919, 928, 937, 946, 955, 964, 973, 982, 991, 1099, 1189, 1198, 1279, 1288, 1297
Offset: 1

Views

Author

Jaroslav Krizek, May 11 2018

Keywords

Comments

First deviation from A166459 is at a(101); a(101) = 1999, A166459(101) = 2089.

Examples

			Repeatedly taking the sum of digits starting with 199 gives 19, 10, and then 1. There are three steps, so the additive persistence is 3, and 199 is a member. - _Michael B. Porter_, May 16 2018
		

Crossrefs

Cf. A031286.
Cf. Numbers with additive persistence k: A304366 (k=1), A304367 (k=2), A304373 (k=4).

Programs

  • Mathematica
    Select[Range@ 1300, Length@ FixedPointList[Total@ IntegerDigits@ # &, #] == 5 &] (* Michael De Vlieger, May 14 2018 *)
  • PARI
    nb(n) = {my(nba = 0); while (n > 9, n = sumdigits(n); nba++); nba;}
    isok(n) = nb(n) == 3; \\ Michel Marcus, May 13 2018

Formula

A031286(a(n)) = 3.
Showing 1-10 of 25 results. Next