OFFSET
1,2
COMMENTS
This is the lexicographically earliest sequence of distinct positive terms with the property.
No zero is in the sequence as zero cannot be a digital root (DR in short hereunder).
LINKS
Thomas Scheuerle, Table of n, a(n) for n = 1..6000
EXAMPLE
a(1) + a(2) = 1 + 9 = 10 with DR = 1;
a(2) + a(3) = 9 + 18 = 27 with DR = 9;
a(3) + a(4) = 18 + 19 = 37 with DR = 1;
a(4) + a(5) = 19 + 7 = 26 with DR = 8;
a(5) + a(6) = 7 + 3 = 10 with DR = 1;
a(6) + a(7) = 3 + 6 = 9 with DR = 9;
a(7) + a(8) = 6 + 28 = 34 with DR = 7;
a(8) + a(9) = 28 + 2 = 30 with DR = 3;
a(9) + a(10) = 2 + 4 = 6 with DR = 6;
a(10) + a(11) = 4 + 16 = 20 with DR = 2;
a(11) + a(12) = 16 + 37 = 53 with DR = 8; etc.
We see that the succession of the above DRs is the succession of the digits of the sequence (1, 9, 1, 8, 1, 9, 7, 3, 6, 2, 8, ...)
PROG
(MATLAB)
function a = A352960( max_n )
ad(1) = 1;
a(1) = 1;
for n = 2:max_n
k = 1;
while 0 == check_k(a(n-1), k, a, ad(n-1))
k = k + 1;
end
a(n) = k;
s = num2str(k);
for m = 1:length(s)
ad = [ad str2num(s(m))];
end
end
end
function ok = check_k(m, k, a, d)
dr = 1+mod(m+k-1, 9);
ok = (d == dr) && isempty(find(a==k, 1)) ...
&& isempty(find(num2str(k)=='0', 1));
end % Thomas Scheuerle, Apr 11 2022
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Apr 11 2022
STATUS
approved