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.

A384953 First of three consecutive primes whose concatenations, both forward and backward, are primes.

This page as a plain text file.
%I A384953 #13 Jun 14 2025 18:41:34
%S A384953 313,359,383,449,619,787,827,907,1697,2503,2521,2857,3673,3853,4139,
%T A384953 4363,4993,5281,5527,5563,5641,5851,6037,6043,6719,7019,7477,9281,
%U A384953 10177,10459,13799,14009,15013,15511,17167,17209,19183,19423,20483,20743,21397,21407,25111
%N A384953 First of three consecutive primes whose concatenations, both forward and backward, are primes.
%H A384953 Robert Israel, <a href="/A384953/b384953.txt">Table of n, a(n) for n = 1..10000</a>
%e A384953 a(3) = 383 is a term because 383, 389 and 397 are consecutive primes and both 383389397 and 397389383 are prime.
%p A384953 rcat:= proc(L) local x,i;
%p A384953   x:= L[1];
%p A384953   for i from 2 to nops(L) do
%p A384953     x:= 10^(1+ilog10(x))*L[i] + x
%p A384953   od;
%p A384953   x
%p A384953 end proc:
%p A384953 fcat:= proc(L) local x,i;
%p A384953   x:= L[1];
%p A384953   for i from 2 to nops(L) do
%p A384953     x:= 10^(1+ilog10(L[i]))*x + L[i]
%p A384953   od;
%p A384953   x
%p A384953 end proc:
%p A384953 P:= select(isprime,[seq(i,i=3..30000,2)]):
%p A384953 J:=  select(i -> isprime(rcat(P[i..i+2])) and isprime(fcat(P[i..i+2])), [$1..nops(P)-2]):
%p A384953 P[J];
%Y A384953 Cf. A030469, A104328.
%K A384953 nonn,base
%O A384953 1,1
%A A384953 _Robert Israel_, Jun 13 2025