OFFSET
1,1
COMMENTS
Cooper and Kennedy (1997) proved that there exist arbitrarily long gaps between consecutive numbers that are coprime to their digital sum.
a(22) > 6.7 * 10^12, if it exists, a(23) = 1500524609387, a(24) = 5222961488687.
a(30) <= 66166892131839499000000017947066278894975530188 (Cooper and Kennedy, 1997).
LINKS
Curtis Cooper and Robert E. Kennedy, On the set of positive integers which are relatively prime to their digital sum and its complement, J. Inst. Math. & Comp. Sci. (Math. Ser.), Vol. 10 (1997), pp. 173-180.
EXAMPLE
a(1) = 10 since both 10 and 11 = 10 + 1 are coprime to their digital sum, and they are the least pair of consecutive numbers with this property.
a(2) = 11 since 11 and 13 = 11 + 2 are coprime to their digital sum, 12 is not since gcd(12, 1+2) = 3, and they are the least pair with a difference 2 with this property.
MATHEMATICA
copQ[n_] := CoprimeQ[n, Plus @@ IntegerDigits[n]]; s[mx_] := Module[{c = 0, n1 = 1, n2, seq, d}, seq = Table[0, {mx}]; n2 = n1 + 1; While[c < mx, While[! copQ[n2], n2++]; d = n2 - n1; If[d <= mx && seq[[d]] == 0, c++; seq[[d]] = n1]; n1 = n2; n2++]; seq]; s[10]
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Amiram Eldar, Nov 22 2020
STATUS
approved