OFFSET
2,1
COMMENTS
LINKS
Diophante, A389 - Les décaXphobes (in French).
FORMULA
EXAMPLE
a(4) = 997 because the A331786(4) = 6 consecutive numbers 997, 998, 999, 1000, 1001, 1002 have respectively sum of digits = 25, 26, 27, 1, 2, 3 and none is divisible by 4, and there is no smaller m < 997 such that sum of digits of m, m+1, m+2, m+3, m+4, m+5 is not divisible by 4.
PROG
(PARI) a(n) = my(t=gcd(n%9, 9)); if(t<9, 10^lift(Mod(-1, n/t)/(9/t)) - 10^(n\9)*(n%9-t+1) + 1, 1); \\ Jinyuan Wang, Mar 28 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Mar 28 2022
EXTENSIONS
More terms from Jinyuan Wang, Mar 28 2022
STATUS
approved