login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers n such that n | 5^n + 4^n + 3^n.
0

%I #5 Feb 23 2023 08:39:34

%S 1,2,3,9,10,27,50,81,230,243,250,310,610,729,1250,1550,2187,3050,4850,

%T 6250,6561,7550,7750,9610,15250,18910,19683,20450,31041,31250,31671,

%U 35650,37210,37750,38750,48050,58833,59049,76250,94550

%N Numbers n such that n | 5^n + 4^n + 3^n.

%t Select[ Range[ 10^5 ], Mod[ PowerMod[ 5, #, # ] + PowerMod[ 4, #, # ] + PowerMod[ 3, #, # ], # ] == 0 & ]

%t Select[Range[100000],Mod[Total[PowerMod[Range[3,5],#,#]],#]==0&] (* _Harvey P. Dale_, Feb 23 2023 *)

%K nonn

%O 1,2

%A _Robert G. Wilson v_, Sep 20 2000