Search: a032619 -id:a032619
|
|
A030457
|
|
Numbers k such that k concatenated with k+1 is prime.
|
|
+10
8
|
|
|
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;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
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, Nov 23 2007
|
|
MATHEMATICA
|
Select[ Range[500], PrimeQ[ ToExpression[ StringJoin[ ToString[#], ToString[#+1]]]]&] (* Jean-François Alcover, Nov 18 2011 *)
Select[Range[500], PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ #+1]]]]&] (* Harvey P. Dale, Dec 23 2015 *)
Position[#[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Partition[Range[ 500], 2, 1], _?PrimeQ]//Flatten (* Harvey P. Dale, Jul 14 2019 *)
|
|
PROG
|
(Haskell)
a030457 n = a030457_list !! (n-1)
a030457_list = filter ((== 1) . a010051' . a001704) [1..]
(PARI) for(n=1, 10^5, if(isprime(eval(concat(Str(n), n+1))), print1(n, ", "))); /* Joerg Arndt, Apr 27 2011 */
(Magma) [n: n in [1..500] | IsPrime(Seqint(Intseq(n+1) cat Intseq(n)))]; // Vincenzo Librandi, Jul 23 2016
(Python)
from sympy import isprime
def ok(n): return isprime(int(str(n)+str(n+1)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,nice
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A032627
|
|
Primes that are concatenations of n with n + 4.
|
|
+10
0
|
|
|
37, 59, 1721, 2731, 3539, 3943, 4549, 4751, 6367, 6569, 8387, 9397, 99103, 113117, 123127, 147151, 149153, 173177, 185189, 203207, 209213, 213217, 219223, 227231, 239243, 249253, 255259, 263267, 267271, 285289, 287291
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.009 seconds
|