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

A141621 Numbers that begin a run of 5 consecutive integers of the form p^2*q where p and q are distinct primes.

Original entry on oeis.org

10093613546512321, 14414905793929921, 266667848769941521, 562672865058083521, 1579571757660876721, 1841337567664174321, 2737837351207392721, 4456162869973433521, 4683238426747860721, 4993613853242910721, 5037980611623036721, 5174116847290255921
Offset: 1

Views

Author

Matthijs Coster, Aug 23 2008

Keywords

Comments

Old name was "The first number of a series of 5 consecutive numbers with the same signature, i.e., all numbers have the format p^2*q, where p and q are primes. Therefore the number of divisors is the same (6)." [That name could have been confusing in that not every sequence of 5 consecutive integers having the same prime signature has the prime signature p^2*q; e.g., 204323 is the first of 5 consecutive numbers of the form p^2*q*r. - Jon E. Schoenfield, Jun 05 2018]
Each of the five numbers in each such sequence has 6 divisors.
It is easy to prove that any number in this sequence must be congruent to 1 modulo 240. The program below calculates only an element of the sequence. Since the reference A119479 it is the smallest one. If we assume that the first element has the format 7^2*n49, the second number has the format 2*p^2, the third element has the format 3^2*n9 and the fifth element has the format 5^2*n25, then p must be modulo 22050 one out of 1181, 3719, 4219, 9119, 12931, 17831, 18331 or 20869.
It is unclear if these numbers are the smallest ones. - Matthijs Coster, Aug 28 2008 [The terms listed in the Data section are, in fact, the smallest numbers matching the definition. - Jon E. Schoenfield, Jun 05 2018]
The first quintuple not of the aforementioned form starts with 5344962129269790721 = 23^2*prime. - Ivan Neretin, Feb 08 2016
Among the first 200 terms, the frequency with which the squared prime factor p is {7, 17, 23, 31, 41, 47, 73, 127, 193, 1039, 1399} is {171, 10, 6, 4, 3, 1, 1, 1, 1, 1, 1}, respectively. - Jon E. Schoenfield, Jun 09 2018

Examples

			a(1) = 10093613546512321, because
10093613546512321 = 7^2 * 205992113194129,
10093613546512322 =   2 * 71040881^2,
10093613546512323 = 3^2 * 1121512616279147,
10093613546512324 = 2^2 * 2523403386628081, and
10093613546512325 = 5^2 * 403744541860493,
so each of the five consecutive integers is of the form p^2*q, and no smaller run of five consecutive integers has this property. [corrected by _Jon E. Schoenfield_, Jun 05 2018]
		

Crossrefs

Programs

  • Sage
    ## Warning: this program appears to be incorrect [Joerg Arndt, Feb 29 2016]
    for m in range(5000):
        p = 22050*m+17831
        if is_prime(p):
            n = 2*p^2-2
            n4 = n/4+1
            if is_prime(n4):
                n49 = floor((n+1)/49)
                if (49*n49 == n+1) and is_prime(n49):
                    n9 = floor((n+3)/9)
                    if (9*n9 == n+3) and is_prime(n9):
                        n25 = floor((n+5)/25)
                        if (25*n25 == n+5) and is_prime(n25):
                            print(n+1, n49, p, n9, n4, n25)

Extensions

Two more terms Matthijs Coster, Aug 28 2008
Missing terms added and extended by Ivan Neretin, Feb 08 2016
New name from Jon E. Schoenfield, Jun 05 2018

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

A215197 Numbers k such that k and k + 1 are both of the form p*q^4 where p and q are distinct primes.

Original entry on oeis.org

2511, 7856, 10287, 15471, 15632, 18063, 20816, 28592, 36368, 40816, 54512, 75248, 88047, 93231, 101168, 126927, 134703, 160624, 163376, 170991, 178767, 210032, 215216, 217808, 220624, 254096, 256527, 274671, 280624, 292976, 334448, 347408, 443151, 482192
Offset: 1

Views

Author

Michel Lagneau, Aug 05 2012

Keywords

Comments

The smaller of adjacent terms in A178739. - R. J. Mathar, Aug 08 2012
These are numbers n such that n and n+1 both have 10 divisors. Proof: clearly n and n+1 cannot both be of the form p^9, so for contradiction assume either n and n+1 is of the form p*q^4 and the other is of the form r^9 where p, q, and r are prime. So p*q^4 is either r^9 - 1 = (r-1)(r^2+r+1)(r^6+r^3+1) or r^9 + 1 = (r+1)(r^2-r+1)(r^6-r^3+1). But these factors are relatively prime and so cannot represent p*q^4 unless one or more factors are units. But this does not happen for r > 2, and the case r = 2 does not work since neither 511 not 513 is of the form p*q^4. - Charles R Greathouse IV, Jun 19 2016

Examples

			2511 is a member as 2511 = 31*3^4 and 2512 = 157*2^4.
		

Crossrefs

Intersection of A005237 and A030628.

Programs

  • Maple
    with(numtheory):for n from 3 to 500000 do:x:=factorset(n):y:=factorset(n+1):n1:=nops(x):n2:=nops(y):if n1=2 and n2=2 then xx1:=x[1]*x[2]^4 : xx2:=x[2]*x[1]^4:yy1:=y[1]*y[2]^4: yy2:=y[2]*y[1]^4:if (xx1=n or xx2=n) and (yy1=n+1 or yy2=n+1) then printf("%a, ", n):else fi:fi:od:
  • Mathematica
    lst={}; Do[f1=FactorInteger[n]; If[Sort[Transpose[f1][[2]]]=={1, 4}, f2=FactorInteger[n+1]; If[Sort[Transpose[f2][[2]]]=={1, 4}, AppendTo[lst, n]]], {n, 3, 55000}]; lst
    (* First run program for A178739 *) Select[A178739, MemberQ[A178739, # + 1] &] (* Alonso del Arte, Aug 05 2012 *)
  • PARI
    is(n)=numdiv(n)==10 && numdiv(n+1)==10 \\ Charles R Greathouse IV, Jun 19 2016
    
  • PARI
    is(n)=vecsort(factor(n)[,2])==[1,4]~ && vecsort(factor(n+1)[,2])==[1,4]~ \\ Charles R Greathouse IV, Jun 19 2016

A215199 Smallest number k such that k and k+1 are both of the form p*q^n where p and q are distinct primes.

Original entry on oeis.org

14, 44, 135, 2511, 8991, 29888, 916352, 12393728, 155161088, 2200933376, 6856828928, 689278976, 481758175232, 3684603215871, 35419114668032, 2035980763136, 174123685117952, 9399153082499072, 19047348965998592, 203368956137832447, 24217192574746623, 2503092614937444351
Offset: 1

Views

Author

Michel Lagneau, Aug 05 2012

Keywords

Comments

a(15) <= 35419114668032. - Donovan Johnson, Aug 22 2012
If k is a term such that k = p*q^n and k+1 = r*s^n, where p,q,r,s are primes, then clearly q != s. Conjecture: q and s are either 2 or 3 for all terms. - Chai Wah Wu, Mar 10 2019
Since q^n and s^n are coprime, the Chinese Remainder Theorem can be used to find candidate terms to test, i.e., numbers k such that k+1 == 0 (mod s^n) and k+1 == 1 (mod q^n) (see Python code). - Chai Wah Wu, Mar 12 2019
From David A. Corneth, Mar 13 2019: (Start)
Conjecture: Let 1 <= D < 2^n be the denominator of N/D of (3/2)^n. Without loss of generality, if the conjecture above holds that (q, s) = (2, 3) then r = D + k*2^n for some n.
Example: for n = 100, we have the continued fraction of (3/2)^100 to be 406561177535215237, 2, 1, 1, 14, 9, 1, 1, 2, 2, 1, 4, 1, 2, 6, 5, 1, 195, 3, 26, 39, 6, 1, 1, 1, 2, 7, 1, 4, 2, 1, 11, 1, 25, 6, 1, 4, 3, 2, 112, 1, 2, 1, 3, 1, 3, 4, 8, 1, 1, 12, 2, 1, 3, 2, 2 from which we compute D = 519502503658624787456021964081. We find r = 1100840223501761745286594404230449 = D + 868 * 2^100 giving a(100) + 1 = r*3^100. (End)

Examples

			a(3) = 135 because 135 = 5*3^3 and 136 = 17*2^3;
a(4) = 2511 because 2511 = 31*3^4 and 2512 = 157*2^4.
		

Crossrefs

Programs

  • Maple
    psig := proc(n)
        local s,p ;
        s := [] ;
        for p in ifactors(n)[2] do
            s := [op(s),op(2,p)] ;
        end do:
        sort(s) ;
    end proc:
    A215199 := proc(n)
        local slim,smi,sma,ca,qi,q,p,k ;
        for slim from 0 do
            smi := slim*1000 ;
            sma := (slim+1)*1000 ;
            ca := sma ;
            q := 2 ;
            for qi from 1 do
                p := nextprime(floor(smi/q^n)-1) ;
                while p*q^n < sma do
                    if p <> q then
                        k := p*q^n ;
                        if psig(k+1) = [1,n] then
                            ca := min(ca,k) ;
                        end if;
                    end if;
                    p := nextprime(p) ;
                end do:
                if q^n >= sma then
                    break;
                end if;
                q := nextprime(q) ;
            end do:
            if ca < sma then
                return ca ;
            end if;
        end do:
    end proc:
    for n from 1 do
        print(A215199(n)) ;
    end do; # R. J. Mathar, Aug 07 2012
  • Python
    from sympy import isprime, nextprime
    from sympy.ntheory.modular import crt
    def A215199(n):
        l = len(str(3**n))-1
        l10, result = 10**l, 2*10**l
        while result >= 2*l10:
            l += 1
            l102, result = l10, 20*l10
            l10 *= 10
            q, qn = 2, 2**n
            while qn <= l10:
                s, sn = 2, 2**n
                while sn <= l10:
                    if s != q:
                        a, b = crt([qn,sn],[0,1])
                        if a <= l102:
                            a = b*(l102//b) + a
                        while a < l10:
                            p, t = a//qn, (a-1)//sn
                            if p != q and t != s and isprime(p) and isprime(t):
                                result = min(result,a-1)
                            a += b
                    s = nextprime(s)
                    sn = s**n
                q = nextprime(q)
                qn = q**n
        return result # Chai Wah Wu, Mar 12 2019

Extensions

a(10)-a(14) from Donovan Johnson, Aug 22 2012
a(15)-a(17) from Chai Wah Wu, Mar 09 2019
a(18)-a(22) from Chai Wah Wu, Mar 10 2019

A348076 Number k such that k and k+1 both have an equal number of even and odd exponents in their prime factorization (A187039).

Original entry on oeis.org

44, 75, 98, 116, 147, 171, 175, 207, 244, 332, 368, 387, 404, 507, 548, 603, 604, 656, 724, 800, 832, 844, 847, 891, 908, 931, 963, 1052, 1075, 1083, 1124, 1250, 1251, 1323, 1324, 1412, 1467, 1556, 1587, 1675, 1772, 1791, 2096, 2224, 2312, 2348, 2367, 2511, 2523
Offset: 1

Views

Author

Amiram Eldar, Sep 27 2021

Keywords

Comments

First differs from A049103 and A074172 at n=7.

Examples

			44 is a term since 44 = 2^2 * 11 and 44 + 1 = 45 = 3^2 * 5 both have one even and one odd exponent in their prime factorization.
		

Crossrefs

Subsequence of A187039.
A074172 is a subsequence.
Cf. A049103.

Programs

  • Mathematica
    q[n_] := n == 1 || Count[(e = FactorInteger[n][[;; , 2]]), ?OddQ] == Count[e, ?EvenQ]; Select[Range[2500], q[#] && q[# + 1] &]
  • Python
    from sympy import factorint
    def aupto(limit):
        alst, cond = [], False
        for nxtk in range(3, limit+2):
            evenodd = [0, 0]
            for e in factorint(nxtk).values():
                evenodd[e%2] += 1
            nxtcond = (evenodd[0] == evenodd[1])
            if cond and nxtcond:
                alst.append(nxtk-1)
            cond = nxtcond
        return alst
    print(aupto(2523)) # Michael S. Branicky, Sep 27 2021

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

A178032 Numbers n such that n, n+1, n+2 are all of the form p*q^2 for distinct primes p,q.

Original entry on oeis.org

603, 2523, 4203, 4923, 7442, 10467, 18027, 20402, 54475, 58923, 79011, 97675, 104211, 118323, 120787, 122571, 124891, 132723, 134307, 148075, 200491, 229707, 243602, 246571, 249307, 258507, 303651, 324331, 331387, 370827, 385675
Offset: 1

Views

Author

John L. Drost, Dec 16 2010

Keywords

Examples

			603=3*3*67, 604=2*2*151, 605=5*11*11
2523=3*29*29, 2524=2*2*631, 2525=5*5*101
		

Crossrefs

Programs

  • Mathematica
    SequencePosition[Table[If[Sort[FactorInteger[n][[All,2]]]=={1,2},1,0],{n,400000}],{1,1,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 30 2019 *)
  • Sage
    is_A178032 = lambda n: all(sorted(m for p,m in factor(k)) == [1, 2] for k in (n, n+1, n+2)) # D. S. McNeil, Dec 17 2010

Extensions

Corrected and extended by D. S. McNeil, Dec 16 2010

A215173 Numbers k such that k and k+1 are both of the form p*q^3 where p and q are distinct primes.

Original entry on oeis.org

135, 296, 375, 1431, 1592, 3992, 4023, 6183, 7624, 8936, 9368, 10071, 10232, 10375, 10984, 13256, 16551, 16712, 19143, 20871, 22328, 22375, 23031, 24488, 28375, 28376, 28647, 33271, 34856, 35127, 40311, 40472, 41336, 43767, 46791, 49624, 50408, 52375, 53271
Offset: 1

Views

Author

Michel Lagneau, Aug 05 2012

Keywords

Comments

Intersection of A065036 and A065036 - 1. - Robert Israel, Jun 15 2014

Examples

			135 is a member as 135 = 5*3^3 and 136 = 17*2^3.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 1 to 55000 do:x:=factorset(n):y:=factorset(n+1):x2:=sqrt(n):y2:=sqrt(n+1):n1:=nops(x):n2:=nops(y):if n1=2 and n2=2 and bigomega(n) = 4 and bigomega(n+1) = 4 and x2<>floor(x2) and y2<>floor(y2) then printf("%a, ", n):else fi:od:
    # Alternative:
    N:= 10^5: # to get all terms < N
    P1:= select(isprime,{2,seq(2*i+1,i=1..floor(N/16))}):
    P2:= select(t -> t^3 <= N/2,P1):
    B:= {seq(seq(p^3*q,q=select(`<`,P1,floor(N/p^3)) minus {p}),p=P2)}:
    B intersect map(`-`,B,1); # Robert Israel, Jun 15 2014
  • Mathematica
    lst={}; Do[f1=FactorInteger[n]; If[Sort[Transpose[f1][[2]]]=={1, 3}, f2=FactorInteger[n+1]; If[Sort[Transpose[f2][[2]]]=={1, 3}, AppendTo[lst, n]]], {n, 3, 55000}]; lst

A308683 Numbers k such that k, k+1, k+2, k+3 are all of the form p*q^2 for distinct primes p,q.

Original entry on oeis.org

17042641441, 180383003522, 231242161921, 313187053922, 349881182161, 717767333521, 740230547281, 907336510801, 1080505860722, 1646310367681, 1682581387922, 1896109379522, 2638936079522, 2919248012401, 3121595927522
Offset: 1

Views

Author

Ray Chandler, Jun 21 2019

Keywords

Comments

See StackExchange link for pseudo-code to generate four or five consecutive values of the form.

Examples

			17042641441 = 7 * 7 * 347809009,
17042641442 = 2 * 92311 * 92311,
17042641443 = 3 * 3 * 1893626827,
17042641444 = 2 * 2 * 4260660361.
		

Crossrefs

A215198 Numbers n such that n and n + 1 are both of the form p*q^5 where p and q are distinct primes.

Original entry on oeis.org

8991, 9375, 335583, 364256, 488672, 535328, 677727, 690848, 755487, 768608, 864351, 908576, 924128, 955232, 1097631, 1377567, 1424223, 1608416, 1688607, 1875231, 2121632, 2124063, 2168288, 2277152, 2541536, 2575071, 2621727, 2901663, 3190624, 3241376, 3409375
Offset: 1

Views

Author

Michel Lagneau, Aug 05 2012

Keywords

Comments

The smaller of adjacent values in A178740. - R. J. Mathar, Aug 08 2012

Examples

			8991 is a member as 8991 = 37*3^5 and 8992 = 281*2^5.
		

Crossrefs

Programs

  • Maple
    with(numtheory):for n from 3 to 10^7 do:x:=factorset(n):y:=factorset(n+1):n1:=nops(x):n2:=nops(y):if n1=2 and n2=2 then xx1:=x[1]*x[2]^5 : xx2:=x[2]*x[1]^5:yy1:=y[1]*y[2]^5: yy2:=y[2]*y[1]^5:if (xx1=n or xx2=n) and (yy1=n+1 or yy2=n+1) then printf("%a, ", n):else fi:fi:od:
  • Mathematica
    lst={}; Do[f1=FactorInteger[n]; If[Sort[Transpose[f1][[2]]]=={1, 5}, f2=FactorInteger[n+1]; If[Sort[Transpose[f2][[2]]]=={1, 5}, AppendTo[lst, n]]], {n, 3, 10^7}]; lst
    SequencePosition[Table[If[Sort[FactorInteger[n][[;;,2]]]=={1,5},1,0],{n,341*10^4}],{1,1}][[;;,1]] (* Harvey P. Dale, Nov 04 2023 *)
Showing 1-10 of 10 results.