OFFSET
1,1
COMMENTS
Not a permutation of the primes. 5 never appears, since numbers m mod 10 = 5 are divisible by 5, and concatenation of 2 previous terms and 5 guarantee a composite number. - Michael De Vlieger, Feb 16 2022
LINKS
Haines Hoag, Table of n, a(n) for n = 1..31499
Michael De Vlieger, Scatterplot of a(n) for n = 1..2^14, showing records in red and local minima (aside from q = 5, which never appears) in blue.
EXAMPLE
From Michael De Vlieger, Feb 16 2022: (Start)
a(3) = 11 since 235 and 237 are composite, but 2311 is prime.
a(4) = 23 since 3115, 3117, 31113, 31117, and 31119 are composite, but 31123 is prime.
a(5) = 31 since 11235, 11237, 112313, 112317, 112319, and 112329 are composite, but 112331 is prime. (End)
MATHEMATICA
a[1]=2; a[2]=3; a[n_]:=a[n]=(k=2; While[!PrimeQ[FromDigits@Join[Flatten[IntegerDigits/@{a[n-2], a[n-1]}], IntegerDigits@k]]||MemberQ[Array[a, n-1], k], k=NextPrime@k]; k); Array[a, 54] (* Giorgos Kalogeropoulos, Jan 19 2022 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Haines Hoag, Jan 18 2022
STATUS
approved