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-5 of 5 results.

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

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.

A176762 Smallest number that takes n steps to reach a cycle under iteration of sum-of-squares-of-digits map.

Original entry on oeis.org

1, 10, 13, 23, 19, 7, 356, 4, 2, 11, 15, 5, 3, 14, 45, 36, 6, 112, 269, 15999
Offset: 0

Views

Author

Robert G. Wilson v, Apr 25 2010

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n]^2); t = Table[0, {25}]; k = 1; While[k < 150000001, a = Length@ NestWhileList[f, k, UnsameQ@## &, All] - 1; If[a < 25 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]

Formula

a(n) = minimum of either A001273(n) or A094406(n+3).

A293929 Smallest number in base 10 that cannot be collapsed to a single digit using fewer than n plus signs.

Original entry on oeis.org

0, 10, 19, 118, 3187, 3014173, 3003344034004
Offset: 0

Views

Author

Simon Demers, Oct 19 2017

Keywords

Comments

A253057 considers the number of applications needed to collapse numbers. An alternative is to look at the number of times a plus sign needs to be inserted, disregarding the number of applications.
The sequence is believed to be infinite. Only five terms, a(1)-a(5), were provided by Butler et al. (2016).
Butler et al. (2016) conjectured that collapsing each term x by simply inserting a plus sign in the "middle" of the decimal expansion and adding would require in the order of log (log x) plus signs.
a(5) reveals that all five-digit and six-digit numbers can be collapsed by inserting no more than four plus signs.
a(6) should contain at least 13 digits. After inserting a plus sign in the middle of numbers with 7, 8, 9 and 10 digits and performing the addition, the resulting sums must have at most 5, 5, 6 and 6 digits, respectively. Furthermore, after inserting a plus sign in the middle of any number with 11 or 12 digits and performing the addition, the result must be smaller or equal to, respectively, 1099998 and 1999998 < a(5). This means at most 4 plus signs would be required to collapse the result after the first application. It follows that all 7, 8, 9, 10, 11 and 12-digit numbers can be collapsed using no more than 5 plus signs. - Simon Demers, Oct 30 2017 [Updated Nov 29 2017]
Between 10 and 10^7-1=9999999 inclusively, 270 numbers require only one plus sign, 175803 numbers require two plus signs, 5952451 numbers require three plus signs, 3866392 numbers require four plus signs, and 5074 numbers require five plus signs. - Simon Demers, Oct 29 2017
Conjecture: Digital root for terms a(n) > 0 is 1. - Simon Demers and J. Stauduhar, Nov 16 2017
Using brute-force, no new term less than 10^9 was found. - J. Stauduhar, Nov 20 2017
Proof of claim that all a(n), n > 0, have digital root 1: Assume terms a(1) to a(n) all have digital root 1, but a(n+1) = x does not. Increment a(n) by one until we reach x. Insert one plus sign into x in the optimal way that guarantees that the result of the addition, y, requires exactly n more insertions of a plus sign to arrive at a single digit. Because y requires n insertions it cannot be less than a(n), otherwise we would have found y before a(n). Because x has digital root greater than 1, y cannot equal a(n). So y must be in the range a(n) < y < x, but we already checked these before arriving at x, so no such y can exist, therefore no such x can exist. Clearly, a(n+1) cannot have digital root 0. Since no a(n+1) = x with digital root 0 or 2 through 9 can exist, a(n+1) must have digital root 1. Q.E.D. - J. Stauduhar, Dec 08 2017

Examples

			For n=3, the a(3)=118 solution reflects the fact that 1+18 = 19, 1+9 = 10 and 1+0 = 1. Alternatively, 1+1+8 = 10 and 1+0 = 1. Three plus signs are required in both cases. For a(4)=3187, one plus sign is required to obtain 31+87 = 118 = a(3).
		

Crossrefs

Formula

a(n) <= ((a(n-1)-1)^2)/3 + a(n-2) for n > 1 (conjectured). This would provide a relatively tight upper bound on a(n). If the Demers-Stauduhar conjecture in the Comments turns out to be true, this upper bound will always be an integer. - Simon Demers, Nov 29 2017

Extensions

a(6) (found by Simon Demers) added by Stan Wagon, May 02 2019

A067670 Smallest prime of additive persistence n.

Original entry on oeis.org

2, 11, 19, 199, 29998999999999999999999
Offset: 0

Views

Author

Shyam Sunder Gupta, Feb 23 2002

Keywords

Comments

a(5) >= 29*10^2222222222222222222221-1, the next number of additive persistence 5 after A006050(5). (a(5) is not equal to A006050(5) because that number is divisible by 313.) - Pontus von Brömssen, Oct 17 2023

Examples

			a(2) = 19, 19 -> 10 -> 1, so 2 summation steps are required to reach a single-digit number.
		

References

  • H. J. Hindin, The additive persistence of a number, J. Rec. Math., 7 (No. 2, 1974), 134-135.

Crossrefs

Formula

a(n) >= A006050(n). - Pontus von Brömssen, Oct 17 2023
Showing 1-5 of 5 results.