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.

A278291 Numbers n such that n-1 has the same number of prime factors as n (with multiplicity).

This page as a plain text file.
%I A278291 #34 Nov 30 2016 13:05:54
%S A278291 3,10,15,22,26,28,34,35,39,45,58,76,86,87,94,95,99,117,119,122,123,
%T A278291 125,134,136,142,143,146,148,154,159,165,171,172,175,178,202,203,206,
%U A278291 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
%N A278291 Numbers n such that n-1 has the same number of prime factors as n (with multiplicity).
%H A278291 Ely Golden, <a href="/A278291/b278291.txt">Table of n, a(n) for n = 1..10000</a>
%F A278291 a(n) = A045920(n) + 1. - _Robert G. Wilson v_, Nov 17 2016
%e A278291 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.
%t A278291 fQ[n_] := PrimeOmega[n - 1] == PrimeOmega[n]; Select[Range@400, fQ] (* _Robert G. Wilson v_, Nov 17 2016 *)
%o A278291 (Java) public class A278291{
%o A278291 public static void main(String[] args)throws Exception{
%o A278291     long dim0=numberOfPrimeFactors(2);//note that this method must be manually implemented by the user
%o A278291     long dim1;
%o A278291     long counter=3;
%o A278291     long index=1;
%o A278291     while(index<=10000){
%o A278291       dim1=numberOfPrimeFactors(counter);
%o A278291       if(dim1==dim0){System.out.println(index+" "+counter);index++;}
%o A278291       dim0=dim1;
%o A278291       counter++;
%o A278291     }
%o A278291   }
%o A278291 }
%o A278291 (SageMath)
%o A278291 def bigomega(x):
%o A278291     s=0;
%o A278291     f=list(factor(x));
%o A278291     for c in range(len(f)):
%o A278291         s+=f[c][1]
%o A278291     return s;
%o A278291 dim0=bigomega(2);
%o A278291 counter=3
%o A278291 index=1
%o A278291 while(index<=10000):
%o A278291     dim1=bigomega(counter);
%o A278291     if(dim1==dim0):
%o A278291         print(str(index)+" "+str(counter))
%o A278291         index+=1;
%o A278291     dim0=dim1;
%o A278291     counter+=1;
%o A278291 (PARI) is(n) = bigomega(n)==bigomega(n-1) \\ _Felix Fröhlich_, Nov 17 2016
%K A278291 nonn
%O A278291 1,1
%A A278291 _Ely Golden_, Nov 16 2016