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!)
A358686 Numbers sandwiched between two semiprimes, one of which is a square. 1

%I #30 Jul 23 2023 01:53:43

%S 5,50,120,122,288,290,528,842,960,1370,1680,1850,2808,2810,4488,5328,

%T 5330,6240,6242,6888,6890,9408,9410,11880,12768,18770,22200,22800,

%U 26568,27888,36482,38808,39600,52440,54290,58080,63000,63002,69170,72360,72362,73442,76730,78960

%N Numbers sandwiched between two semiprimes, one of which is a square.

%C Numbers in A124936 but not in A358665.

%C All numbers except 5 (the first term) are even.

%C Subsequence of A124936.

%H Harvey P. Dale, <a href="/A358686/b358686.txt">Table of n, a(n) for n = 1..292</a> (all terms up to 10 million)

%e 5 is sandwiched between two semiprimes 4 = 2*2 and 6 = 3*2, one of which is a square. Thus, 5 is in this sequence.

%e 34 is sandwiched between squarefree semiprimes 33 = 3*11 and 35 = 5*7. Thus, 34 is not in this sequence.

%t Select[Range[100000], Total[Transpose[FactorInteger[# - 1]][[2]]] == 2 && Total[Transpose[FactorInteger[# + 1]][[2]]] == 2 && ! (Transpose[FactorInteger[# - 1]][[2]] == {1, 1} && Transpose[FactorInteger[# + 1]][[2]] == {1, 1}) &]

%t Mean/@Select[SequencePosition[PrimeOmega[Range[80000]],{2,_,2}],AnyTrue[Sqrt[#],IntegerQ]&] (* _Harvey P. Dale_, Jun 14 2023 *)

%o (Python)

%o from sympy import factorint

%o from itertools import count, islice

%o def agen(): # generator of terms

%o nxt = []

%o yield 5

%o for k in count(6, 2):

%o prv, nxt = nxt, list(factorint(k+1).values())

%o if (prv==[1, 1] and nxt==[2]) or (prv==[2] and nxt==[1, 1]): yield k

%o print(list(islice(agen(), 44))) # _Michael S. Branicky_, Nov 26 2022

%Y Cf. A001358, A006881, A124936, A358665.

%K nonn

%O 1,1

%A _Tanya Khovanova_, Nov 26 2022

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 June 28 03:25 EDT 2024. Contains 373761 sequences. (Running on oeis4.)