login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A115167 Odd numbers k such that k-1 and k+1 have the same number of prime divisors with multiplicity. 2

%I #19 Jan 11 2024 13:26:17

%S 5,19,29,43,51,55,67,69,77,89,115,151,171,173,187,189,197,233,237,243,

%T 245,249,267,271,283,285,291,295,307,317,329,341,343,349,355,403,405,

%U 411,427,429,435,437,461,489,491,507,569,571,593,597,603,605,653,665

%N Odd numbers k such that k-1 and k+1 have the same number of prime divisors with multiplicity.

%H Amiram Eldar, <a href="/A115167/b115167.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%t Select[Mean/@SequencePosition[PrimeOmega[Range[700]],{x_,_,x_}],OddQ] (* _Harvey P. Dale_, Jan 11 2024 *)

%o (PARI) g(n) = forstep(x=3, n, 2, p1=bigomega(x-1); p2=bigomega(x+1); if(p1==p2, print1(x",")))

%o (Python)

%o from sympy import primeomega

%o def aupto(limit):

%o prv, nxt, alst = 1, 2, []

%o for n in range(3, limit+1, 2):

%o if prv == nxt: alst.append(n)

%o prv, nxt = nxt, primeomega(n+3)

%o return alst

%o print(aupto(665)) # _Michael S. Branicky_, May 19 2021

%Y Subsequence of A280382.

%K easy,nonn

%O 1,1

%A _Cino Hilliard_, Mar 03 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 09:59 EDT 2024. Contains 371268 sequences. (Running on oeis4.)