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.

A387400 Number of nonnegative s < n such that s^s == s^n (mod n).

Original entry on oeis.org

1, 1, 1, 2, 1, 4, 2, 3, 3, 5, 1, 7, 2, 6, 8, 7, 3, 8, 2, 9, 7, 5, 2, 12, 5, 6, 9, 11, 2, 15, 3, 15, 8, 7, 9, 13, 2, 8, 8, 17, 5, 18, 3, 11, 14, 7, 2, 24, 9, 13, 10, 14, 1, 20, 11, 17, 9, 8, 1, 27, 4, 9, 19, 31, 15, 18, 3, 12, 10, 22, 2, 23, 5, 9, 17, 13, 16, 23, 4, 33, 26, 10, 1, 31, 13, 9, 12, 20, 4, 27
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Aug 28 2025

Keywords

Crossrefs

Programs

  • Magma
    [#[s: s in [0..n-1] | Modexp(s,s,n) eq Modexp(s,n,n)]: n in [1..90]];
    
  • PARI
    a(n) = sum(s=0, n-1, Mod(s,n)^n == Mod(s, n)^s); \\ Michel Marcus, Aug 30 2025