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.

A140292 a(n) is a square mod a(n-1), a(n) > a(n-1) and a(n) semiprime.

Original entry on oeis.org

4, 9, 10, 14, 15, 21, 22, 25, 26, 35, 39, 49, 51, 55, 69, 82, 86, 87, 91, 95, 106, 115, 119, 121, 122, 123, 133, 134, 143, 146, 155, 159, 166, 169, 178, 183, 187, 202, 203, 219, 235, 249, 253, 254, 262, 265, 274, 278, 287, 289, 291, 295, 299, 302, 303, 309, 327
Offset: 1

Views

Author

Jonathan Vos Post, May 24 2008

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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]];
    semiprimeQ[n_] := PrimeOmega[n] == 2;
    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]]]]];
    Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Jan 28 2024, after R. J. Mathar *)

Extensions

Corrected and extended by R. J. Mathar, May 31 2008