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.
%I A140292 #12 Jan 28 2024 09:19:50 %S A140292 4,9,10,14,15,21,22,25,26,35,39,49,51,55,69,82,86,87,91,95,106,115, %T A140292 119,121,122,123,133,134,143,146,155,159,166,169,178,183,187,202,203, %U A140292 219,235,249,253,254,262,265,274,278,287,289,291,295,299,302,303,309,327 %N A140292 a(n) is a square mod a(n-1), a(n) > a(n-1) and a(n) semiprime. %p A140292 isqResid := proc(n,modp) local x ; for x from 1 to floor(modp/2) do if x^2 mod modp = n mod modp then RETURN(true) ; fi ; od: RETURN(false) ; end: isA001358 := proc(n) RETURN( numtheory[bigomega](n)= 2) ; end: A140292 := proc(n) option remember ; local a; if n = 1 then 4; else for a from A140292(n-1)+1 do if isA001358(a) and isqResid(a,A140292(n-1)) then RETURN(a) ; fi ; od ; fi ; end: seq(A140292(n),n=1..80) ; # _R. J. Mathar_, May 31 2008 %t A140292 quadResQ[n_, p_] := Module[{x}, For[x = 1, x <= Floor[p/2], x++, If[Mod[x^2, p] == Mod[n, p], Return[True]]]; Return[False]]; %t A140292 semiprimeQ[n_] := PrimeOmega[n] == 2; %t A140292 a[n_] := a[n] = Module[{k}, If[n == 1, 4, For[k = a[n - 1] + 1, True, k++, If[semiprimeQ[k] && quadResQ[k, a[n - 1]], Return[k]]]]]; %t A140292 Table[a[n], {n, 1, 80}] (* _Jean-François Alcover_, Jan 28 2024, after _R. J. Mathar_ *) %Y A140292 Cf. A001358, A034794, A088190. %K A140292 easy,nonn %O A140292 1,1 %A A140292 _Jonathan Vos Post_, May 24 2008 %E A140292 Corrected and extended by _R. J. Mathar_, May 31 2008