login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109197 Minimal value of k > 0 such that n^2 + k^2 is semiprime. 10

%I #11 Mar 04 2018 03:07:06

%S 2,3,9,1,3,1,7,3,1,1,11,1,1,3,3,1,3,3,11,1,9,2,1,2,11,1,3,4,1,1,1,2,7,

%T 5,1,1,7,4,5,1,7,2,1,2,1,1,1,3,1,1,1,1,1,2,5,2,5,4,1,1,1,1,1,2,1,1,5,

%U 7,3,1,9,1,11,4,3,2,1,2,1,1,1,14,5,2,5,1,1,5,1,6,7,2,1,2,7,1,1,6,13,8,1

%N Minimal value of k > 0 such that n^2 + k^2 is semiprime.

%F a(n) = minimal value of k > 0 such that n^2 + k^2 is semiprime.

%e a(0) = 2 because 0^2 + 1^2 = 1 is not semiprime, but 0^2 + 2^2 = 4 = 2^2 is.

%e a(1) = 3 because 1^2 + 1^2 and 1^2 + 2^2 are not semiprime, but 1^2 + 3^2 = 10 = 2 * 5 is semiprime.

%e a(81) = 14 because 81^2 + 14^2 = 6757 = 29 * 233 and for no smaller k>0 is 81^2 + k^2 a semiprime.

%e a(100) = 1 because 100^2 + 1^2 = 10001 = 73 * 137.

%t k2sp[n_]:=Module[{k=1},While[PrimeOmega[n^2+k^2]!=2,k++];k]; Array[ k2sp,110,0] (* _Harvey P. Dale_, Oct 30 2016 *)

%o (PARI) A109197(n)={local(r);r=1;while(bigomega(n^2+r^2)<>2,r=r+1);r} \\ _Michael B. Porter_, May 13 2010

%Y Cf. A001358, A108714.

%K easy,nonn

%O 0,1

%A _Jonathan Vos Post_, Jun 21 2005

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 22:42 EDT 2024. Contains 372297 sequences. (Running on oeis4.)