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.

This page as a plain text file.
%I A030458 #27 Feb 09 2024 10:09:18
%S A030458 23,67,89,1213,3637,4243,5051,5657,6263,6869,7879,8081,9091,9293,9697,
%T A030458 102103,108109,120121,126127,138139,150151,156157,180181,186187,
%U A030458 188189,192193,200201,216217,242243,246247,252253,270271,276277,278279,300301,308309,312313,318319
%N A030458 Primes formed by concatenating n with n+1.
%C A030458 Primes in A030656.
%H A030458 Paul Tek, <a href="/A030458/b030458.txt">Table of n, a(n) for n = 1..10000</a>
%t A030458 Select[Table[FromDigits[Join[Flatten[IntegerDigits[{n,n+1}]]]],{n,270}],PrimeQ] (* _Jayanta Basu_, May 16 2013 *)
%o A030458 (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
%o A030458 (PARI) forstep(n=2,1e3,2,if(isprime(k=eval(Str(n,n+1))),print1(k", "))) \\ _Charles R Greathouse IV_, Jun 18 2011
%o A030458 (Python)
%o A030458 from sympy import isprime
%o A030458 from itertools import count, islice
%o A030458 def agen(): yield from filter(isprime, (int(str(k)+str(k+1)) for k in count(2, 2)))
%o A030458 print(list(islice(agen(), 38))) # _Michael S. Branicky_, Aug 05 2022
%Y A030458 Cf. A052089, A052087, A052088.
%K A030458 nonn,base
%O A030458 1,1
%A A030458 _Patrick De Geest_