OFFSET
1,1
LINKS
Ely Golden, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = 34, as 33, 34, and 35 all have 2 prime factors.
a(2) = 86, as 85, 86, and 87 all have 2 prime factors.
PROG
(Java) public class A278311{
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=numberOfPrimeFactors(3);
long dim2;
long counter=4;
long index=1;
while(index<=10000){
dim2=numberOfPrimeFactors(counter);
if(dim2==dim1&&dim1==dim0){System.out.println(index+" "+(counter-1)); index++; }
dim0=dim1;
dim1=dim2;
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);
dim1=bigomega(3);
counter=4
index=1
while(index<=10000):
dim2=bigomega(counter);
if(dim2==dim1&dim1==dim0):
print(str(index)+" "+str(counter-1))
index+=1;
dim0=dim1;
dim1=dim2;
counter+=1;
(PARI) isok(n) = (bigomega(n-1) == bigomega(n)) && (bigomega(n) == bigomega(n+1)); \\ Michel Marcus, Nov 17 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Ely Golden, Nov 17 2016
STATUS
approved