# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a216836 Showing 1-1 of 1 %I A216836 #31 Sep 08 2022 08:46:03 %S A216836 1,10,11,13,17,20,21,27,35,39,40,41,42,43,50,54,55,57,63,80,81,82,84, %T A216836 86,92,93,97,100,101,105,108,110,111,112,114,116,117,122,126,129,130, %U A216836 131,135,142,143,147 %N A216836 Numbers n such that sum of decimal digits of n divides phi(n). %C A216836 Sometimes referred to as balanced numbers. %C A216836 The sequence is infinite because for k>= 1, phi(10^k) = 4*10^(k-1) and digitsum (10^k) = 1. - _Marius A. Burtea_, Dec 20 2018 %C A216836 If n is in the sequence, then so is 10*n. - _Robert Israel_, Dec 20 2018 %D A216836 James J. Tattersall, Elementary Number Theory in Nine Chapters, 2nd ed., Cambridge University Press, 2005, page 193, exercise 15. %H A216836 Marius A. Burtea and Muniru A Asiru, Table of n, a(n) for n = 1..10000 (first 3028 terms from Marius A. Burtea) %e A216836 39 is in the sequence since its sum of digits (12) divides phi(39) = 24. %p A216836 select(n -> numtheory:-phi(n) mod convert(convert(n,base,10),`+`) = 0, [$1..1000]); # _Robert Israel_, Dec 20 2018 %t A216836 Select[Range[1000], Mod[EulerPhi[#], Total @ IntegerDigits[#]] == 0 &] (* _Giovanni Resta_, Mar 16 2013 *) %o A216836 (Magma) [n: n in [1..1000] | IsIntegral((EulerPhi(n))/&+Intseq(n))];// _Marius A. Burtea_, Dec 20 2018 %o A216836 (GAP) nmax:=150;; %o A216836 S:=List(List([1..nmax],n->ListOfDigits(n)),Sum);; P:=List([1..nmax],n->Phi(n));; %o A216836 a:=Filtered([1..nmax],i->P[i] mod S[i]=0); # _Muniru A Asiru_, Dec 20 2018 %K A216836 nonn,base,easy %O A216836 1,2 %A A216836 _Jayanta Basu_, Mar 16 2013 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE