%I #19 Oct 01 2013 16:52:51
%S 0,1,0,2,3,2,3,2,4,2,0,4,0,2,0,2,0,1,4,2,0,2,8,1,3,0,0,2,9,4,12,2,1,1,
%T 0,2,0,2,0,2,3,4,2,4,3,1,28,2,4,2,0,6,4,2,0,2,4,2,12,1,0,0,2,0,1,2,0,
%U 1,6,2,4,4,4,0,1,3,14,1,18,0,0,3,0,1,0,2,0,5,4,2,7,2,1,4,18,2
%N a(n) = (m+n-k) mod (m-n+k) where k = BigOmega(n) and m is the next larger integer after n with the same k = BigOmega(m) as n.
%C Let k = A001222(n) be the number of prime divisors of n and let m>n be the smallest number larger than n with the same number of prime divisors, k=A001222(m). Then a(n) = (m+n-k) mod (m-n+k).
%e a(1) is undefined because there is only 1 0-almost prime (the 1 itself).
%e 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,
%e 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,
%e 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,
%e 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,
%e 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.
%p A228829 := proc(n)
%p local k,m ;
%p k := numtheory[bigomega](n) ;
%p for m from n+1 do
%p if numtheory[bigomega](m) = k then
%p return modp(m+n-k,m-n+k)
%p end if;
%p end do:
%p end proc: # _R. J. Mathar_, Sep 13 2013
%Y Cf. A226534.
%K nonn
%O 2,4
%A _Juri-Stepan Gerasimov_, Sep 04 2013
%E Corrected by _R. J. Mathar_, Sep 13 2013
|