login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A030457 Numbers n such that n concatenated with n+1 is prime. 3
2, 6, 8, 12, 36, 42, 50, 56, 62, 68, 78, 80, 90, 92, 96, 102, 108, 120, 126, 138, 150, 156, 180, 186, 188, 192, 200, 216, 242, 246, 252, 270, 276, 278, 300, 308, 312, 318, 330, 338, 342, 350, 362, 368, 378, 390, 402, 410, 416, 420, 426, 428, 432 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

E.g. 1213 is prime, therefore 12 is a term.

MAPLE

concat:=proc(a, b) local bb: bb:=nops(convert(b, base, 10)): 10^bb*a+b end proc: a:=proc(n) if isprime(concat(n, n+1))=true then n else end if end proc: seq(a(n), n=0..500); - Emeric Deutsch (deutsch(AT)duke.poly.edu), Nov 23 2007

MATHEMATICA

Select[ Range[500], PrimeQ[ ToExpression[ StringJoin[ ToString[#], ToString[#+1]]]]&] (* From Jean-François Alcover, Nov 18 2011 *)

PROG

(Haskell)

a030457 n = a030457_list !! (n-1)

a030457_list = filter ((== 1) . a010051 . ct) [2, 4..] where

   ct n = read $ show n ++ (show $ succ n)

-- Reinhard Zumkeller, Apr 26 2011

(Pari) for(n=1, 10^5, if(isprime(eval(concat(Str(n), n+1))), print1(n, ", "))); /* Joerg Arndt, Apr 27 2011 */

CROSSREFS

Cf. A030458, A054211, A052089, A052087, A052088.

Sequence in context: A082473 A113462 A065392 * A168247 A186703 A054248

Adjacent sequences:  A030454 A030455 A030456 * A030458 A030459 A030460

KEYWORD

nonn,base,nice

AUTHOR

Patrick De Geest (pdg(AT)worldofnumbers.com)

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 19:13 EST 2012. Contains 206085 sequences.