The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338935 a(n) = Sum_{d|n} (d^2 mod n). 2

%I #13 Oct 11 2021 16:53:44

%S 0,1,1,1,1,8,1,5,1,10,1,18,1,12,20,5,1,23,1,26,17,16,1,58,1,18,10,42,

%T 1,70,1,21,32,22,40,39,1,24,23,90,1,106,1,54,71,28,1,98,1,55,44,34,1,

%U 104,37,106,29,34,1,240,1,36,77,21,65,160,1,38,56,200,1,175,1,42,60,78,94,154,1,146

%N a(n) = Sum_{d|n} (d^2 mod n).

%H Robert Israel, <a href="/A338935/b338935.txt">Table of n, a(n) for n = 1..10000</a>

%e a(6) = (1^2 mod 6) + (2^2 mod 6) + (3^2 mod 6) + (6^2 mod 6) = 1+4+3+0 = 8.

%p f:= n -> add(t^2 mod n, t = numtheory:-divisors(n)):

%p map(f, [$1..100]);

%t Table[Total[Mod[Divisors[n]^2,n]],{n,80}] (* _Harvey P. Dale_, Oct 11 2021 *)

%o (PARI) a(n) = sumdiv(n, d, lift(Mod(d, n)^2)); \\ _Michel Marcus_, Nov 16 2020

%Y Cf. A000430 (a(n)=1), A338930 (a(n) is prime).

%K nonn

%O 1,6

%A _J. M. Bergot_ and _Robert Israel_, Nov 16 2020

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 12 19:24 EDT 2024. Contains 372494 sequences. (Running on oeis4.)