OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
s = {}; o1 = 0; Do[o2 = PrimeOmega[n]; If[o1 == o2, AppendTo[s, n-1]]; o1 = o2, {n, 2, 666, 2}]; s (* Amiram Eldar, Sep 23 2019 *)
Select[Mean/@SequencePosition[PrimeOmega[Range[700]], {x_, _, x_}], OddQ] (* Harvey P. Dale, Jan 11 2024 *)
PROG
(PARI) g(n) = forstep(x=3, n, 2, p1=bigomega(x-1); p2=bigomega(x+1); if(p1==p2, print1(x", ")))
(Python)
from sympy import primeomega
def aupto(limit):
prv, nxt, alst = 1, 2, []
for n in range(3, limit+1, 2):
if prv == nxt: alst.append(n)
prv, nxt = nxt, primeomega(n+3)
return alst
print(aupto(665)) # Michael S. Branicky, May 19 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Mar 03 2006
STATUS
approved