login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A096069 Smallest prime ending in prime(n) and == 1 (mod prime(n)), or 0 if no such prime exists. 0

%I #6 Mar 14 2015 18:40:20

%S 0,13,0,127,2311,313,4217,419,21023,929,13331,30637,5741,16943,10247,

%T 15053,3659,21961,13267,12071,4673,22279,4483,43789,25997,414101,

%U 24103,188107,132109,93113,373127,816131,264137,798139,693149,400151,582157

%N Smallest prime ending in prime(n) and == 1 (mod prime(n)), or 0 if no such prime exists.

%C a(1) = a(3) = 0. Conjecture: No other term is zero.

%C I checked all n's <1450 with each having the required prime form. - _Robert G. Wilson v_, Jun 22 2004

%e a(6) = 1613 is a prime and 1613 ==1 mod (13), prime(6) = 13.

%t f[n_] := Block[{k = 1, l = Floor[ Log[10, Prime[n]] + 1], p = Prime[n]}, If[n == 1 || n == 3, 0, While[ !PrimeQ[k*10^l + p] || Mod[k*10^l + p, p] != 1, k++ ]; k*10^l + p]]; Table[ f[n], {n, 37}] (* _Robert G. Wilson v_, Jun 22 2004 *)

%K base,nonn

%O 1,2

%A _Amarnath Murthy_, Jun 20 2004

%E Edited, corrected and extended by _Robert G. Wilson v_, Jun 22 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 10:59 EDT 2024. Contains 371997 sequences. (Running on oeis4.)