login
Square array read by antidiagonals downwards: A(n, 1) = second Wieferich prime to base n and A(n, k) = second Wieferich prime to base A(n, k-1) for k > 1.
3

%I #17 Feb 03 2017 21:52:23

%S 3511,19,1006003,7,11,3511,491531

%N Square array read by antidiagonals downwards: A(n, 1) = second Wieferich prime to base n and A(n, k) = second Wieferich prime to base A(n, k-1) for k > 1.

%e Array starts:

%e 3511, 19, 7, 491531, ...

%e 1006003, 11, ...

%e 3511, 19, 7, 491531, ...

%e 20771, 18043, ...

%e 534851, 5, 20771, 18043, ...

%o (PARI) secondwieftobase(n) = my(i=0); forprime(p=1, , if(Mod(n, p^2)^(p-1)==1, if(i==0, i++, return(p))))

%o table(rows, cols) = for(x=2, rows+1, my(i=0, w=secondwieftobase(x)); while(i < cols, print1(w, ", "); w=secondwieftobase(w); i++); print(""))

%o table(2, 3)

%Y Cf. A178871, A281001.

%K nonn,tabl,more

%O 2,1

%A _Felix Fröhlich_, Jan 12 2017