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!)
A162874 Twin primes p and r (p < r) such that p-1, p+1 and r+1 are not cubefree. 3

%I #20 Aug 26 2021 14:51:06

%S 69497,69499,416501,416503,474497,474499,632501,632503,960497,960499,

%T 1068497,1068499,1226501,1226503,1402871,1402873,1464101,1464103,

%U 1635497,1635499,1716497,1716499,1919429,1919431,1986497,1986499

%N Twin primes p and r (p < r) such that p-1, p+1 and r+1 are not cubefree.

%C A variant of A162989, which is the main entry. - _N. J. A. Sloane_, Aug 12 2009

%C Note that p+1 = r-1. Thus, the sequence describes twin primes whose immediate neighbors are not cubefree. - _Tanya Khovanova_, Aug 22 2021

%e 69497 and 69499 twin primes. Moreover, 69496 is divisible by 2^3, 69498 is divisible by 3^3, and 69500 is divisible by 5^3. Thus, 69497 and 69499 are in the sequence. - _Tanya Khovanova_, Aug 22 2021

%t s=Select[Prime@Range[200000],PrimeQ[#+2]&&Min[Max[Last/@FactorInteger[#]]&/@{#-1,#+1,#+3}]>2&];Sort@Join[s,s+2] (* _Giorgos Kalogeropoulos_, Aug 22 2021 *)

%o (Python)

%o from sympy import nextprime, factorint

%o def cubefree(n): return max(e for e in factorint(n).values()) <= 2

%o def auptop(limit):

%o alst, p, r = [], 3, 5

%o while p < limit:

%o if r - p == 2 and not any(cubefree(i) for i in [p-1, p+1, r+1]):

%o alst.extend([p, r])

%o p, r = r, nextprime(p)

%o return alst

%o print(auptop(2*10**6)) # _Michael S. Branicky_, Aug 22 2021

%Y Cf. A089189, A089194, A162870, A162872, A162873.

%K nonn

%O 1,1

%A _Vladimir Joseph Stephan Orlovsky_, Jul 15 2009

%E Terms corrected by _Zak Seidov_, Jul 19 2009

%E Edited by _N. J. A. Sloane_, Aug 12 2009

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 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)