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.

A280721 a(n) is the n-th b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).

This page as a plain text file.
%I A280721 #21 Jun 25 2021 02:23:19
%S A280721 5,10,24,31,81,89,134,127,255,267,430,476,744,424,629,895,1105,1079,
%T A280721 1301,1331,1440,2092,1451,2466,2488,2140,3326,2638,2815,3517,4345,
%U A280721 4138,4505,4659,5571,6021,5383,5460,6071,6844,8434,7076,8961,10215,7522,9817,11499
%N A280721 a(n) is the n-th b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).
%C A280721 Main diagonal of A244249.
%C A280721 There are exactly p-1 residue classes b mod p^2 for which b^(p-1) == 1 (mod p^2), of which p-2 will be greater than 1. p-2 > n for n > 3, so a(n) < prime(n)^2 for n > 2 (case n = 3 is fortuitous). - _Charles R Greathouse IV_, Jun 23 2021
%H A280721 Robert Israel, <a href="/A280721/b280721.txt">Table of n, a(n) for n = 1..1000</a>
%F A280721 a(n) < prime(n)^2 for n > 2, see comments. - _Charles R Greathouse IV_, Jun 23 2021
%e A280721 For n=2, prime(2)=3, 10^1 == 1 (mod 9), 10^2 == 1 (mod 9), a(2) = 10. - _N. J. A. Sloane_, Jan 14 2017
%p A280721 f:= proc(n) local p,S,nS,r;
%p A280721    p:= ithprime(n);
%p A280721    S:= sort(map(t -> rhs(op(t)), [msolve(b^(p-1)=1, p^2)]));
%p A280721    nS:= nops(S);
%p A280721    r:= (n mod nS)+1;
%p A280721    S[r] + (n+1-r)/nS*p^2;
%p A280721 end proc:
%p A280721 map(f, [$1..100]); # _Robert Israel_, Jan 09 2017
%t A280721 Table[Function[p, Select[Range[p^2 + 1], PowerMod[#, p - 1, p^2] == 1 &][[n + 1]]]@ Prime@ n, {n, 47}] (* _Michael De Vlieger_, Jan 09 2017 *)
%o A280721 (PARI) base(p, n) = my(b=2, i=0); while(1, if(Mod(b, p^2)^(p-1)==1, i++); if(i==n, return(b)); b++)
%o A280721 a(n) = base(prime(n), n)
%Y A280721 Cf. A244249, A259909.
%K A280721 nonn
%O A280721 1,1
%A A280721 _Felix Fröhlich_, Jan 07 2017