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.

A278311 Numbers n such that n-1 and n+1 have the same number of prime factors as n (with multiplicity).

This page as a plain text file.
%I A278311 #19 Nov 30 2016 13:11:39
%S A278311 34,86,94,122,142,171,202,214,218,245,285,302,394,429,435,446,507,603,
%T A278311 604,605,634,638,698,842,922,963,1042,1075,1084,1085,1131,1138,1245,
%U A278311 1262,1275,1310,1346,1402,1413,1431,1435,1449,1491,1533,1557,1587,1605,1635,1642,1676,1762,1772,1838,1886,1894,1925,1942
%N A278311 Numbers n such that n-1 and n+1 have the same number of prime factors as n (with multiplicity).
%H A278311 Ely Golden, <a href="/A278311/b278311.txt">Table of n, a(n) for n = 1..10000</a>
%e A278311 a(1) = 34, as 33, 34, and 35 all have 2 prime factors.
%e A278311 a(2) = 86, as 85, 86, and 87 all have 2 prime factors.
%o A278311 (Java) public class A278311{
%o A278311 public static void main(String[] args)throws Exception{
%o A278311     long dim0=numberOfPrimeFactors(2);//note that this method must be manually implemented by the user
%o A278311     long dim1=numberOfPrimeFactors(3);
%o A278311     long dim2;
%o A278311     long counter=4;
%o A278311     long index=1;
%o A278311     while(index<=10000){
%o A278311       dim2=numberOfPrimeFactors(counter);
%o A278311       if(dim2==dim1&&dim1==dim0){System.out.println(index+" "+(counter-1));index++;}
%o A278311       dim0=dim1;
%o A278311       dim1=dim2;
%o A278311       counter++;
%o A278311     }
%o A278311   }
%o A278311 }
%o A278311 (SageMath)
%o A278311 def bigomega(x):
%o A278311     s=0;
%o A278311     f=list(factor(x));
%o A278311     for c in range(len(f)):
%o A278311         s+=f[c][1]
%o A278311     return s;
%o A278311 dim0=bigomega(2);
%o A278311 dim1=bigomega(3);
%o A278311 counter=4
%o A278311 index=1
%o A278311 while(index<=10000):
%o A278311     dim2=bigomega(counter);
%o A278311     if(dim2==dim1&dim1==dim0):
%o A278311         print(str(index)+" "+str(counter-1))
%o A278311         index+=1;
%o A278311     dim0=dim1;
%o A278311     dim1=dim2;
%o A278311     counter+=1;
%o A278311 (PARI) isok(n) = (bigomega(n-1) == bigomega(n)) && (bigomega(n) == bigomega(n+1)); \\ _Michel Marcus_, Nov 17 2016
%Y A278311 Intersection of A045920 and A278291.
%Y A278311 a(n) = A045939(n) + 1.
%K A278311 nonn
%O A278311 1,1
%A A278311 _Ely Golden_, Nov 17 2016