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!)
A281684 Least composite k such that the concatenation of n consecutive composites, starting from k, is a prime. 2
8, 138, 87, 88, 14, 122, 121, 70, 21, 206, 405, 94, 15, 82, 195, 27, 729, 266, 358, 136, 318, 592, 18, 342, 202, 1182, 268, 155, 85, 292, 386, 888, 295, 551, 892, 118, 63, 95, 696, 1497, 315, 400, 954, 574, 33, 72, 85, 1377, 140, 1417, 158, 448, 994, 1370, 3399 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
COMMENTS
If k = 1 is allowed then a(27) = 1 and a(50) = 1.
From Michel Marcus, Mar 06 2021: (Start)
Some small values:
a(2) = 8 = A002808(3);
a(646) = 10 = A002808(5);
a(14662) = 12 = A002808(6) [Hans Havermann];
a(6) = 14 = A002808(7);
a(14) = 15 = A002808(8);
a(302) = 16 = A002808(9);
a(24) = 18 = A002808(10);
a(1388) = 20 = A002808(11) [seqfan user cwwuieee]. (End)
Records: 8, 138, 206, 405, 729, 1182, 1497, 3399, 3588, 8097, 11064, 11076, 12806, 28089, 35084, 37912, 39897, 45330, 50828, 76589, ..., . - Robert G. Wilson v, Mar 12 2021
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..1000 (terms 2..250 from Paolo P. Lava, terms 201..500 from Michel Marcus).
Seqfan thread, Reversing A281684, March 2021.
EXAMPLE
a(2) = 8 because the next composite after 8 is 9: concat(8, 9) = 89 is prime and 8 is the least number with this property;
a(3) = 138 because the next composites after 138 are 140, 141: concat(138, 140, 141) = 138140141 is prime and 138 is the least number with this property.
MAPLE
with(numtheory): P:=proc(q) local a, b, i, j, k, n; for n from 2 to q do
for k from 1 to q do if not isprime(k) then a:=k; b:=a; j:=1; while j<n do j:=j+1; i:=1;
while isprime(b+i) do i:=i+1; od; a:=a*10^(ilog10(b+i)+1)+b+i; b:=b+i; od;
if isprime(a) then print(k); break; fi; fi; od; od; end: P(10^9);
MATHEMATICA
With[{c = Select[Range[10^5], CompositeQ]}, Table[k = 1; While[! PrimeQ@ FromDigits@ Flatten@ IntegerDigits@ Take[c, {k, k + n}], k++]; c[[k]], {n, 55}]] (* Michael De Vlieger, Jan 27 2017 *)
NextComposite[n_Integer /; n > -1] := If[-1 < n < 3, 4, If[ PrimeQ[n + 1], n + 2, n + 1]]; a[n_] := Block[{k = 4}, While[ !PrimeQ[ FromDigits[ Flatten[ IntegerDigits[ NestList[ NextComposite, k, n - 1]]]]], k = NextComposite@ k]; k]; Array[a, 55, 2] (* Robert G. Wilson v, Mar 12 2021 *)
PROG
(PARI) nextc(c, n) = {my(vc = vector(n), j = 2, x = c+1); vc[1] = c; while (j <= n, if (!isprime(x), vc[j] = x; j++); x++; ); vc; }
isok(vc) = {my(x=""); for (i=1, #vc, x = concat(x, Str(vc[i]))); ispseudoprime(eval(x)); }
a(n) = {forcomposite(c=4, oo, my(vc = nextc(c, n)); if (isok(vc), return(c)); ); } \\ Michel Marcus, Mar 03 2021
(PARI) {inv_A281684(n, L=oo, k=1)=forcomposite(c=1+n=A002808(n), L, k++; ispseudoprime(n=n*10^(logint(c, 10)+1)+c)&&return(k))} \\ "reversed function" (cf. comments): Find the least k such that the concatenation of k composites, starting with the n-th composite, yield a prime. 2nd optional arg allows to specify a search limit L, then an empty/zero result means that k > L. - M. F. Hasler, Aug 07 2021
CROSSREFS
Sequence in context: A136472 A145404 A101388 * A050789 A274669 A187236
KEYWORD
nonn,base
AUTHOR
Paolo P. Lava, Jan 27 2017
STATUS
approved

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)