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.

A077202 a(1) = 1, a(n) = smallest number such that the concatenation of two successive terms gives a prime which has not occurred earlier.

This page as a plain text file.
%I A077202 #16 Jan 14 2025 01:53:05
%S A077202 1,1,3,1,7,1,9,7,3,7,9,11,3,11,17,3,13,1,27,1,37,3,17,9,19,1,39,7,19,
%T A077202 3,31,19,7,27,7,33,7,39,11,23,3,47,9,29,3,49,1,49,9,37,9,41,9,47,21,1,
%U A077202 51,13,19,9,53,23,9,67,3,53,33,13,21,11,29,17,21,13,27,11,51,19,13,61
%N A077202 a(1) = 1, a(n) = smallest number such that the concatenation of two successive terms gives a prime which has not occurred earlier.
%C A077202 Conjecture: Every odd prime occurs in this sequence infinitely many times.
%H A077202 Alois P. Heinz, <a href="/A077202/b077202.txt">Table of n, a(n) for n = 1..10000</a>
%p A077202 b:= proc() true end:
%p A077202 a:= proc(n) option remember; local h, k, p;
%p A077202       if n=1 then 1
%p A077202     else h:= a(n-1);
%p A077202          for k do p:=parse(cat(h,k));
%p A077202            if b(p) and isprime(p) then break fi
%p A077202          od; b(p):= false; k
%p A077202       fi
%p A077202     end:
%p A077202 seq(a(n), n=1..100);  # _Alois P. Heinz_, Sep 18 2015
%o A077202 (PARI) A077202(nmax)= { local(a,tst,hadp,hSet) ; a=[1] ; hadp=[1] ; for(n=2,nmax, for(new=1,10000, tst=Str(eval(a[n-1]) eval(new)) ; tst=eval(tst) ; if(isprime(tst), hSet=Set(hadp) ; if( setsearch(hSet,tst)==0, hadp=concat(hadp,tst) ; a=concat(a,new) ; break ; ) ; ) ; ) ; ) ; return(a) ; } { print(A077202(80)) ; } \\ _R. J. Mathar_, May 19 2006
%Y A077202 Cf. A082238.
%K A077202 base,nonn
%O A077202 1,3
%A A077202 _Amarnath Murthy_, Nov 02 2002
%E A077202 Corrected and extended by _R. J. Mathar_, May 19 2006
%E A077202 Offset corrected by _Alois P. Heinz_, Sep 18 2015