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.

A376006 Record values in A032662.

This page as a plain text file.
%I A376006 #7 Sep 06 2024 20:17:58
%S A376006 2,4,12,21,929,938,9500,99204,9990074,99999981142,999999998621256,
%T A376006 99999999999999896026031
%N A376006 Record values in A032662.
%C A376006 a(n) is the least k for which the concatenation k || k + A376002(n) is prime.
%F A376006 a(n) = A032662(A376002(n)).
%e A376006 a(5) = 929 because A376002(5) = 84 and A032662(84) = 929.  Thus 84 + 929 = 1013, the concatenation 9291013 is prime, the concatenations k || k+84 are composite for 1 <= k < 929, and for every m < 84 there is k < 929 where k || k+m is prime.
%p A376006 tcat:= (a, b) -> a*10^(1+ilog10(b))+b:
%p A376006 f:= proc(n) local k, k0, d;
%p A376006   for d from ilog10(n)+1 do
%p A376006     if igcd(10^d+1, n) = 1 then
%p A376006       k0:= max(1, 10^(d-1)-n);
%p A376006       if (k0+n)::even then k0:= k0+1 fi;
%p A376006       for k from k0 to 10^d-n-1 by 2 do
%p A376006         if isprime(tcat(k, k+n)) then return k fi
%p A376006    od fi od
%p A376006 end proc:
%p A376006 V:= NULL: m:= 0: count:= 0:
%p A376006 for i from 1 while count < 11 do
%p A376006   v:= f(i);
%p A376006   if v > m then
%p A376006     count:= count+1; m:= v; V:= V, v;
%p A376006   fi;
%p A376006 od:
%p A376006 V;
%Y A376006 Cf. A032662, A376002.
%K A376006 nonn,base,more
%O A376006 1,1
%A A376006 _Robert Israel_, Sep 05 2024