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!)
A030470 Numbers k such that k concatenated with k+1, k+2, k+3 is prime. 3

%I #18 Jul 28 2021 04:17:46

%S 4,14,20,34,58,64,118,140,148,176,196,218,220,236,238,268,278,286,316,

%T 334,374,386,398,428,430,436,446,460,470,496,508,514,550,566,568,590,

%U 610,616,634,644,670,674,688,706,718,728,740,746,764,770

%N Numbers k such that k concatenated with k+1, k+2, k+3 is prime.

%C All terms must be even; otherwise k+3 would be an even number and thus the concatenation of k, k+1, k+2, and k+3 would not be prime. - _Harvey P. Dale_, Jul 05 2021

%H Robert Israel, <a href="/A030470/b030470.txt">Table of n, a(n) for n = 1..10000</a>

%e 4567 is prime, so 4 is a term.

%p dcat:= proc(x,y) 10^(1+ilog10(y))*x+y end proc:

%p filter:= proc(n) isprime(dcat(n,dcat(n+1,dcat(n+2,n+3)))) end proc:

%p select(filter, [seq(i,i=2..1000,2)]); # _Robert Israel_, Apr 01 2021

%t Select[2*Range[400],PrimeQ[FromDigits[Flatten[IntegerDigits/@(Range[ 0,3]+#)]]]&] (* _Harvey P. Dale_, Jul 05 2021 *)

%o (PARI) is(n)=isprime(eval(Str(n,n+1,n+2,n+3))) \\ _Charles R Greathouse IV_, Jun 12 2017

%K nonn,base

%O 1,1

%A _Patrick De Geest_

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 March 29 11:14 EDT 2024. Contains 371278 sequences. (Running on oeis4.)