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-2 of 2 results.

A074173 Numbers n such that n and n+2 are of the form p^2*q where p and q are distinct primes.

Original entry on oeis.org

18, 50, 242, 423, 475, 603, 637, 722, 845, 925, 1682, 1773, 2007, 2523, 2525, 2527, 3175, 3177, 4203, 4475, 4525, 4923, 5823, 6725, 6811, 6962, 7299, 7442, 7675, 8425, 8957, 8973, 9457, 9925, 10051, 10082, 10467, 11673, 11709, 12427, 12482, 12591
Offset: 1

Views

Author

Amarnath Murthy, Aug 30 2002

Keywords

Examples

			18 is a member as 18 = 3^2*2 and 20 = 2^2*5.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[f1=FactorInteger[n]; If[Sort[Transpose[f1][[2]]]=={1, 2}, f2=FactorInteger[n+2]; If[Sort[Transpose[f2][[2]]]=={1, 2}, AppendTo[lst, n]]], {n, 3, 10000}]; lst

Formula

Even terms in sequence are 2*A048161(n)^2. - Ray Chandler, Jun 24 2019

Extensions

More terms from T. D. Noe, Oct 04 2004

A308736 Numbers n such that n, n+2, n+4, n+6 are of the form p^2*q where p and q are distinct primes.

Original entry on oeis.org

2523, 3112819, 5656019, 10132171, 12167825, 16639567, 25302173, 31995475, 35158921, 37334419, 43890719, 44816821, 47715269, 53548223, 55534523, 90526075, 90533525, 127558319, 142929025, 143167073, 144989575, 147182225
Offset: 1

Views

Author

Ray Chandler, Jun 24 2019

Keywords

Comments

All terms are odd. Proof: if n is even then out of the 4 numbers n, n+2, n+4, n+6, 2 of them must be either both of the form 2*p^2, 2*q^2, or both of the form 4*p, 4*q. In either case, for p != q and p, q prime, the difference between these 2 numbers are more than 6, reaching a contradiction. - Chai Wah Wu, Jun 24 2019

Examples

			2523 = 3*29*29, 2525 = 5*5*101, 2527 = 7*19*19, 2529 = 3*3*281.
		

Crossrefs

Programs

  • Mathematica
    psx = Table[{0}, {7}]; nmax = 150000000; n = 1; lst = {};
    While[n < nmax, n++;
      psx = RotateRight[psx];
      psx[[1]] = Sort[Last /@ FactorInteger[n]];
      If[Union[{psx[[1]], psx[[3]], psx[[5]], psx[[7]]}] == {{1, 2}}, AppendTo[lst, n - 6]];];
    lst
  • Python
    from sympy import factorint
    A308736_list, n, mlist = [], 3, [False]*4
    while len(A308736_list) < 100:
        if mlist[0] and mlist[1] and mlist[2] and mlist[3]:
            A308736_list.append(n)
        n += 2
        f = factorint(n+6)
        mlist = mlist[1:] + [(len(f),sum(f.values())) == (2,3)] # Chai Wah Wu, Jun 24 2019, Jan 03 2022.
Showing 1-2 of 2 results.