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.

A244862 List of pairs of prime numbers (p,q) starting with (2, 3) such that p || q (where || denotes concatenation) is a prime number and the sequence is always extended with the smallest prime not yet present in the sequence.

This page as a plain text file.
%I A244862 #70 Jul 03 2024 20:06:40
%S A244862 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 A244862 89,101,97,103,107,137,109,139,113,131,127,157,149,173,151,163,179,
%U A244862 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,313,373,347,359,349,379,353
%N A244862 List of pairs of prime numbers (p,q) starting with (2, 3) such that p || q (where || denotes concatenation) is a prime number and the sequence is always extended with the smallest prime not yet present in the sequence.
%H A244862 Paolo P. Lava, <a href="/A244862/b244862.txt">Table of n, a(n) for n = 1..1000</a>
%e A244862 The first few pairs are (2,3),(5,23),(7,19),(11,17),(13,61),(29,53), ..., giving the primes 23, 523, 719, 1117, 1361, 2953, ...
%p A244862 with(numtheory):nn:=60:lst:={2,3}: printf ( "%d %d \n",2,3):
%p A244862    for a from 2 to nn do:
%p A244862      p:=ithprime(a):ii:=0:
%p A244862       for b from 1 to nn while(ii=0)do:
%p A244862         q:=ithprime(b):s:=p*10^(length(q))+q:
%p A244862          if type(s,prime)=true and lst intersect {p,q}={}
%p A244862           then
%p A244862           lst:=lst union {p,q}:ii:=1:printf(`%d, `,p):printf(`%d, `,q):
%p A244862           else
%p A244862         fi:
%p A244862       od:
%p A244862     od:
%p A244862 [I have been informed that this program may be incorrect. - _N. J. A. Sloane_, Jul 03 2024]
%p A244862 # alternative version
%p A244862 P:=proc(q) local a,b,k,i,j,n,ok; a:=[2,3];
%p A244862 for n from 1 to q do k:=3; ok:=1; for i do if ok=1 then k:=nextprime(k);
%p A244862 if numboccur(k,a)=0 then b:=k;
%p A244862 for j from k do k:=nextprime(k); if numboccur(k,a)=0 then
%p A244862 if isprime(b*10^length(k)+k) then a:=[op(a),b,k]; ok:=0; break; fi; fi; od; fi;
%p A244862 else break;fi; od; od; print(op(a)); end: P(500);	# _Paolo P. Lava_, Jul 03 2024
%Y A244862 Cf. A000040, A105184.
%Y A244862 A373794 is a very similar sequence (they first differ at term 69).
%K A244862 nonn,base,tabf
%O A244862 1,1
%A A244862 _Michel Lagneau_, Jul 25 2014
%E A244862 Edited by _N. J. A. Sloane_, Jul 03 2024. More than the usual number of terms are shown in order to distinguish this from A373794.