OFFSET
2,4
COMMENTS
EXAMPLE
a(1) is undefined because there is only 1 0-almost prime (1 itself).
a(2) = 0 because (3 + 2 - 1) mod (3 - 2 + 1) = 4 mod 2 = 0 where 1 < 2 < 3 and 2, 3 are consecutive 1-almost primes,
a(3) = 1 because (5 + 3 - 1) mod (5 - 3 + 1) = 7 mod 3 = 1 where 1 < 3 < 5 and 3, 5 are consecutive 1-almost primes,
a(4) = 0 because (6 + 4 - 2) mod (6 - 4 + 2) = 8 mod 4 = 0 where 1 < 4 < 6 and 4, 6 because consecutive 2-almost primes,
a(5) = 2 because (7 + 5 - 1) mod (7 - 5 + 1) = 11 mod 3 = 2 where 1 < 5 < 7 and 5, 7 are consecutive 1-almost primes,
a(6) = 3 because (9 + 6 - 2) mod (9 - 6 + 2) = 13 mod 5 = 3 where 1 < 6 < 9 and 6, 9 are consecutive 2-almost primes.
MAPLE
A228829 := proc(n)
local k, m ;
k := numtheory[bigomega](n) ;
for m from n+1 do
if numtheory[bigomega](m) = k then
return modp(m+n-k, m-n+k)
end if;
end do:
end proc: # R. J. Mathar, Sep 13 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Sep 04 2013
EXTENSIONS
Corrected by R. J. Mathar, Sep 13 2013
STATUS
approved