login
A317920
Length of row n of A317721, i.e., number of elements in n-th Wieferich tuple when ordering the tuples as in A317721.
8
3, 5, 6, 7, 6, 7, 3, 8, 9, 9, 10, 10, 11, 9, 2, 3, 6, 9, 10, 11, 12, 13, 14, 3, 3, 4, 4, 5, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12
OFFSET
1,1
EXAMPLE
For n = 1: Row 1 of A317721 has 3 elements, i.e., the first Wieferich tuple listed in A317721 is a "Wieferich triple", so a(1) = 3.
PROG
(PARI) addtovec(vec) = my(w=[], vmax=0); for(t=1, #vec, if(vecmax(vec[t]) > vmax, vmax=vecmax(vec[t]))); for(k=1, #vec, forprime(q=1, vmax, if(Mod(vec[k][#vec[k]], q^2)^(q-1)==1, w=concat(w, [0]); w[#w]=concat(vec[k], [q])))); w
removefromvec(vec) = my(w=[]); for(k=1, #vec, if(vecsort(vec[k])==vecsort(vec[k], , 8), w=concat(w, [0]); w[#w]=vec[k])); w
printfromvec(vec) = for(k=1, #vec, if(vec[k][1]==vec[k][#vec[k]], print1(#vec[k]-1, ", ")))
forprime(p=1, , my(v=[[p]]); while(#v > 0, v=addtovec(v); printfromvec(v); v=removefromvec(v)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Felix Fröhlich, Aug 21 2018
STATUS
approved