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.

A030458 Primes formed by concatenating n with n+1.

Original entry on oeis.org

23, 67, 89, 1213, 3637, 4243, 5051, 5657, 6263, 6869, 7879, 8081, 9091, 9293, 9697, 102103, 108109, 120121, 126127, 138139, 150151, 156157, 180181, 186187, 188189, 192193, 200201, 216217, 242243, 246247, 252253, 270271, 276277, 278279, 300301, 308309, 312313, 318319
Offset: 1

Views

Author

Keywords

Comments

Primes in A030656.

Crossrefs

Programs

  • Magma
    [m: n in [2..270 by 2] | IsPrime(m) where m is Seqint(Intseq(n+1) cat Intseq(n))];  // Bruno Berselli, Jun 18 2011
    
  • Mathematica
    Select[Table[FromDigits[Join[Flatten[IntegerDigits[{n,n+1}]]]],{n,270}],PrimeQ] (* Jayanta Basu, May 16 2013 *)
  • PARI
    forstep(n=2,1e3,2,if(isprime(k=eval(Str(n,n+1))),print1(k", "))) \\ Charles R Greathouse IV, Jun 18 2011
    
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from filter(isprime, (int(str(k)+str(k+1)) for k in count(2, 2)))
    print(list(islice(agen(), 38))) # Michael S. Branicky, Aug 05 2022