%I #8 Sep 25 2023 08:48:27
%S 2,7,3,5,11,13,17,19,23,29,31,37,53,41,43,59,47,71,61,73,79,67,83,89,
%T 97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,
%U 181,191,193,197,199,211,223,227,307,229,233,239,311,313,241,251,257,263
%N Lexicographically earliest permutation of the prime numbers such that a(n) + [the next digit] is a composite.
%C Is this sequence finite?
%e a(1) = 2 and 2 + 7 = 9 (composite);
%e a(2) = 7 and 7 + 3 = 10 (composite);
%e a(3) = 3 and 3 + 5 = 8 (composite);
%e a(4) = 5 and 5 + 1 = 6 (composite);
%e a(5) = 11 and 11 + 1 = 12 (composite); etc.
%o (PARI) upto(n) = {my(res = List([2]), leftover = vector(n), proceed = 1); forprime(p = 3, n, leftover[p] = 1); while(proceed, forprime(i = 2, n, if(leftover[i] && !isprime(res[#res] + digits(i)[1]), listput(res, i); leftover[i] = 0; next(2))); proceed = 0); res} \\ _David A. Corneth_, Sep 19 2023
%Y Cf. A365769, A365780, A365781.
%K nonn,base
%O 1,1
%A _Eric Angelini_, Sep 18 2023
%E More terms from _David A. Corneth_, Sep 19 2023