login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Least multiple of 2n-1 ending in prime(n), 0 if no such number exists.
2

%I #8 Dec 05 2013 19:57:14

%S 2,3,5,7,711,913,117,0,323,1729,231,437,0,243,1247,1953,759,0,3367,

%T 3471,2173,2279,0,4089,2597,28101,45103,0,2109,18113,43127,40131,0,

%U 1139,22149,34151,37157,0,13167,62173,37179,17181,0,38193,33197,17199,86211

%N Least multiple of 2n-1 ending in prime(n), 0 if no such number exists.

%C If prime(n) has k digits then a(n) == prime(n) (mod 10^k); a(8r+5) = 0 for r > 1.

%e a(5) = 711, ending in 11 = prime(n) and 711 == 0 (mod 9, the fifth odd number).

%o (PARI) a(n) = {if (((n >=8) && ((n-8) % 5 == 0)), return (0)); k = 1; tn = 2*n-1; p = prime(n); tp = 10^length(Str(p)); while ((k*tn) % tp != p, k++); return (k*tn);} \\ _Michel Marcus_, Sep 15 2013

%Y Cf. A114781.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, Nov 17 2005

%E More terms from _Joshua Zucker_, May 05 2006