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.

A259234 Smallest b > 1 not occurring earlier in the sequence such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).

This page as a plain text file.
%I A259234 #35 Jul 20 2015 20:53:36
%S A259234 5,8,7,18,3,19,38,28,42,14,115,76,51,75,53,338,137,264,143,11,306,31,
%T A259234 99,184,107,181,43,164,96,68,62,58,161,328,313,78,226,65,253,259,532,
%U A259234 298,176,276,284,174,165,69,330,44,33,332,94,263,48,79,171,747,731
%N A259234 Smallest b > 1 not occurring earlier in the sequence such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).
%C A259234 Is this a permutation of the positive integers > 1?
%H A259234 Alois P. Heinz, <a href="/A259234/b259234.txt">Table of n, a(n) for n = 1..10000</a>
%p A259234 g:= proc() false end:
%p A259234 a:= proc(n) option remember; local b, p, pm, pp;
%p A259234       if n>0 then a(n-1); p:= ithprime(n); pm:=p-1; pp:= p^2;
%p A259234       for b from 2 while g(b) or b &^ pm mod pp <> 1 do od;
%p A259234       g(b):= true; b fi
%p A259234     end:
%p A259234 seq(a(n), n=1..100);  # _Alois P. Heinz_, Jul 20 2015
%t A259234 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 *)
%o A259234 (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], ", "))
%o A259234 (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
%Y A259234 Cf. A039678.
%K A259234 nonn
%O A259234 1,1
%A A259234 _Felix Fröhlich_, Jun 29 2015