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!)
A068660 Primes formed from the concatenation of k, k+1 and k for some k. 3
787, 9109, 111211, 131413, 333433, 373837, 394039, 414241, 474847, 575857, 596059, 616261, 697069, 717271, 777877, 798079, 818281, 838483, 101102101, 103104103, 129130129, 149150149, 181182181, 187188187, 189190189, 191192191, 193194193, 207208207, 217218217 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Harvey P. Dale)
MAPLE
ncat:= (a, b) -> a*10^(1+ilog10(b))+b:
select(isprime, [seq(ncat(n, ncat(n+1, n)), n=1..1000, 2)]); # Robert Israel, Oct 23 2015
MATHEMATICA
concat[n_]:=Module[{idn=IntegerDigits[n]}, FromDigits[Join[idn, IntegerDigits[ n+1], idn]]]; Select[concat/@Range[200], PrimeQ] (* Harvey P. Dale, Aug 20 2014 *)
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 *)
Select[Table[FromDigits[Join[Flatten[IntegerDigits[{n, n + 1, n}]]]], {n, 200}], PrimeQ] (* Vincenzo Librandi, Sep 28 2015 *)
PROG
(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
(PARI) for(n=1, 1e3, if(isprime(k=eval(Str(n, n+1, n))), print1(k", "))) \\ Altug Alkan, Sep 28 2015
(Python)
from sympy import isprime
def aupto(N):
return [t for t in (int(str(k)+str(k+1)+str(k)) for k in range(1, N+1, 2)) if isprime(t)]
print(aupto(217)) # Michael S. Branicky, Jul 09 2021
CROSSREFS
These are the primes in A261618. - M. F. Hasler, Nov 25 2015
Sequence in context: A031896 A045231 A267476 * A097775 A321210 A072730
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 01 2002
STATUS
approved

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 May 11 06:26 EDT 2024. Contains 372388 sequences. (Running on oeis4.)