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!)
A196777 Sum (mod n) of the distinct residues of x^n (mod n), x=0..n-1. 1
0, 1, 0, 1, 0, 2, 0, 1, 0, 5, 0, 2, 0, 0, 0, 1, 0, 2, 0, 2, 0, 0, 0, 2, 0, 13, 0, 0, 0, 0, 0, 1, 0, 17, 0, 2, 0, 0, 0, 2, 0, 4, 0, 22, 0, 0, 0, 2, 0, 25, 0, 0, 0, 2, 0, 28, 0, 29, 0, 4, 0, 0, 0, 1, 0, 0, 0, 17, 0, 0, 0, 2, 0, 37, 0, 38, 0, 0, 0, 2, 0, 41, 0, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,6

COMMENTS

if n = 2^m, a(n) = 1 ;

if n is odd, a(n) = 0 ;

if a(n) is prime > 2, then a(n) = n/2, for example a(10) = a(2*5) = 5 ;

There exists composite numbers k such that a(k)=k/2, for example a(44)= a(2*22)=22.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..16384

Antti Karttunen, Data supplement: n, a(n) computed for n = 1..65537

FORMULA

a(n) = A195812(n) (mod n).

EXAMPLE

a(10) = 5 because the residues (mod 10) of x^10 are 0, 1, 4, 5, 6, 9 and the sum 25 ==5 (mod 10).

MAPLE

with(numtheory):sumDistRes := proc(n) local re, x, r ; re := {} ; for x from  0 to n-1 do re := re union { modp(x^n, n) } ; end do: add(r, r=re) ; end : for  n from 1 to 150 do ; z:=irem(sumDistRes(n), n) ; printf("%d, ", z); end do: #

PROG

(PARI) A196777(n) = (vecsum(Set(vector(n, k, lift(Mod(k-1, n)^n))))%n); \\ (After code in A195812) - Antti Karttunen, May 19 2021

CROSSREFS

Cf. A195812, A196546.

Sequence in context: A137286 A180048 A128890 * A318361 A078924 A229141

Adjacent sequences:  A196774 A196775 A196776 * A196778 A196779 A196780

KEYWORD

nonn

AUTHOR

Michel Lagneau, Oct 06 2011

STATUS

approved

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 24 22:34 EDT 2022. Contains 354047 sequences. (Running on oeis4.)