login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109675 Numbers k such that the sum of the digits of (k^k - 1) is divisible by k. 0
1, 4, 5, 10, 25, 50, 100, 446, 1000, 9775, 10000, 100000, 995138, 996544, 998866, 1000000 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
k = 10^m is a term of the sequence for all m >= 0. Proof: Let k = 10^m for some nonnegative integer m. Then k^k - 1 has m*10^m 9's and no other digits, so its digits sum to 9*m*10^m = 9*m*k, a multiple of k.
LINKS
EXAMPLE
The digits of 9775^9775 - 1 sum to 175950 and 175950 is divisible by 9775, so 9775 is in the sequence.
MAPLE
sumdigs:= n -> convert(convert(n, base, 10), `+`);
select(n -> sumdigs(n^n-1) mod n = 0, [$1..10^5]); # Robert Israel, Dec 03 2014
MATHEMATICA
Do[k = n^n - 1; s = Plus @@ IntegerDigits[k]; If[Mod[s, n] == 0, Print[n]], {n, 1, 10^5}]
PROG
(Python)
A109675_list = [n for n in range(1, 10**4) if not sum([int(d) for d in str(n**n-1)]) % n]
# Chai Wah Wu, Dec 03 2014
CROSSREFS
Sequence in context: A242960 A288141 A203853 * A052508 A305887 A074098
KEYWORD
base,hard,more,nonn
AUTHOR
Ryan Propper, Aug 06 2005
EXTENSIONS
a(13)-a(16) from Michael S. Branicky, Jun 25 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 12:27 EDT 2024. Contains 371912 sequences. (Running on oeis4.)