OFFSET
1,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
EXAMPLE
a(2)=1 because semiprime(2) = 6 = 3*2 and (3-2) mod 2 = 1.
MATHEMATICA
semiPrimeQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; f[n_] := Subtract @@ Reverse@ Flatten[ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]; t = Select[ Range@ 215, semiPrimeQ]; Table[ Mod[ f[ t[[n]]], n], {n, 80}]
f[{a_, b_}]:=Module[{c=FactorInteger[b][[;; , 1]]}, If[Length[c]==1, 0, Mod[Differences[c][[1]], a]]]; Module[{nn=300, spr}, spr=Select[Range[nn], PrimeOmega[#]==2&]; f/@Thread[{Range[ Length[ spr]], spr}]] (* Harvey P. Dale, May 29 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 20 2010
STATUS
approved