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-2 of 2 results.

A077254 a(n) = prime(n)^n mod n.

Original entry on oeis.org

0, 1, 2, 1, 1, 1, 3, 1, 8, 1, 9, 1, 2, 1, 8, 1, 8, 1, 10, 1, 13, 15, 14, 1, 7, 9, 1, 9, 22, 19, 3, 1, 26, 9, 4, 1, 9, 7, 5, 1, 15, 1, 19, 9, 17, 41, 23, 1, 31, 1, 11, 1, 29, 1, 23, 9, 8, 13, 41, 1, 39, 41, 55, 1, 53, 31, 63, 13, 8, 1, 69, 1, 2, 9, 49, 5, 16, 25, 6, 1, 80, 39, 16, 1, 29, 83
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2002

Keywords

Comments

a(A077255(n)) = 1.

Examples

			a(13) = prime(13)^13 mod 13 = 41^13 mod 13 = 925103102315013629321 mod 13 = 2.
		

Crossrefs

a(n) = A062457(n) mod n, A077256, A000040, A000027.

Programs

  • Maple
    a:= n-> ithprime(n) &^ n mod n:
    seq(a(n), n=1..100);  # Alois P. Heinz, Dec 07 2012
  • Mathematica
    Table[PowerMod[Prime[n], n, n], {n, 100}] (* Zak Seidov, Dec 07 2012 *)

A077255 Numbers k such that prime(k)^k == 1 (mod k).

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 12, 14, 16, 18, 20, 24, 27, 32, 36, 40, 42, 48, 50, 52, 54, 60, 64, 70, 72, 80, 84, 96, 100, 105, 108, 110, 114, 120, 121, 124, 125, 126, 128, 136, 144, 148, 156, 160, 162, 168, 180, 181, 182, 189, 192, 200, 210, 216, 220, 231, 234, 240, 243, 246
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2002

Keywords

Comments

Contains A023143. All terms not in A023143 are in A060679. - Robert Israel, Oct 31 2016

Examples

			prime(16)^16 mod 16 = 53^16 mod 16 = 3876269050118516845397872321 mod 16 = 1, therefore 16 is a term.
		

Crossrefs

Programs

  • Maple
    select(n -> ithprime(n) &^ n mod n = 1, [$1..1000]); # Robert Israel, Oct 31 2016
  • Mathematica
    Select[Range[1000], PowerMod[Prime[#], #, #] == 1&] (* Jean-François Alcover, Dec 16 2021 *)
  • PARI
    isok(k) = lift(Mod(prime(k), k)^k) == 1; \\ Michel Marcus, Dec 16 2021

Formula

A077254(a(n)) = 1; A077256(n) = A000040(a(n)).
Showing 1-2 of 2 results.