OFFSET
1,1
COMMENTS
No primes can be formed from {1,2,3,4,5} or {4,5,6,7,8} since they are divisible by three.
Sequence is finite, ending with a(52)=96857.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..52 (full sequence)
MAPLE
A156119:={}: for s from 0 to 5 do l:=combinat[permute]([$(s..(s+4))]): for k from 1 to 120 do if(k>=25 or s>=1)then n:=add(10^(5-j)*l[k][j], j=1..5): if(isprime(n))then A156119 := A156119 union {n}: fi: fi: od: od: op(A156119); # Nathaniel Johnston, Jun 23 2011
MATHEMATICA
Flatten[Table[Select[FromDigits/@Permutations[Range[n, n+4]], IntegerLength[#]==5 && PrimeQ[#]&], {n, 0, 5}]]//Sort (* Harvey P. Dale, Mar 01 2023 *)
CROSSREFS
KEYWORD
nonn,base,easy,fini,full
AUTHOR
Ki Punches, Feb 14 2009
EXTENSIONS
Edited and extended by Ray Chandler, Feb 16 2009
STATUS
approved