OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
n | a(n) | prime(n)
-----+--------+---------
1 | 23 | 2
2 | 13 | 3
3 | 53 | 5
4 | 17 | 7
5 | 101 | 11
6 | 31 | 13
7 | 71 | 17
8 | 109 | 19
9 | 223 | 23
10 | 229 | 29
....
26 | 1013 | 101
27 | 1013 | 103
28 | 701 | 107
29 | 1009 | 109
30 | 131 | 113
31 | 271 | 127
32 | 311 | 131 .
PROG
(Haskell)
a199713 n = f ps where
f (q:qs) = if sort (show q) `contains` sort (show p) then q else f qs
contains _ [] = True
contains [] _ = False
contains (u:us) vs'@(v:vs) | u == v = contains us vs
| otherwise = contains us vs'
p : ps = drop (n-1) a000040_list
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Nov 09 2011
STATUS
approved