cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A238331 The prime(n)-th prime number ending in prime(n), or 0 if none exists.

This page as a plain text file.
%I A238331 #11 Feb 28 2014 13:44:49
%S A238331 0,23,0,107,2411,3413,5417,4919,5923,8629,9931,10937,14741,14243,
%T A238331 16747,18553,19259,22961,24767,28571,24373,31079,29483,33589,35597,
%U A238331 498101,475103,528107,555109,570113,607127,641131,659137,717139,756149,786151,754157,817163
%N A238331 The prime(n)-th prime number ending in prime(n), or 0 if none exists.
%C A238331 The first number ending in prime(n) is, of course, prime(n). The numbers 2 and 5 are zero because there are no additional primes ending in those numbers; they are the numbers divisible by 2 or 5.
%H A238331 T. D. Noe, <a href="/A238331/b238331.txt">Table of n, a(n) for n = 1..200</a>
%e A238331 23 is the third prime ending with 3.
%e A238331 107 is the seventh prime ending in 7.
%e A238331 2411 is the 11th prime ending in 11.
%e A238331 3413 is the 13th prime ending in 13 -- a very unlucky prime.
%t A238331 ps = Prime[Range[PrimePi[1000000]]]; t = {}; p = 1; done = False; While[! done,p = NextPrime[p]; len = Length[IntegerDigits[p]]; s = Select[ps, Mod[#, 10^len] == p &, p]; If[Length[s] < p, If[MemberQ[{2, 5}, p], AppendTo[t, 0], done = True], AppendTo[t, s[[-1]]]]]; t
%Y A238331 Cf. A000040 (prime numbers).
%Y A238331 Cf. A030431, A030432, A167442 (primes ending in 3, 7, 11).
%K A238331 nonn,base
%O A238331 1,2
%A A238331 _T. D. Noe_, Feb 27 2014