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.

A373794 a(1) = 2; thereafter a(n+1) is the smallest prime not yet in the sequence such that the concatenation a(n) || a(n+1) is prime if n is odd, or composite if n is even.

This page as a plain text file.
%I A373794 #28 Jul 09 2025 05:04:25
%S A373794 2,3,5,23,7,19,11,17,13,61,29,53,31,37,41,59,43,73,47,83,67,79,71,167,
%T A373794 89,101,97,103,107,137,109,139,113,131,127,157,149,173,151,163,179,
%U A373794 233,181,193,191,227,197,257,199,211,223,229,239,251,241,271,263,269,277,331,281,317,283,397,293,311,307,337,347,359,313,373,353,389,349
%N A373794 a(1) = 2; thereafter a(n+1) is the smallest prime not yet in the sequence such that the concatenation a(n) || a(n+1) is prime if n is odd, or composite if n is even.
%C A373794 First differs from A244862 at n = 69.
%H A373794 Paolo P. Lava, <a href="/A373794/b373794.txt">Table of n, a(n) for n = 1..1000</a>
%p A373794 P:=proc(q) local a,k,i,n,t; a:=[2]; for n from 1 to q do k:=1;
%p A373794 if frac(n/2)>0 then t:=1; else t:=0; fi;
%p A373794 for i do k:=nextprime(k); if numboccur(k,a)=0 then if t=1 then
%p A373794 if isprime(a[n]*10^length(k)+k) then a:=[op(a),k]; break; fi;
%p A373794 else if not isprime(a[n]*10^length(k)+k) then a:=[op(a),k]; break;
%p A373794 fi; fi; fi; od; od; print(op(a)); end: P(10^3); # _Paolo P. Lava_, Jul 03 2024
%Y A373794 Cf. A244862.
%K A373794 nonn,base
%O A373794 1,1
%A A373794 _N. J. A. Sloane_, Jul 03 2024, based on an email from _Paolo P. Lava_
%E A373794 More than the usual number of terms are shown in order to distinguish this from A244862.