cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

4, 14, 20, 34, 58, 64, 118, 140, 148, 176, 196, 218, 220, 236, 238, 268, 278, 286, 316, 334, 374, 386, 398, 428, 430, 436, 446, 460, 470, 496, 508, 514, 550, 566, 568, 590, 610, 616, 634, 644, 670, 674, 688, 706, 718, 728, 740, 746, 764, 770
Offset: 1

Views

Author

Keywords

Comments

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

Examples

			4567 is prime, so 4 is a term.
		

Programs

  • Maple
    dcat:= proc(x,y) 10^(1+ilog10(y))*x+y end proc:
    filter:= proc(n) isprime(dcat(n,dcat(n+1,dcat(n+2,n+3)))) end proc:
    select(filter, [seq(i,i=2..1000,2)]); # Robert Israel, Apr 01 2021
  • Mathematica
    Select[2*Range[400],PrimeQ[FromDigits[Flatten[IntegerDigits/@(Range[ 0,3]+#)]]]&] (* Harvey P. Dale, Jul 05 2021 *)
  • PARI
    is(n)=isprime(eval(Str(n,n+1,n+2,n+3))) \\ Charles R Greathouse IV, Jun 12 2017