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

A074172 Smaller of two consecutive numbers of the form p^2*q where p and q are distinct primes.

Original entry on oeis.org

44, 75, 98, 116, 147, 171, 244, 332, 387, 507, 548, 603, 604, 724, 844, 908, 931, 963, 1075, 1083, 1251, 1324, 1412, 1467, 1556, 1587, 1675, 1772, 2523, 2524, 2636, 2644, 2763, 3283, 3356, 3411, 3508, 3788, 3987, 4075, 4203, 4204, 4418, 4491, 4804, 4868
Offset: 1

Views

Author

Amarnath Murthy, Aug 30 2002

Keywords

Comments

From Robert Israel, Dec 06 2018: (Start)
There are four forms of terms, for odd primes p,q,r:
4*p where 4*p+1 = q^2*r, r == 1 (mod 4)
2*p^2 where 2*p^2+1 = q^2*r, r == 3 (mod 4)
p^2*q where p^2*q+1 = 2*r^2, q == 1 (mod 4)
p^2*q where p^2*q+1 = 4*r, q == 3 (mod 4).
Are there infinitely many terms of each type?
(End)

Examples

			44 is a member as 44 = 2^2*11 and 45 = 3^2*5.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local F;
    F:= map(t -> t[2],ifactors(n)[2]);
    F = [2,1] or F = [1,2]
    end proc:
    A054753:= select(filter, {$1..10000}):
    sort(convert(A054753 intersect map(`-`,A054753,1),list)); # Robert Israel, Dec 06 2018
  • Mathematica
    lst={}; Do[f1=FactorInteger[n]; If[Sort[Transpose[f1][[2]]]=={1, 2}, f2=FactorInteger[n+1]; If[Sort[Transpose[f2][[2]]]=={1, 2}, AppendTo[lst, n]]], {n, 3, 10000}]; lst
  • PARI
    isok1(n) = vecsort(factor(n)[,2]) == [1,2]~;
    isok(n) = isok1(n) && isok1(n+1); \\ Michel Marcus, Sep 20 2017

Extensions

More terms from T. D. Noe, Oct 04 2004
Name clarified by Sean A. Irvine, Jan 13 2025

A074174 Smallest number k such that k and k+n are of the form p^2*q where p and q are primes.

Original entry on oeis.org

44, 18, 172, 171, 45, 12, 45, 12, 236, 18, 52, 63, 50, 261, 524, 12, 28, 45, 44, 637, 404, 28, 45, 20, 20, 18, 18, 147, 63, 20, 44, 12, 12, 18, 28, 63, 116, 12, 236, 12, 75, 50, 20, 325, 18, 52, 28, 20, 50, 18, 12, 423, 45, 44, 20, 12, 18, 18, 116, 147, 63, 325, 12, 12, 52
Offset: 1

Views

Author

Amarnath Murthy, Aug 30 2002

Keywords

Examples

			a(2) = 18 as 18 = 3^2*2 and 18 +2 =20 = 2^2*5.
		

Crossrefs

Programs

  • Mathematica
    Table[k=1; found=False; While[ !found, k++; f1=FactorInteger[k]; If[Sort[Transpose[f1][[2]]]=={1, 2}, f2=FactorInteger[k+n]; If[Sort[Transpose[f2][[2]]]=={1, 2}, found=True]]]; k, {n, 100}]
    snk[n_]:=Module[{k=1},While[Sort[FactorInteger[k][[All,2]]]!={1,2} || Sort[FactorInteger[k+n][[All,2]]]!={1,2},k++];k]; Array[snk,70]

Extensions

Corrected and extended by T. D. Noe, Oct 04 2004

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

Original entry on oeis.org

2523, 2525, 3175, 22021, 25529, 28223, 40325, 53573, 58923, 73447, 122571, 132021, 149675, 152339, 165175, 172917, 202221, 209673, 235825, 267773, 268223, 308671, 322223, 371075, 425723, 430171, 445923, 488975, 575973, 591575
Offset: 1

Views

Author

Ray Chandler, Jun 24 2019

Keywords

Comments

All terms are odd. See comment in A308736. - Chai Wah Wu, Jun 24 2019

Examples

			3175 =  5 *  5 * 127,
3177 =  3 *  3 * 353,
3179 = 11 * 17 *  17.
		

Crossrefs

Programs

  • Mathematica
    psx = Table[{0}, {5}]; nmax = 600000; n = 1; lst = {};
    While[n < nmax, n++;
      psx = RotateRight[psx];
      psx[[1]] = Sort[Last /@ FactorInteger[n]];
      If[Union[{psx[[1]], psx[[3]], psx[[5]]}] == {{1, 2}},
       AppendTo[lst, n - 4]];];
    lst

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