A231155 Largest k such that no sum of digits is divisible by n (zeros not allowed in the digits of k).
9, 88, 999, 9999, 77777, 999999, 9999999, 88888888, 999999999, 9999999999, 77777777777, 999999999999, 9999999999999, 88888888888888, 999999999999999, 9999999999999999, 77777777777777777, 999999999999999999, 9999999999999999999
Offset: 2
Examples
a(4) = 999 because none of 9, 9+9 or 9+9+9 are divisible by 4. All integers greater than 999 (with no zeros) have the property that some digit sum is divisible by 4, e.g., 1235 has 3+1.
Crossrefs
Subsequence of A010785.
Programs
-
PARI
a(n)=forstep(k=9,1,-1,if(gcd(n,k)==1, return(10^(n-1)\9*k))) \\ Charles R Greathouse IV, Nov 05 2013
Formula
a(n) consists of n-1 digits of d where d is the largest digit such that GCD(n,d)=1.
a(n) = A231470(n)*(10^(n-1)-1)/9. - M. F. Hasler, Nov 09 2013
Extensions
a(9)-a(20) from Charles R Greathouse IV, Nov 05 2013
Comments