cp's OEIS Frontend

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.

A178139 Distance between n and the next number with the same number of prime factors (counted with multiplicity).

This page as a plain text file.
%I A178139 #19 Jun 25 2025 01:08:13
%S A178139 1,2,2,2,3,4,4,1,4,2,6,4,1,6,8,2,2,4,7,1,3,6,12,1,7,1,2,2,12,6,16,1,1,
%T A178139 3,4,4,1,7,14,2,2,4,1,5,3,6,24,2,2,4,11,6,2,2,4,1,4,2,21,6,3,3,32,4,2,
%U A178139 4,2,5,5,2,8,6,3,1,2,5,14,4,28
%N A178139 Distance between n and the next number with the same number of prime factors (counted with multiplicity).
%C A178139 a(n) <= n/2, with equality when n is a power of 2. - _Robert Israel_, Nov 21 2024
%H A178139 Robert Israel, <a href="/A178139/b178139.txt">Table of n, a(n) for n = 2..10000</a>
%F A178139 a(n) = {min d > 0: A001222(n+d) = A001222(n)}. - _R. J. Mathar_, May 31 2010
%e A178139 2 is prime. The next prime is 3, and 3-2 = 1 = a(2).
%e A178139 For n=3, the next prime is 5, 5-3 = 2 = a(3).
%e A178139 For n=4, the next number with 2 prime factors is 6, 6-4 = 2 = a(4).
%p A178139 W:= map(numtheory:-bigomega, [$2..150]):
%p A178139 f:= t ->  ListTools:-Search(W[t], W[t+1..-1]):
%p A178139 map(f, [$1..100]); # _Robert Israel_, Nov 21 2024
%t A178139 a1=Array[Plus @@ Last /@ FactorInteger[ # ] &, 400];a2=Flatten[Position[a1, k]] (* In a2 putting 1,2,3,...for k gives table of positions of numbers with k factors, repetitions included. *)
%Y A178139 Cf. A001222, A176884.
%K A178139 nonn
%O A178139 2,2
%A A178139 _Daniel Tisdale_, May 20 2010
%E A178139 Offset set to 2, and more terms added by _R. J. Mathar_, May 31 2010