login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A089778 a(n) is the n-th prime that ends with prime(n), or 0 if there do not exist n primes ending with prime(n). 2
2, 13, 0, 47, 911, 1213, 2417, 1619, 1723, 2729, 2131, 3137, 4241, 4643, 3947, 4153, 4759, 5861, 4967, 6271, 6173, 6379, 6883, 7589, 7297, 98101, 97103, 104107, 108109, 129113, 130127, 122131, 174137, 136139, 131149, 150151, 172157, 147163 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

EXAMPLE

a(5) = 911 because prime(5) = 11 and the first 5 primes ending with 11 are 11, 211, 311, 811 and 911.

a(3) = 0 because prime(3) = 5 and only 1 prime ends with 5.

MAPLE

f:= proc(n) local p, d, k, count;

p:= ithprime(n);

d:= 10^(ilog10(p)+1);

count:= 1;

for k from 1 while count < n do

   if isprime(k*d+p) then count:= count+1 fi

od;

(k-1)*d+p

end proc:

f(3):= 0:

map(f, [$1..100]); # Robert Israel, Dec 10 2017

PROG

(PARI) a(n) = if(n == 3, return(0)); my(p = prime(n), d = 10^(logint(p, 10)+1), i = 1); for(x=0, +oo, if(isprime(x*d+p), i++; if(i > n, return(x*d+p)))); \\ Iain Fox, Dec 10 2017

CROSSREFS

Sequence in context: A130769 A128033 A090954 * A088253 A249224 A217010

Adjacent sequences:  A089775 A089776 A089777 * A089779 A089780 A089781

KEYWORD

base,nonn,easy

AUTHOR

Amarnath Murthy, Nov 24 2003

EXTENSIONS

Corrected and extended by David Wasserman, Oct 12 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 02:48 EDT 2020. Contains 334836 sequences. (Running on oeis4.)