OFFSET
1,4
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = MIN{k=>0 such that n|(k+A001358(n))}.
EXAMPLE
a(1) = 0 because 1 | (0+semiprime(1)=4).
a(6) = 3 because 6 | (3+semiprime(3)=3+15=18).
a(25) = 1 because 25 | (1+semiprime(25)=1+74=75).
MATHEMATICA
lnn[{s_, n_}]:=If[Divisible[s, n], 0, n-Mod[s, n]]; lnn/@Module[{sp=Select[ Range[ 300], PrimeOmega[#] ==2&], len}, len=Length[sp]; Thread[{sp, Range[len]}]] (* Harvey P. Dale, Mar 23 2013 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Oct 04 2007
EXTENSIONS
More terms from R. J. Mathar, Jan 15 2008
STATUS
approved