login
A259234
Smallest b > 1 not occurring earlier in the sequence such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).
2
5, 8, 7, 18, 3, 19, 38, 28, 42, 14, 115, 76, 51, 75, 53, 338, 137, 264, 143, 11, 306, 31, 99, 184, 107, 181, 43, 164, 96, 68, 62, 58, 161, 328, 313, 78, 226, 65, 253, 259, 532, 298, 176, 276, 284, 174, 165, 69, 330, 44, 33, 332, 94, 263, 48, 79, 171, 747, 731
OFFSET
1,1
COMMENTS
Is this a permutation of the positive integers > 1?
LINKS
MAPLE
g:= proc() false end:
a:= proc(n) option remember; local b, p, pm, pp;
if n>0 then a(n-1); p:= ithprime(n); pm:=p-1; pp:= p^2;
for b from 2 while g(b) or b &^ pm mod pp <> 1 do od;
g(b):= true; b fi
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 20 2015
MATHEMATICA
f[n_] := f[n] = Block[{b = 2, p = Prime@ n, lst = Array[f, n - 1]}, While[ PowerMod[b, p - 1, p^2] != 1 || MemberQ[lst, b], b++]; b]; Array[f, 60] (* Robert G. Wilson v, Jul 12 2015 *)
PROG
(PARI) v=vector(1); forprime(p=1, 50, b=2; while(Mod(b, p^2)^(p-1)!=1, b++; if(Mod(b, p^2)^(p-1)==1, for(k=1, #v, if(b==v[k], b++)))); v=concat(v, b); print1(v[#v], ", "))
(PARI) A259234=List(); for(n=1, 500, my(p=prime(n), b=1); until(Mod(b++, p^2)^(p-1)==1 && !setsearch(Set(A259234), b), ); listput(A259234, b); /*print1(b", ")*/) \\ M. F. Hasler, Jul 20 2015
CROSSREFS
Cf. A039678.
Sequence in context: A314569 A314570 A039678 * A131040 A231786 A007450
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Jun 29 2015
STATUS
approved