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!)
A346744 The number of congruencies k^(n-k) + (n-k)^k == 0 (mod n) with 0 < k < n. 1
0, 1, 2, 3, 2, 3, 2, 5, 4, 7, 4, 7, 2, 3, 2, 9, 2, 7, 6, 7, 8, 3, 2, 15, 6, 9, 10, 11, 4, 17, 4, 17, 4, 9, 8, 15, 2, 5, 10, 15, 2, 13, 4, 11, 6, 3, 2, 19, 8, 15, 2, 11, 2, 19, 12, 19, 8, 11, 4, 19, 4, 5, 14, 33, 6, 13, 6, 17, 2, 25, 2, 31, 2, 9, 12, 11, 6, 29, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

Of course for any n, k being equal to either 1 or n-1 would work.

LINKS

Seiichi Manyama, Table of n, a(n) for n = 1..10000

MAPLE

a:= n-> add(`if`(k&^(n-k)+(n-k)&^k mod n=0, 1, 0), k=1..n-1):

seq(a(n), n=1..100);  # Alois P. Heinz, Aug 06 2021

MATHEMATICA

f[n_] := Block[{c = 0, k = 1}, While[k < n, If[ Mod[ PowerMod[k, n - k, n] + PowerMod[n - k, k, n], n] == 0, c++]; k++]; c]; Array[f@# &, 100]

PROG

(Python)

def a(n): return sum((k**(n-k) + (n-k)**k)%n == 0 for k in range(1, n))

print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Jul 31 2021

(PARI) a(n) = sum(k=1, n-1, Mod(k, n)^(n-k) + Mod(n-k, n)^k == 0); \\ Michel Marcus, Aug 06 2021

CROSSREFS

Cf. A114977, A114978, A114979, A114980, A114981.

Sequence in context: A077600 A120223 A282691 * A265577 A251103 A065559

Adjacent sequences:  A346741 A346742 A346743 * A346745 A346746 A346747

KEYWORD

easy,nonn

AUTHOR

Robert G. Wilson v, Jul 31 2021

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 June 27 07:47 EDT 2022. Contains 354890 sequences. (Running on oeis4.)