OFFSET
1,1
EXAMPLE
a(2) = 439, two successive positive integers 4,3 in descending order followed by a 9.
a(4) = 262524239 four successive positive integers 26,25,24,23 in descending order followed by a 9.
MATHEMATICA
a[n_]:=If[Mod[n, 3]==0, 0, (For[m=1, (v={}; Do[v=Join[v, IntegerDigits[k]], {k, m+n-1, m, -1}]); !PrimeQ[10FromDigits[v]+9], m++ ]; 10FromDigits[v]+9)]; Table[a[n], {n, 16}] - Farideh Firoozbakht.
f[n_] := Block[{t = Reverse@Range@n}, If[ Mod[n, 3] == 0, 0, While[p = FromDigits@Flatten@IntegerDigits@Join[t, {9}]; !PrimeQ@p, t++ ]; p]]; Array[f, 16] (* Robert G. Wilson v *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Jan 01 2006
EXTENSIONS
STATUS
approved