A307639 Irregular array T(n, k) read by rows, where row n lists the members of n-th Fermat pseudoprime tuple. Rows are arranged first by size of largest term, then by increasing length of row, then in lexicographic order.
9, 8, 15, 14, 21, 20, 21, 10, 9, 8, 25, 24, 27, 26, 28, 9, 28, 27, 26, 9, 28, 27, 26, 25, 28, 27, 26, 25, 8, 9, 28, 27, 26, 25, 8, 21, 10, 9, 33, 32, 33, 8, 21, 10, 33, 32, 25, 8, 21, 10, 33, 32, 25, 28, 9, 8, 21, 10, 33, 32, 25, 28, 27, 26, 9, 8, 21, 10
Offset: 1
Examples
Irregular array starts as follows: 9, 8 15, 14 21, 20 21, 10, 9, 8 25, 24 27, 26 28, 9 28, 27, 26, 9 28, 27, 26, 25 28, 27, 26, 25, 8, 9 28, 27, 26, 25, 8, 21, 10, 9 33, 32 33, 8, 21, 10 33, 32, 25, 8, 21, 10 33, 32, 25, 28, 9, 8, 21, 10 33, 32, 25, 28, 27, 26, 9, 8, 21, 10 35, 34 35, 34, 33, 32, 25, 6 35, 9, 28, 27, 26, 25, 6 35, 34, 21, 10, 33, 32, 25, 6 35, 9, 8, 21, 10, 33, 32, 25, 6 35, 34, 21, 10, 9, 28, 27, 26, 25, 6 35, 34, 33, 8, 9, 28, 27, 26, 25, 6 35, 34, 21, 10, 33, 8, 9, 28, 27, 26, 25, 6 35, 34, 33, 8, 21, 10, 9, 28, 27, 26, 25, 6 39, 38 The composites 21, 10, 9 and 8 satisfy the congruences 21^(10-1) == 1 (mod 10), 10^(9-1) == 1 (mod 9), 9^(8-1) == 1 (mod 8) and 8^(21-1) == 1 (mod 21), so 21, 10, 9, 8 is a row of the array.
Crossrefs
Cf. A317721.
Programs
-
PARI
addtovec(vec) = my(w=[], vmax=0); for(t=1, #vec, if(vecmax(vec[t]) > vmax, vmax=vecmax(vec[t]))); for(k=1, #vec, forcomposite(c=1, vmax, if(Mod(vec[k][#vec[k]], c)^(c-1)==1, w=concat(w, [0]); w[#w]=concat(vec[k], [c])))); 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]], for(t=1, #vec[k]-1, print1(vec[k][t], ", ")); print(""))) forcomposite(c=1, 40, my(v=[[c]]); while(#v > 0, v=addtovec(v); printfromvec(v); v=removefromvec(v)))
Comments