This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A196546 #15 Oct 20 2023 05:36:09 %S A196546 1,3,5,7,9,11,13,14,15,17,19,21,22,23,25,27,28,29,30,31,33,35,37,38, %T A196546 39,41,43,45,46,47,49,51,52,53,55,57,59,61,62,63,65,66,67,69,70,71,73, %U A196546 75,77,78,79,81,83,85,86,87,89,91,92,93,94,95,97,98,99,101 %N A196546 Numbers n such that the sum of the distinct residues of x^n (mod n), x=0..n-1, is divisible by n. %C A196546 All odd prime numbers are in the sequence. %C A196546 The sum of the distinct residues is 0, 1, 3, 1, 10, 8, 21, 1, 9, 25, 55, 14, 78, 42, 105, 1, 136,.. for n>=1. %e A196546 n= 14 is in the sequence because x^14 == 0, 1, 2, 4, 7, 8, 9, or 11 (mod 14), and the sum 0+1+2+4+7+8+9+11 = 42 is divisible by 14. %p A196546 sumDistRes := proc(n) %p A196546 local re,x,r ; %p A196546 re := {} ; %p A196546 for x from 0 to n-1 do %p A196546 re := re union { modp(x^n,n) } ; %p A196546 end do: %p A196546 add(r,r=re) ; %p A196546 end proc: %p A196546 for n from 1 to 100 do %p A196546 if sumDistRes(n) mod n = 0 then %p A196546 printf("%d,",n); %p A196546 end if; %p A196546 end do: # _R. J. Mathar_, Oct 04 2011 %t A196546 sumDistRes[n_] := Module[{re = {}, x}, For[x = 0, x <= n-1, x++, re = re ~Union~ {PowerMod[x, n, n]}]; Total[re]]; %t A196546 Select[Range[100], Mod[sumDistRes[#], #] == 0&] (* _Jean-François Alcover_, Oct 20 2023, after _R. J. Mathar_ *) %Y A196546 Cf. A195637. %K A196546 nonn %O A196546 1,2 %A A196546 _Michel Lagneau_, Oct 03 2011