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.

A032662 a(n) is the least k such that k concatenated with k + n is prime.

This page as a plain text file.
%I A032662 #15 Sep 05 2024 17:10:23
%S A032662 1,2,1,4,3,12,1,2,1,2,3,6,1,6,3,4,5,4,5,8,7,2,21,10,17,2,1,2,3,4,1,2,
%T A032662 7,14,3,4,1,2,1,2,11,6,5,18,3,4,3,6,1,2,1,8,5,4,7,2,1,4,5,4,11,2,1,4,
%U A032662 3,12,1,2,9,2,3,6,1,8,9,2,3,6,1,2,1,2,5,4,929,6,3,4,5,12,1,2,1
%N A032662 a(n) is the least k such that k concatenated with k + n is prime.
%C A032662 First terms of sequences '1', A030457, A032617-A032624, continued with displacements d > 9.
%H A032662 Robert Israel, <a href="/A032662/b032662.txt">Table of n, a(n) for n = 0..10000</a>
%e A032662 a(22) = 21: the concatenation of 21 and 21 + 22 = 43 is 2143 and this is a prime.
%p A032662 tcat:= (a,b) -> a*10^(1+ilog10(b))+b:
%p A032662 f:= proc(n) local k;
%p A032662   for k from 1 + (n mod 2) by 2 do
%p A032662      if isprime(tcat(k,k+n)) then return k fi
%p A032662   od;
%p A032662 end proc:
%p A032662 map(f, [$0..100]); # _Robert Israel_, Sep 05 2024
%Y A032662 Cf. A032663.
%K A032662 nonn,base,look
%O A032662 0,2
%A A032662 _Patrick De Geest_, May 15 1998
%E A032662 Edited by _Robert Israel_, Sep 05 2024