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.
%I A228829 #22 Jun 27 2024 22:21:19 %S A228829 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 A228829 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 A228829 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 A228829 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 A228829 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 A228829 a(1) is undefined because there is only 1 0-almost prime (1 itself). %e A228829 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 A228829 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 A228829 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 A228829 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 A228829 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 A228829 := proc(n) %p A228829 local k,m ; %p A228829 k := numtheory[bigomega](n) ; %p A228829 for m from n+1 do %p A228829 if numtheory[bigomega](m) = k then %p A228829 return modp(m+n-k,m-n+k) %p A228829 end if; %p A228829 end do: %p A228829 end proc: # _R. J. Mathar_, Sep 13 2013 %Y A228829 Cf. A226534. %K A228829 nonn %O A228829 2,4 %A A228829 _Juri-Stepan Gerasimov_, Sep 04 2013 %E A228829 Corrected by _R. J. Mathar_, Sep 13 2013