login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1) = 2; for n>1, a(n) is the least prime with all prime digits which is == 1 (mod a(n-1)).
0

%I #14 Mar 29 2015 23:00:22

%S 2,3,7,337,32353,7727255227,23523352753755575323

%N a(1) = 2; for n>1, a(n) is the least prime with all prime digits which is == 1 (mod a(n-1)).

%C a(7) > 2*10^19. - _Robert G. Wilson v_, Nov 27 2004

%C a(8) > 2*10^32. - _Jon E. Schoenfield_, Mar 29 2015

%e a(4) = 337, a(5) = 32353 == 1 (mod 337).

%t a[1] = 2; a[n_] := a[n] = Block[{k = 1, p = a[n - 1]}, While[ !PrimeQ[k*p + 1] || Union[ Join[{2, 3, 5, 7}, IntegerDigits[k*p + 1]]] != {2, 3, 5, 7}, k++ ]; k*p + 1]; Table[ a[n], {n, 6}] (* _Robert G. Wilson v_, Nov 27 2004 *)

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Nov 25 2004

%E a(6) from _Robert G. Wilson v_, Nov 27 2004

%E a(7) from _Jon E. Schoenfield_, Mar 29 2015