OFFSET
1,1
LINKS
Ely Golden, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A045920(n) + 1. - Robert G. Wilson v, Nov 17 2016
EXAMPLE
a(1)=3, as both 2 and 3 have 1 prime factor. a(2)=10, as both 9 and 10 have 2 prime factors. a(3)=15, as both 14 and 15 have 2 prime factors.
MATHEMATICA
fQ[n_] := PrimeOmega[n - 1] == PrimeOmega[n]; Select[Range@400, fQ] (* Robert G. Wilson v, Nov 17 2016 *)
PROG
(Java) public class A278291{
public static void main(String[] args)throws Exception{
long dim0=numberOfPrimeFactors(2); //note that this method must be manually implemented by the user
long dim1;
long counter=3;
long index=1;
while(index<=10000){
dim1=numberOfPrimeFactors(counter);
if(dim1==dim0){System.out.println(index+" "+counter); index++; }
dim0=dim1;
counter++;
}
}
}
(SageMath)
def bigomega(x):
s=0;
f=list(factor(x));
for c in range(len(f)):
s+=f[c][1]
return s;
dim0=bigomega(2);
counter=3
index=1
while(index<=10000):
dim1=bigomega(counter);
if(dim1==dim0):
print(str(index)+" "+str(counter))
index+=1;
dim0=dim1;
counter+=1;
(PARI) is(n) = bigomega(n)==bigomega(n-1) \\ Felix Fröhlich, Nov 17 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Ely Golden, Nov 16 2016
STATUS
approved