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.

A034812 Concatenation of 'prevprime(k) and k and prevprime(k)' is a prime.

This page as a plain text file.
%I A034812 #14 Aug 13 2024 22:53:52
%S A034812 5,8,9,12,14,17,19,23,25,28,31,33,38,39,41,42,47,48,51,60,61,62,63,69,
%T A034812 71,72,75,77,78,80,81,84,85,91,102,104,105,111,124,126,149,150,167,
%U A034812 181,182,189,192,194,215,222,227,230,233,242,243,256,271,273,283,288,308
%N A034812 Concatenation of 'prevprime(k) and k and prevprime(k)' is a prime.
%H A034812 Andrew Howroyd, <a href="/A034812/b034812.txt">Table of n, a(n) for n = 1..10000</a>
%e A034812 n=222 -> previous prime is 211, thus '211222211' is a prime.
%t A034812 okQ[n_] := Module[{idppn=IntegerDigits[NextPrime[n,-1]]}, PrimeQ[FromDigits[Join[idppn, IntegerDigits[n], idppn]]]]; Select[Range[350], okQ] (* _Harvey P. Dale_, Jan 07 2011 *)
%o A034812 (PARI) isok(n)=my(x=digits(precprime(n-1))); n>2 && isprime(fromdigits(concat([x, digits(n), x]))) \\ _Andrew Howroyd_, Aug 13 2024
%Y A034812 Cf. A034808-A034821.
%K A034812 nonn,base
%O A034812 1,1
%A A034812 _Patrick De Geest_, Oct 15 1998
%E A034812 Offset changed by _Andrew Howroyd_, Aug 13 2024