The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A289979 Define two sequences n1(i) and n2(i) by the recurrences n1(i) = n1(i-1) + digsum(n2(i-1)), n2(i) = n2(i-1) + digsum(n1(i-1)), with initial values n1(1) = n and n2(1) = 0. Then a(n) is the smallest m such that n1(i) = n2(i) = m for some i, or -1 if no such m exists. 1
1, 2, 3, 4, 5, 6, 7, 8, 9, 86, 86, 42, 86, 20, 42, 53, 86, 108, 20, 110, 222, 110, 31, 222, 310, 110, 288, 31, 97, 75, 154, 64, 75, 692, 154, 468, 64, 176, 75, 389, 367, 132, 187, 389, 648, 367, 209, 132, 211, 1772, 411, 446, 1715, 828, 1772, 7150, 411, 413 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
The function is like a chase that ends when n1(i) = n2(i). For example, when n = 14:
n1(1) = 14, n2(1) = 0
n1(2) = 14 = 14 + digsum(0), n2(2) = 5 = 0 + digsum(14)
n1(3) = 19 = 14 + digsum(5), n2(3) = 10 = 5 + digsum(14)
n1(4) = 20 = 19 + digsum(10), n2(4) = 20 = 10 + digsum(19)
Because n1 = n2 = 20, the chase ends and a(14) = 20. When n = 81, a(81) > 10^8 and the chase may never end. In other bases, some different number first produces a prolonged chase with no result. E.g., in base 9, the number is 64 = 71 (b9); in base 12, the number is 110 = 92 (b12). In base 2, when n = 178, n1 = n2 = 6181 and when n = 179, n1 = n2 = 267684506.
If a(81) exists, it is larger than 5*10^14. - Giovanni Resta, Jul 21 2017
LINKS
FORMULA
n1(1) = n, n2(1) = 0, then n1(i) = n1(i-1) + digsum(n2(i-1)), n2(i) = n2(i-1) + digsum(n1(i-1)) until n1(i) = n2(i).
EXAMPLE
n1(1) = 12, n2(1) = 0
n1(2) = 12 = 12 + digsum(0), n2(2) = 3 = 0 + digsum(12)
n1(3) = 15 = 12 + digsum(3), n2(3) = 6 = 3 + digsum(12)
n1(4) = 21 = 15 + digsum(6), n2(4) = 12 = 6 + digsum(15)
n1(5) = 24 = 21 + 3, n2(5) = 15 = 12 + 3
n1(6) = 30 = 24 + 6, n2(6) = 21 = 15 + 6
n1(7) = 33 = 30 + 3, n2(7) = 24 = 21 + 3
n1(8) = 39 = 33 + 6, n2(8) = 30 = 24 + 6
n1(9) = 42 = 39 + 3, n2(9) = 42 = 30 + 12
MATHEMATICA
Table[NestWhileList[{#1 + Total@ IntegerDigits[#2], #2 + Total@ IntegerDigits[#1]} & @@ # &, {n, 0}, UnsameQ @@ # &, 1, 10^4][[-1, -1]], {n, 80}] (* Michael De Vlieger, Jul 17 2017 *)
CROSSREFS
Cf. A004207.
Sequence in context: A038178 A023106 A135480 * A228326 A098766 A032799
KEYWORD
nonn,base,more
AUTHOR
Anthony Sand, Jul 17 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 15 19:42 EDT 2024. Contains 372549 sequences. (Running on oeis4.)