cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

69497, 69499, 416501, 416503, 474497, 474499, 632501, 632503, 960497, 960499, 1068497, 1068499, 1226501, 1226503, 1402871, 1402873, 1464101, 1464103, 1635497, 1635499, 1716497, 1716499, 1919429, 1919431, 1986497, 1986499
Offset: 1

Views

Author

Keywords

Comments

A variant of A162989, which is the main entry. - N. J. A. Sloane, Aug 12 2009
Note that p+1 = r-1. Thus, the sequence describes twin primes whose immediate neighbors are not cubefree. - Tanya Khovanova, Aug 22 2021

Examples

			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
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • Python
    from sympy import nextprime, factorint
    def cubefree(n): return max(e for e in factorint(n).values()) <= 2
    def auptop(limit):
        alst, p, r = [], 3, 5
        while p < limit:
            if r - p == 2 and not any(cubefree(i) for i in [p-1, p+1, r+1]):
                alst.extend([p, r])
            p, r = r, nextprime(p)
        return alst
    print(auptop(2*10**6)) # Michael S. Branicky, Aug 22 2021

Extensions

Terms corrected by Zak Seidov, Jul 19 2009
Edited by N. J. A. Sloane, Aug 12 2009

A162875 Twin primes p and r such that p - 1, p + 1 and r + 1 are cubefree.

Original entry on oeis.org

3, 5, 11, 13, 59, 61, 179, 181, 227, 229, 347, 349, 419, 421, 659, 661, 827, 829, 1019, 1021, 1091, 1093, 1427, 1429, 1451, 1453, 1667, 1669, 1787, 1789, 1931, 1933, 2027, 2029, 2339, 2341, 3299, 3301, 3371, 3373, 3467, 3469, 3539, 3541, 3851, 3853, 4019
Offset: 1

Views

Author

Keywords

Comments

Apart from the first two terms, a(2n+1) = 11 mod 24 and a(2n) = 13 (mod 24). - Charles R Greathouse IV, Oct 12 2009

Examples

			179 and 181 are in the sequence because they are twin primes and 178 = 2*89, 180 = 2^2*3^2*5, 182 = 2*7*13 have no factors that are cubes.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Module[{a=m=0},Do[If[FactorInteger[n][[m,2]]>2,a=1],{m,Length[FactorInteger[n]]}];a]; lst={};Do[p=Prime[n];r=p+2;If[PrimeQ[r],If[f[p-1]==0&&f[p+1]==0&&f[r+1]==0,AppendTo[lst,p];AppendTo[lst,r]]],{n,2*6!}];lst

A162876 Twin prime pairs p, p+2 such that p-1 and p+3 are both squarefree.

Original entry on oeis.org

3, 5, 11, 13, 59, 61, 71, 73, 107, 109, 179, 181, 191, 193, 227, 229, 311, 313, 419, 421, 431, 433, 599, 601, 659, 661, 827, 829, 1019, 1021, 1031, 1033, 1091, 1093, 1319, 1321, 1427, 1429, 1487, 1489, 1607, 1609, 1619, 1621, 1787, 1789, 1871, 1873, 1931
Offset: 1

Views

Author

Keywords

Comments

By definition, the lower member, here at the odd-indexed positions, is in A089188.
p+1 must be divisible by 4. - Robert Israel, Jul 24 2015

Examples

			(179,181) are in the sequence because 179-1=2*89 is squarefree and 181+1=2*7*13 is also squarefree.
		

Crossrefs

Programs

  • Maple
    f:= p -> if isprime(p) and isprime(p+2) and numtheory:-issqrfree(p-1) and numtheory:-issqrfree(p+3) then (p,p+2) else NULL fi:
    map(f, [4*k-1 $ k=1..1000]); # Robert Israel, Jul 24 2015
  • Mathematica
    f[n_]:=Module[{a=m=0},Do[If[FactorInteger[n][[m,2]]>1,a=1],{m,Length[FactorInteger[n]]}]; a]; lst={};Do[p=Prime[n];r=p+2;If[PrimeQ[r],If[f[p-1]==0&&f[r+1]==0, AppendTo[lst,p];AppendTo[lst,r]]],{n,7!}];lst

Formula

{(p,p+2) : p in A001359, and p-1 in A005117, and p+3 in A005117}.

Extensions

Definition rephrased by R. J. Mathar, Jul 27 2009
Showing 1-3 of 3 results.