OFFSET
1,1
COMMENTS
Is this sequence finite?
EXAMPLE
a(1) = 2 and 2 + 7 = 9 (composite);
a(2) = 7 and 7 + 3 = 10 (composite);
a(3) = 3 and 3 + 5 = 8 (composite);
a(4) = 5 and 5 + 1 = 6 (composite);
a(5) = 11 and 11 + 1 = 12 (composite); etc.
PROG
(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
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Sep 18 2023
EXTENSIONS
More terms from David A. Corneth, Sep 19 2023
STATUS
approved