login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231563 a(n) = f(1)^n + ... + f(n)^n (mod n) where f(i)=i if gcd(i,n)=1 and f(i)=0 otherwise. 5
0, 1, 0, 2, 0, 2, 0, 4, 0, 0, 0, 4, 0, 0, 0, 8, 0, 6, 0, 8, 0, 0, 0, 8, 0, 0, 0, 0, 0, 20, 0, 16, 0, 0, 0, 12, 0, 0, 0, 16, 0, 12, 0, 0, 0, 0, 0, 16, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 16, 0, 0, 0, 32, 0, 44, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,4

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..5000

MATHEMATICA

S[n_] :=  Mod[Sum[If[GCD[i, n] == 1, PowerMod[i, n, n], 0], {i, 1, n}], n]; Array[S, 100]

PROG

(PARI) f(i, n) = if (gcd(i, n) == 1, i, 0);

a(n) = lift(sum(k=1, n, Mod(f(k, n), n)^n)); \\ Michel Marcus, Jul 16 2017

CROSSREFS

Cf. A231564, A231565.

Sequence in context: A112631 A158706 A096500 * A282849 A111813 A167156

Adjacent sequences:  A231560 A231561 A231562 * A231564 A231565 A231566

KEYWORD

nonn

AUTHOR

José María Grau Ribas, Dec 09 2013

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 13 13:33 EDT 2020. Contains 335688 sequences. (Running on oeis4.)