OFFSET
2,2
COMMENTS
a(n) <= n/2, with equality when n is a power of 2. - Robert Israel, Nov 21 2024
LINKS
Robert Israel, Table of n, a(n) for n = 2..10000
FORMULA
EXAMPLE
2 is prime. The next prime is 3, and 3-2= 1 = a(2).
For n=3, the next prime is 5, 5-3 = 2 = a(3).
For n=4, the next number with 2 prime factors is 6, 6-4 =2 = a(4).
MAPLE
W:= map(numtheory:-bigomega, [$2..150]):
f:= t -> ListTools:-Search(W[t], W[t+1..-1]):
map(f, [$1..100]); # Robert Israel, Nov 21 2024
MATHEMATICA
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.
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Tisdale, May 20 2010
EXTENSIONS
Offset set to 2, and more terms added by R. J. Mathar, May 31 2010
STATUS
approved