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.

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)).

A077256 Primes p such that p^k == 1 modulo k, where p=prime(k).

Original entry on oeis.org

3, 7, 11, 13, 19, 29, 37, 43, 53, 61, 71, 89, 103, 131, 151, 173, 181, 223, 229, 239, 251, 281, 311, 349, 359, 409, 433, 503, 541, 571, 593, 601, 619, 659, 661, 683, 691, 701, 719, 769, 827, 857, 911, 941, 953, 997, 1069, 1087, 1091, 1129, 1163, 1223, 1291
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 31 2002

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(t) local p; p:= ithprime(t); if p&^ t mod t = 1 then p else NULL fi end proc:
    map(g, [$1..1000]); # Robert Israel, Oct 31 2016
  • Mathematica
    With[{no=250}, Transpose[Select[Partition[Riffle[Prime[Range[no]], Range[no]],2], PowerMod[First[#],Last[#],Last[#]]==1&]][[1]]]  (* Harvey P. Dale, Jan 05 2011 *)
    Prime[Select[Range[250], PowerMod[Prime[#],#,#]==1&]]

Formula

A077254(A049084(a(n))) = 1.
a(n) = A000040(A077255(n)).
Showing 1-2 of 2 results.