|
|
A278291
|
|
Numbers n such that n-1 has the same number of prime factors as n (with multiplicity).
|
|
5
|
|
|
3, 10, 15, 22, 26, 28, 34, 35, 39, 45, 58, 76, 86, 87, 94, 95, 99, 117, 119, 122, 123, 125, 134, 136, 142, 143, 146, 148, 154, 159, 165, 171, 172, 175, 178, 202, 203, 206, 214, 215, 218, 219, 231, 245, 246, 254, 285, 286, 297, 299, 302, 303, 327, 333, 335, 351, 357, 362, 370, 376, 382, 388, 394, 395
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
|
|
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
|
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
|
|
|
STATUS
|
approved
|
|
|
|