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

%I #27 Jul 22 2017 08:30:30

%S 1,2,3,4,5,6,7,8,9,86,86,42,86,20,42,53,86,108,20,110,222,110,31,222,

%T 310,110,288,31,97,75,154,64,75,692,154,468,64,176,75,389,367,132,187,

%U 389,648,367,209,132,211,1772,411,446,1715,828,1772,7150,411,413

%N 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.

%C The function is like a chase that ends when n1(i) = n2(i). For example, when n = 14:

%C n1(1) = 14, n2(1) = 0

%C n1(2) = 14 = 14 + digsum(0), n2(2) = 5 = 0 + digsum(14)

%C n1(3) = 19 = 14 + digsum(5), n2(3) = 10 = 5 + digsum(14)

%C n1(4) = 20 = 19 + digsum(10), n2(4) = 20 = 10 + digsum(19)

%C 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.

%C If a(81) exists, it is larger than 5*10^14. - _Giovanni Resta_, Jul 21 2017

%H Anthony Sand, <a href="/A289979/b289979.txt">Table of n, a(n) for n = 1..80</a>

%F 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).

%e n1(1) = 12, n2(1) = 0

%e n1(2) = 12 = 12 + digsum(0), n2(2) = 3 = 0 + digsum(12)

%e n1(3) = 15 = 12 + digsum(3), n2(3) = 6 = 3 + digsum(12)

%e n1(4) = 21 = 15 + digsum(6), n2(4) = 12 = 6 + digsum(15)

%e n1(5) = 24 = 21 + 3, n2(5) = 15 = 12 + 3

%e n1(6) = 30 = 24 + 6, n2(6) = 21 = 15 + 6

%e n1(7) = 33 = 30 + 3, n2(7) = 24 = 21 + 3

%e n1(8) = 39 = 33 + 6, n2(8) = 30 = 24 + 6

%e n1(9) = 42 = 39 + 3, n2(9) = 42 = 30 + 12

%t 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 *)

%Y Cf. A004207.

%K nonn,base,more

%O 1,2

%A _Anthony Sand_, Jul 17 2017

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 June 10 15:01 EDT 2024. Contains 373272 sequences. (Running on oeis4.)