login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109675 Numbers n such that the sum of the digits of (n^n - 1) is divisible by n. 0

%I

%S 1,4,5,10,25,50,100,446,1000,9775,10000,100000

%N Numbers n such that the sum of the digits of (n^n - 1) is divisible by n.

%C n = 10^k is a member of the sequence, for all k >= 0. Proof: Let n = 10^k for some nonnegative integer k. Then n^n - 1 has k*10^k 9's and no other digits, so its digits sum to 9*k*10^k = 9*k*n, a multiple of n.

%e The digits of 9775^9775 - 1 sum to 175950 and 175950 is divisible by 9775, so 9775 is in the sequence.

%p sumdigs:= n -> convert(convert(n,base,10),`+`);

%p select(n -> sumdigs(n^n-1) mod n = 0, [$1..10^5]); # _Robert Israel_, Dec 03 2014

%t Do[k = n^n - 1; s = Plus @@ IntegerDigits[k]; If[Mod[s, n] == 0, Print[n]], {n, 1, 10^5}]

%o (Python)

%o A109675_list = [n for n in range(1,10**4) if not sum([int(d) for d in str(n**n-1)]) % n]

%o # _Chai Wah Wu_, Dec 03 2014

%K base,hard,more,nonn

%O 1,2

%A _Ryan Propper_, Aug 06 2005

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 23:45 EDT 2020. Contains 334581 sequences. (Running on oeis4.)