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!)
A115166 Even numbers k such that k-2 and k+2 have the same number of distinct prime factors. 1

%I #21 Oct 11 2023 17:21:25

%S 6,8,12,16,20,22,24,26,36,38,42,46,48,50,52,54,56,60,68,70,74,78,84,

%T 90,94,96,98,102,106,110,112,114,120,128,144,146,150,152,160,162,164,

%U 172,174,184,186,188,190,194,198,204,210,214,216,232,234,236,246,252,262

%N Even numbers k such that k-2 and k+2 have the same number of distinct prime factors.

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

%e 38 is in the sequence because 36 = 2^2 * 3^2 and 40 = 2^3 * 5.

%p with(numtheory): a:=proc(n) if nops(factorset(n-2))=nops(factorset(n+2)) then n else fi end: seq(a(2*n),n=2..133); # _Emeric Deutsch_, Mar 12 2006

%t Select[Range[2, 262, 2], PrimeNu[# - 2] == PrimeNu[# + 2] &] (* _Amiram Eldar_, Feb 18 2020 *)

%t Select[Mean/@SequencePosition[PrimeNu[Range[300]],{x_,_,_,_,x_}],EvenQ] (* _Harvey P. Dale_, Oct 11 2023 *)

%o (PARI) g(n) = forstep(x=4,n,2,p1=omega(x-2); p2=omega(x+2); if(p1==p2,print(x",")))

%o (Magma) [k:k in [4.. 270 by 2]| #PrimeDivisors(k-2) eq #PrimeDivisors(k+2)]; // _Marius A. Burtea_, Feb 18 2020

%Y Cf. A001221.

%Y Subsequence of A005843.

%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 April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)