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.

A068660 Primes formed from the concatenation of k, k+1 and k for some k.

This page as a plain text file.
%I A068660 #33 Sep 08 2022 08:45:05
%S A068660 787,9109,111211,131413,333433,373837,394039,414241,474847,575857,
%T A068660 596059,616261,697069,717271,777877,798079,818281,838483,101102101,
%U A068660 103104103,129130129,149150149,181182181,187188187,189190189,191192191,193194193,207208207,217218217
%N A068660 Primes formed from the concatenation of k, k+1 and k for some k.
%H A068660 Michael S. Branicky, <a href="/A068660/b068660.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from Harvey P. Dale)
%p A068660 ncat:= (a,b) -> a*10^(1+ilog10(b))+b:
%p A068660 select(isprime, [seq(ncat(n,ncat(n+1,n)),n=1..1000,2)]); # _Robert Israel_, Oct 23 2015
%t A068660 concat[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[Join[idn, IntegerDigits[ n+1],idn]]]; Select[concat/@Range[200],PrimeQ] (* _Harvey P. Dale_, Aug 20 2014 *)
%t A068660 A = Table[(n*10^(Floor[Log[10, 10(n+1)]])+(n+1))*10^(Floor[Log[10, 10(n)]])+n, {n, 1, 120}]; Select[A, PrimeQ] (* _José de Jesús Camacho Medina_, Sep 09 2015 *)
%t A068660 Select[Table[FromDigits[Join[Flatten[IntegerDigits[{n, n + 1, n}]]]], {n, 200}], PrimeQ] (* _Vincenzo Librandi_, Sep 28 2015 *)
%o A068660 (Magma) [m: n in [2..300] | IsPrime(m) where m is Seqint(Intseq(n) cat Intseq(n+1) cat Intseq(n))]; // _Vincenzo Librandi_, Sep 28 2015
%o A068660 (PARI) for(n=1, 1e3, if(isprime(k=eval(Str(n, n+1, n))), print1(k", "))) \\ _Altug Alkan_, Sep 28 2015
%o A068660 (Python)
%o A068660 from sympy import isprime
%o A068660 def aupto(N):
%o A068660   return [t for t in (int(str(k)+str(k+1)+str(k)) for k in range(1, N+1, 2)) if isprime(t)]
%o A068660 print(aupto(217)) # _Michael S. Branicky_, Jul 09 2021
%Y A068660 Cf. A068659, A262205.
%Y A068660 These are the primes in A261618. - _M. F. Hasler_, Nov 25 2015
%K A068660 base,nonn
%O A068660 1,1
%A A068660 _Amarnath Murthy_, Mar 01 2002