login

Revision History for A259234

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing entries 1-10 | older changes
Smallest b > 1 not occurring earlier in the sequence such that p = prime(n) satisfies b^(p-1) == 1 (mod p^2).
(history; published version)
#35 by OEIS Server at Mon Jul 20 20:53:36 EDT 2015
LINKS

Alois P. Heinz, <a href="/A259234/b259234_2.txt">Table of n, a(n) for n = 1..10000</a>

#34 by Alois P. Heinz at Mon Jul 20 20:53:36 EDT 2015
STATUS

editing

approved

Discussion
Mon Jul 20
20:53
OEIS Server: Installed new b-file as b259234.txt.  Old b-file is now b259234_2.txt.
#33 by Alois P. Heinz at Mon Jul 20 20:53:01 EDT 2015
LINKS

Alois P. Heinz, <a href="/A259234/b259234_2.txt">Table of n, a(n) for n = 1..10000</a>

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

STATUS

approved

editing

#32 by M. F. Hasler at Mon Jul 20 16:34:21 EDT 2015
STATUS

editing

approved

#31 by M. F. Hasler at Mon Jul 20 16:33:27 EDT 2015
LINKS

Felix Fröhlich, <a href="/A259234/b259234.txt">Table of n, a(n) for n = 1..10000</a>

STATUS

approved

editing

Discussion
Mon Jul 20
16:34
M. F. Hasler: removed incorrect b-file.
(It had a(490)=2 but a(183)=2 already. In reality a(490)=4.)
#30 by N. J. A. Sloane at Mon Jul 20 14:07:30 EDT 2015
STATUS

proposed

approved

#29 by M. F. Hasler at Mon Jul 20 12:47:50 EDT 2015
STATUS

editing

proposed

#28 by M. F. Hasler at Mon Jul 20 12:44:36 EDT 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++)))); w=[b]; v=concat(v, wb); print1(v[#v], ", "))

(PARI) A259234=[]List(); for(n=1, 500, my(p=prime(n), b=1, S=Set(A259234)); until(!setsearch(S, b++) && Mod(b, ++, p^2)^(p-1)==1, ); && !setsearch(Set(A259234=concat), b), ); listput(A259234, b); /*print1(b", ")*/) \\ M. F. Hasler, Jul 20 2015

STATUS

proposed

editing

Discussion
Mon Jul 20
12:47
M. F. Hasler: Used List(), just to change one more thing. Indeed much faster that way round (first check congruence, then whether already earlier in the sequence).
#27 by M. F. Hasler at Mon Jul 20 12:33:47 EDT 2015
STATUS

editing

proposed

#26 by M. F. Hasler at Mon Jul 20 12:33:26 EDT 2015
PROG

(PARI) A259234=[]; for(n=1, 500, my(p=prime(n), b=1, S=Set(A259234)); until(!setsearch(S, b++) && Mod(b, p^2)^(p-1)==1, ); A259234=concat(A259234, b); /*print1(b", ")*/) \\ M. F. Hasler, Jul 20 2015

STATUS

approved

editing

Discussion
Mon Jul 20
12:33
M. F. Hasler: my code also yields a(490)=4.