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!)
A065589 Smallest prime beginning with exactly n 6's. 3

%I #20 Sep 06 2023 06:58:05

%S 2,61,661,6661,666607,666667,66666629,66666667,666666667,6666666661,

%T 66666666667,6666666666629,66666666666629,666666666666631,

%U 66666666666666047,66666666666666601,6666666666666666059,666666666666666661,66666666666666666601,66666666666666666667

%N Smallest prime beginning with exactly n 6's.

%H David A. Corneth, <a href="/A065589/b065589.txt">Table of n, a(n) for n = 0..700</a> (first 201 terms from M. F. Hasler)

%t Do[a = Table[6, {n}]; k = 0; While[b = FromDigits[ Join[a, IntegerDigits[k] ]]; First[ IntegerDigits[k]] == 6 || !PrimeQ[b], k++ ]; Print[b], {n, 1, 17} ]

%o (PARI) a(n) = {if(n==0, return(2)); my(cs = 60*(10^n\9), pow10 = 10); for(i = 1, oo, np = cs; d = 0; while(d < pow10, np = nextprime(np + 1); d = np - cs; if(d < pow10 && digits(d)[1] != 6 || 10*d < pow10, return(np))); cs*=10; pow10*=10)} \\ _David A. Corneth_, Sep 06 2023

%Y Cf. A037065, A065584, A065585, A065586, A065587, A065588, (this sequence), A065590, A065591, A065592.

%K nonn,base

%O 0,1

%A _Robert G. Wilson v_, Nov 28 2001

%E Corrected by _Don Reble_, Jan 17 2007

%E Offset corrected by _Sean A. Irvine_, Sep 06 2023

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 May 2 17:46 EDT 2024. Contains 372203 sequences. (Running on oeis4.)