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.
%I A030457 #54 Apr 19 2023 08:08:10 %S A030457 2,6,8,12,36,42,50,56,62,68,78,80,90,92,96,102,108,120,126,138,150, %T A030457 156,180,186,188,192,200,216,242,246,252,270,276,278,300,308,312,318, %U A030457 330,338,342,350,362,368,378,390,402,410,416,420,426,428,432 %N A030457 Numbers k such that k concatenated with k+1 is prime. %C A030457 k is not congruent to 1 (mod 2), 1 (mod 3), or 4 (mod 5). - _Charles R Greathouse IV_, Apr 16 2012 %H A030457 Reinhard Zumkeller, <a href="/A030457/b030457.txt">Table of n, a(n) for n = 1..10000</a> %e A030457 1213 is prime, therefore 12 is a term. %p A030457 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 %t A030457 Select[ Range[500], PrimeQ[ ToExpression[ StringJoin[ ToString[#], ToString[#+1]]]]&] (* _Jean-François Alcover_, Nov 18 2011 *) %t A030457 Select[Range[500],PrimeQ[FromDigits[Join[IntegerDigits[#], IntegerDigits[ #+1]]]]&] (* _Harvey P. Dale_, Dec 23 2015 *) %t A030457 Position[#[[1]]*10^IntegerLength[#[[2]]]+#[[2]]&/@Partition[Range[ 500], 2,1],_?PrimeQ]//Flatten (* _Harvey P. Dale_, Jul 14 2019 *) %o A030457 (Haskell) %o A030457 a030457 n = a030457_list !! (n-1) %o A030457 a030457_list = filter ((== 1) . a010051' . a001704) [1..] %o A030457 -- _Reinhard Zumkeller_, Jun 27 2015, Apr 26 2011 %o A030457 (PARI) for(n=1,10^5,if(isprime(eval(concat(Str(n),n+1))),print1(n,", "))); /* _Joerg Arndt_, Apr 27 2011 */ %o A030457 (Magma) [n: n in [1..500] | IsPrime(Seqint(Intseq(n+1) cat Intseq(n)))]; // _Vincenzo Librandi_, Jul 23 2016 %o A030457 (Python) %o A030457 from sympy import isprime %o A030457 def ok(n): return isprime(int(str(n)+str(n+1))) %o A030457 print([k for k in range(500) if ok(k)]) # _Michael S. Branicky_, Apr 19 2023 %Y A030457 Cf. A030458, A054211, A052089, A052087, A052088. %Y A030457 Cf. A010051, A001704, A068700 (subsequence). %Y A030457 Numbers k such that k concatenated with k+m is prime: this sequence (m=1), A032617 (m=2), A032618 (m=3), A032619 (m=4), A032620 (m=5), A032621 (m=6), A032622 (m=7), A032623 (m=8), A032624 (m=9). %K A030457 nonn,base,nice %O A030457 1,1 %A A030457 _Patrick De Geest_