cp's OEIS Frontend

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.

A385729 Number of nonnegative values s < n such that (-s) == (-s)^s == s^s (mod n).

This page as a plain text file.
%I A385729 #15 Jul 20 2025 15:40:30
%S A385729 1,1,1,0,1,2,1,0,1,2,2,1,3,3,1,0,1,2,2,1,3,3,1,1,1,4,1,1,2,4,1,0,2,2,
%T A385729 4,1,2,3,3,1,1,4,3,1,1,3,1,1,1,2,1,2,2,2,3,2,3,3,2,3,2,3,1,0,3,5,2,1,
%U A385729 2,6,3,1,1,4,3,1,3,4,2,1,1,3,2,3,3,4,1,1,1,4,4,2,3,3,2,1,1,2,3,1
%N A385729 Number of nonnegative values s < n such that (-s) == (-s)^s == s^s (mod n).
%t A385729 a[n_] := Count[Range[0, n-1], _?(PowerMod[#, #, n] == PowerMod[-#, #, n] == Mod[-#, n] &)]; Array[a, 100] (* _Amiram Eldar_, Jul 15 2025 *)
%o A385729 (Magma) [1] cat [#[s: s in [0..n-1] | Modexp(s, s, n) eq n-s and Modexp(-s, s, n) eq n-s]: n in [2..100]];
%o A385729 (PARI) a(n) = sum(s=0, n-1, (-s == Mod(s, n)^s) && (-s == Mod(-s, n)^s)); \\ _Michel Marcus_, Jul 09 2025
%Y A385729 Cf. A065392, A384781, A385540, A385731.
%K A385729 nonn
%O A385729 1,6
%A A385729 _Juri-Stepan Gerasimov_, Jul 08 2025