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.

Showing 1-10 of 16 results. Next

A065296 Values of n such that A065295(n) = 1.

Original entry on oeis.org

2, 3, 5, 11, 53, 59, 83, 107, 179, 227, 269, 293, 317, 347, 389, 467, 557, 563, 587, 797, 1019, 1109, 1187, 1259, 1283, 1307, 1523, 1579, 1619, 1733, 1907, 2027, 2099, 2459, 2477, 2579, 2693, 2819, 2909, 2957, 2963, 3203, 3413, 3467, 3779, 3803, 3947, 4139
Offset: 1

Views

Author

Jonathan Ayres (jonathan.ayres(AT)btinternet.com), Oct 28 2001

Keywords

Comments

For all these the only value of s such that s^s mod n = s is s=1; all the values appear to be primes.

Crossrefs

Cf. A065295.

Programs

  • PARI
    isok(k) = { for (s=2, k - 1, if (Mod(s, k)^s == s, return(0))); k > 1 } \\ Harry J. Smith, Oct 15 2009

Extensions

Corrected by T. D. Noe, Nov 01 2006

A382752 Numbers k such that A000005(k) = A065295(k).

Original entry on oeis.org

6, 7, 8, 9, 10, 13, 19, 23, 29, 32, 37, 47, 54, 71, 109, 149, 167, 173, 223, 229, 263, 283, 359, 383, 479, 503, 509, 653, 659, 719, 739, 773, 839, 863, 887, 971, 983, 1229, 1319, 1367, 1439, 1487, 1493, 1637, 1699, 1823, 1949, 1997, 2039, 2063, 2207, 2309, 2411, 2447
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 02 2025

Keywords

Examples

			6 is a term because the number of divisors of 6 is equal to 4 (1, 2, 3 and 6) and 1^1 = 1 (mod 6), 2^2 = 4 (mod 6), 3^3 = 27 == 3 (mod 6), 4^4 = 256 == 4 (mod 6), 5^5 + 3125 == 5 (mod 6).
		

Crossrefs

Programs

  • Magma
    [k: k in [2..2500] | #Divisors(k) eq #[s: s in [0..k-1] | s^s mod k eq s]];
    
  • PARI
    isok(k) = numdiv(k) == sum(s=1, k-1, Mod(s, k)^s == s); \\ Michel Marcus, Jun 03 2025

A384854 The number of divisors d of n such that (-d)^d == d (mod n).

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 5, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 2, 1, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 10 2025

Keywords

Crossrefs

Programs

  • Magma
    [1+#[s: s in [1..n-1] | n mod s eq 0 and Modexp((-s), s, n) eq s]: n in [1..100]];
    
  • Maple
    a:= n-> add(`if`((-d)&^d-d mod n=0, 1, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 10 2025
  • PARI
    a(n) = sumdiv(n, d, Mod(-d, n)^d == d); \\ Michel Marcus, Jun 11 2025

Formula

a(n) = 1 + number of proper divisors h of n such that (-h)^h = h (mod n).

A384781 Number of values of s, 0 < s <= n - 1, such that (-s)^s == s (mod n).

Original entry on oeis.org

0, 1, 0, 0, 1, 2, 1, 0, 1, 4, 0, 1, 1, 3, 3, 0, 0, 4, 0, 1, 2, 3, 1, 1, 3, 6, 1, 3, 1, 6, 1, 0, 3, 2, 2, 3, 3, 3, 2, 1, 1, 6, 0, 3, 5, 3, 1, 1, 3, 8, 2, 2, 2, 4, 3, 2, 1, 5, 0, 3, 3, 3, 7, 0, 5, 6, 0, 1, 3, 8, 1, 3, 3, 8, 5, 3, 4, 6, 1, 1, 4, 3, 0, 5, 2, 4, 6, 2, 4, 10, 5, 2, 3, 3, 2, 1, 4, 8, 5, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 09 2025

Keywords

Crossrefs

Cf. A065295, A151821, A373901 (k such that a(k) = 0), A382752, A384854.

Programs

  • Magma
    [#[s: s in [1..n-1] | Modexp((-s),s,n) eq s]: n in [1..100]];
    
  • Maple
    a:= n-> add(`if`((-s)&^s-s mod n=0, 1, 0), s=1..n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2025
  • Mathematica
    a[n_]:=Length[Select[Range[n-1],PowerMod[-#,#,n]==# &]]; Array[a,100] (* Stefano Spezia, Jun 11 2025 *)
  • PARI
    a(n) = sum(s=1, n-1, Mod(-s, n)^s == s); \\ Michel Marcus, Jun 11 2025

A385392 The number of divisors d of n such that -(d^d) == d (mod n).

Original entry on oeis.org

1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 5, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 27 2025

Keywords

Crossrefs

Programs

  • Magma
    [1+#[d: d in [1..n-1] | n mod d eq 0 and Modexp(d, d, n) eq (n-d)]: n in [1..100]]; // Juri-Stepan Gerasimov, Jun 28 2025
  • Maple
    a:= n-> add(`if`(d&^d+d mod n=0, 1, 0), d=numtheory[divisors](n)):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 27 2025
  • Mathematica
    a[n_] := DivisorSum[n, 1 &, PowerMod[#, #, n] == n-# &]; Array[a, 100] (* Amiram Eldar, Jun 27 2025 *)
  • PARI
    a(n) = sumdiv(n, d, -Mod(d, n)^d == d); \\ Michel Marcus, Jun 27 2025
    

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

Original entry on oeis.org

1, 1, 0, 0, 0, 2, 1, 0, 1, 2, 0, 1, 0, 3, 2, 0, 0, 4, 0, 1, 2, 3, 1, 1, 2, 4, 1, 3, 0, 4, 1, 0, 3, 2, 1, 3, 1, 3, 2, 1, 1, 6, 0, 3, 4, 3, 1, 1, 3, 6, 2, 2, 0, 4, 3, 2, 1, 3, 0, 3, 1, 3, 7, 0, 3, 6, 0, 1, 3, 6, 1, 3, 1, 4, 5, 3, 4, 6, 1, 1, 4, 3, 0, 5, 0, 4, 4, 2, 1, 8, 4, 2, 3, 3, 2, 1, 0, 8, 5, 5
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 02 2025

Keywords

Crossrefs

Programs

A233518 Primes p such that x^x == x (mod p) for some number x with 1 < x < p.

Original entry on oeis.org

7, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 61, 67, 71, 73, 79, 89, 97, 101, 103, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 181, 191, 193, 197, 199, 211, 223, 229, 233, 239, 241, 251, 257, 263, 271, 277, 281, 283, 307, 311, 313, 331, 337
Offset: 1

Views

Author

T. D. Noe, Feb 18 2014

Keywords

Comments

Complement of A065296.

Crossrefs

Programs

  • Mathematica
    fQ[p_] := Min[Table[Mod[PowerMod[x, x, p] - x, p], {x, 2, p - 1}]] == 0; Select[Prime[Range[2, 100]], fQ[#] &]

A233519 The number of times x^x == x (mod prime(n)) for x in 0 < x < prime(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 3, 2, 5, 3, 2, 1, 1, 4, 3, 2, 5, 4, 1, 4, 5, 3, 4, 1, 2, 5, 5, 3, 5, 4, 2, 5, 7, 3, 2, 2, 1, 5, 3, 9, 3, 7, 6, 2, 1, 2, 6, 3, 8, 5, 5, 2, 1, 8, 3, 10, 2, 1, 8, 6, 9, 1, 9, 12, 1, 5, 5, 2, 4, 6, 6, 2, 1, 4, 5, 9, 4, 4, 3, 6, 4, 5, 6
Offset: 1

Views

Author

T. D. Noe, Feb 19 2014

Keywords

Comments

This is A065295 restricted to the primes. The plot is significantly different.

Crossrefs

Programs

  • Mathematica
    f[p_] := Module[{x = Range[p - 1]}, Count[PowerMod[x, x, p] - x, 0]]; Table[f[n], {n, Prime[Range[100]]}]

A233520 The number of distinct values of x^x (mod n) - x for x in 0 < x < n.

Original entry on oeis.org

0, 1, 2, 2, 4, 2, 5, 4, 5, 5, 6, 4, 10, 7, 8, 9, 11, 5, 12, 9, 12, 10, 15, 9, 14, 12, 14, 12, 19, 11, 21, 19, 18, 16, 19, 12, 28, 18, 18, 18, 30, 13, 33, 20, 22, 23, 36, 18, 28, 20, 23, 27, 39, 17, 35, 24, 32, 30, 43, 20, 46, 33, 26, 37, 37, 22, 49, 34, 34, 30
Offset: 1

Views

Author

T. D. Noe, Feb 19 2014

Keywords

Comments

According to Kurlberg et al. (who quote Crocker and Somer), for primes p, the count is between floor(sqrt((p-1)/2)) and 3p/4 + O(p^(1/2 + o(1))).
Note that the subtraction is not done mod n. - Robert Israel, Dec 17 2014

Examples

			For n = 5 the a(5) = 4 values are 1-1=0, 4-2=2, 2-3=-1, 1-4=-3. - _Robert Israel_, Dec 17 2014
		

Crossrefs

Programs

  • Maple
    f:= n -> nops({seq((x &^ x mod n - x) , x = 1 .. n-1)}):
    seq(f(n), n=1..100); # Robert Israel, Dec 17 2014
  • Mathematica
    fs[p_] := Module[{x = Range[p - 1]}, Length[Union[PowerMod[x, x, p] - x]]]; Table[fs[n], {n, 100}]
  • PARI
    a(n) = #Set(vector(n-1, j, lift(Mod(j, n)^j) - j)); \\ Michel Marcus, Dec 16 2014

A385103 Number of values of s, 0 < s < n, such that -(s^s) == s (mod n).

Original entry on oeis.org

0, 1, 1, 0, 2, 2, 1, 0, 1, 4, 2, 1, 4, 3, 2, 0, 1, 2, 2, 1, 3, 3, 1, 1, 2, 6, 1, 1, 3, 6, 1, 0, 2, 2, 5, 1, 4, 3, 3, 1, 1, 4, 3, 1, 2, 3, 1, 1, 1, 4, 1, 2, 4, 2, 3, 2, 3, 5, 2, 3, 4, 3, 1, 0, 5, 5, 2, 1, 2, 8, 3, 1, 3, 8, 3, 1, 3, 4, 2, 1, 1, 3, 2, 3, 5, 4, 3, 1, 4, 6, 5, 2, 3, 3, 2, 1, 5, 2, 3, 1
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 17 2025

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(s&^s+s mod n=0, 1, 0), s=1..n-1):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 20 2025
  • PARI
    a(n) = sum(s=1, n-1, -Mod(s, n)^s == s); \\ Michel Marcus, Jun 19 2025
Showing 1-10 of 16 results. Next