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.

A131457 a(n+1) is the next semiprime such that a(n+1)-1 divides (a(1)...a(n))^2.

Original entry on oeis.org

4, 9, 10, 21, 22, 25, 26, 33, 34, 35, 46, 49, 51, 55, 57, 58, 65, 69, 77, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 115, 118, 119, 121, 122, 123, 129, 133, 134, 141, 142, 143, 145, 146, 155, 161, 166, 169, 177, 178, 183, 185, 187, 201, 202, 203, 205, 206, 209, 213
Offset: 1

Views

Author

Jonathan Vos Post, Oct 21 2007

Keywords

Comments

This is to semiprimes A001358 as A007459 is to primes A000040.

Examples

			a(1) = 4 because 4 = 2^2 is the first semiprime.
a(2) = 9 because 9 = 3^2 is the next semiprime after 4, where 9-1=8 divides 4^2 = 16.
a(3) = 10 because 10 = 2*5 is the next semiprime after 9 where 10-9=9 divides (4*9)^2.
a(4) = 21 because 21 = 3*7 is the next semiprime after 10, where 10-1=9 divides (4*9*10)^2.
a(5) = 22 because 22 = 2*11 is the next semiprime after 21, where 21-1=20 divides (4*9*10*21)^2.
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true ; else false; fi ; end: A131457 := proc(n) option remember ; local a,prevpr; if n =1 then 4; else prevpr := (mul(A131457(i),i=1..n-1))^2 ; a := A131457(n-1)+1 ; while not isA001358(a) or prevpr mod (a-1) <> 0 do a := a+1 ; od; RETURN(a) ; fi ; end: seq(A131457(n),n=1..80) ; # R. J. Mathar, Oct 30 2007
  • Mathematica
    semiprimeQ[n_] := PrimeOmega[n] == 2;
    a[n_] := a[n] = Module[{k, prevpr}, If[n == 1, 4, prevpr = Product[a[i], {i, 1, n-1}]^2; k = a[n-1]+1; While[!semiprimeQ[k] || Mod[prevpr, k-1] != 0, k++]; 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, Oct 30 2007