login
Numbers k such that Sum_{i=1..k} i^sigma(i) == 0 (mod k).
8

%I #22 Jan 27 2022 11:16:50

%S 1,3,17,64,223,816,3536,22704,27549,401311

%N Numbers k such that Sum_{i=1..k} i^sigma(i) == 0 (mod k).

%e 1^sigma(1) + 2^sigma(2) + ... + 16^sigma(16) + 17^sigma(17) =

%e 1^1 + 2^3 + 3^4 + 4^7 + 5^6 + 6^12 + 7^8 + 8^15 + 9^13 + 10^18 + 11^12 + 12^28 + 13^14 + 14^24 + 15^24 + 16^31 + 17^18 = 21267649601053603536507860737702745369 and 21267649601053603536507860737702745369 / 17 = 1251038211826682560971050631629573257.

%p with(numtheory); ListA227427:=proc(q) local i,n;

%p for n from 1 to q do if add(i^sigma(i),i=1..n) mod n=0 then print(n);

%p fi; od; end: ListA227427(10^6);

%t With[{nn=40000},Transpose[Select[Thread[{Accumulate[Table[n^DivisorSigma[ 1,n],{n,nn}]],Range[nn]}],Divisible[#[[1]],#[[2]]]&]][[2]]] (* _Harvey P. Dale_, Jun 08 2016 *)

%o (PARI) isok(k) = sum(i=1, k, Mod(i,k)^sigma(i)) == 0; \\ _Michel Marcus_, Feb 18 2021

%Y Cf. A000203, A227429.

%K nonn,more

%O 1,2

%A _Paolo P. Lava_, Jul 11 2013

%E a(7)-a(9) from _Giovanni Resta_, Jul 11 2013

%E a(10) from _Jinyuan Wang_, Feb 18 2021