Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #16 Dec 06 2021 11:48:20
%S 14,11,6,5,8,3,2,1,4,11,2,1,8,5,10,3,2,3,4,3,4,1,4,3,4,3,2,1,2,1,4,3,
%T 10,1,2,3,2,13,6,3,4,1,2,1,6,1,6,1,6,1,2,1,2,5,2,3,12,1,6,1,16,1,4,1,
%U 2,3,8,3,2,7,4,7,2,9,2,1,4,1,2,1,22,5,2,5,6,1,2,1,18,5,4,1,2,7,6,1,2,3,8,1,6,1,8,1,4,1,4,1,4,15,12,13,4
%N a(n) = A099610(n) - n^2.
%C a(n) > 0 follows from the definition of A099610.
%H Harvey P. Dale, <a href="/A349806/b349806.txt">Table of n, a(n) for n = 1..1000</a>
%t Module[{nn=120,p2p},p2p=Union[Times@@@Subsets[Prime[Range[2,PrimePi[ Ceiling[ nn^2/3]]]],{2}]];Table[SelectFirst[p2p,#>n^2&]-n^2,{n,nn}]] (* _Harvey P. Dale_, Dec 06 2021 *)
%o (Python)
%o from itertools import count
%o from sympy import factorint
%o def A349806(n):
%o for i in count(n**2+(n%2)+1,2):
%o fs = factorint(i)
%o if len(fs) == 2 == sum(fs.values()):
%o return i-n**2 # _Chai Wah Wu_, Dec 05 2021
%Y Cf. A099610.
%K nonn
%O 1,1
%A _N. J. A. Sloane_, Dec 05 2021