login
Primes ending in a (different) prime.
2

%I #11 Jul 10 2013 20:17:25

%S 13,17,23,37,43,47,53,67,73,83,97,103,107,113,127,131,137,157,163,167,

%T 173,179,193,197,211,223,227,229,233,241,257,263,271,277,283,293,307,

%U 311,313,317,331,337,347,353,359,367,373,379,383,389,397

%N Primes ending in a (different) prime.

%H Reinhard Zumkeller, <a href="/A038680/b038680.txt">Table of n, a(n) for n = 1..10000</a>

%t ds[n_] := NestWhileList[FromDigits[Rest[IntegerDigits[#]]] &, n, # > 9 &]; Select[Prime[Range[5, 80]], Or @@ PrimeQ /@ Rest[ds[#]] &] (* _Jayanta Basu_, Jul 10 2013 *)

%o (Haskell)

%o import Data.List (tails)

%o a038680 n = a038680_list !! (n-1)

%o a038680_list = filter (any ((== 1) . a010051. read) .

%o init . tail . tails . show) a000040_list

%o -- _Reinhard Zumkeller_, Jul 10 2013

%Y Cf. A033664, A010051, A000040.

%K nonn,base,easy

%O 1,1

%A _N. J. A. Sloane_.

%E Missing a(19)=163 added by _Jayanta Basu_