OFFSET
1,1
COMMENTS
If you start with n=1 and take a third sequence C (n + sum of base-1000 digits of n), the first common numbers of the three sequences are 2, 4, 8, 16 and 1027975.
The common numbers for the first ten primes are:
2 -> 4, 8, 16, 1027975, ...
3 -> 24, 96, 60342, ...
5 -> 10, 469534, ...
7 -> 14, 131558, ...
11 -> 923428, ...
13 -> 668495, ...
17 -> 81820, ...
19 -> 2061797, ...
23 -> 2227118, ...
29 -> 12278, ...
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
n=10: Sequence A: 10, 11, 13, 17, 25, 32, 37, 47, 58, 71, 79, 95, 109, 119, 130, 134, 142, 149, 163, 173, 184, 197, 214, 221, ...
Sequence B: 10, 20, 40, 80, 160, 221, ...
-> 221 is the first common number > 10, so a(n)=221.
MATHEMATICA
With[{m = 10^3}, Table[With[{A = Rest@ NestList[# + Total@ IntegerDigits@ # &, n, m]}, NestWhile[# + Total@ IntegerDigits[#, 100] &, n, FreeQ[A, #] &, 1, m]], {n, 68}]] (* Michael De Vlieger, Sep 23 2017 *)
PROG
(PARI) a(n) = my (A=n + sum digits(n), B=n + sum digits(n, 100)); while (1, if (A==B, return (A), A<B, A += sum digits(A), B += sum digits(B, 100))) \\ Rémy Sigrist, Sep 23 2017
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Peter Weiss, Sep 18 2017
STATUS
approved