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

A046388 Odd numbers of the form p*q where p and q are distinct primes.

Original entry on oeis.org

15, 21, 33, 35, 39, 51, 55, 57, 65, 69, 77, 85, 87, 91, 93, 95, 111, 115, 119, 123, 129, 133, 141, 143, 145, 155, 159, 161, 177, 183, 185, 187, 201, 203, 205, 209, 213, 215, 217, 219, 221, 235, 237, 247, 249, 253, 259, 265, 267, 287, 291, 295, 299, 301, 303
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

These are the odd squarefree semiprimes.
These numbers k have the property that k is a Fermat pseudoprime for at least two bases 1 < b < k - 1. That is, b^(k - 1) == 1 (mod k). See sequence A175101 for the number of bases. - Karsten Meyer, Dec 02 2010

Crossrefs

Intersection of A005117 and A046315, or equally, of A005408 and A006881, or of A001358 and A056911.
Union of A080774 and A190299, which the latter is the union of A131574 and A016105.
Subsequence of A024556 and of A225375.
Cf. A353481 (characteristic function).
Different from A056913, A098905, A225375.

Programs

  • Haskell
    a046388 n = a046388_list !! (n-1)
    a046388_list = filter ((== 2) . a001221) a056911_list
    -- Reinhard Zumkeller, Jan 02 2014
    
  • Mathematica
    max = 300; A046388 = Sort@Flatten@Table[Prime[m] Prime[n], {n, 3, Ceiling[PrimePi[max/3]]}, {m, 2, n - 1}]; Select[A046388, # < max &] (* Alonso del Arte based on Robert G. Wilson v's program for A006881, Oct 24 2011 *)
  • PARI
    isok(n) = (n % 2) && (bigomega(n) == 2) && (omega(n)==2); \\ Michel Marcus, Feb 05 2015
    
  • Python
    from sympy import factorint
    def ok(n):
        if n < 2 or n%2 == 0: return False
        f = factorint(n)
        return len(f) == 2 and sum(f.values()) == 2
    print([k for k in range(304) if ok(k)]) # Michael S. Branicky, May 03 2022
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange
    def A046388(n):
        if n == 1: return 15
        def f(x): return int(n-1+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(3, s+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 10 2024

Formula

Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)) + 1/4^s - P(s)/2^s, for s>1, where P is the prime zeta function. - Amiram Eldar, Nov 21 2020

Extensions

I removed some ambiguity in the definition and edited the entry, merging in some material from A146166. - N. J. A. Sloane, May 09 2013

A025285 Numbers that are the sum of 2 nonzero squares in exactly 2 ways.

Original entry on oeis.org

50, 65, 85, 125, 130, 145, 170, 185, 200, 205, 221, 250, 260, 265, 290, 305, 338, 340, 365, 370, 377, 410, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 680, 685, 689, 697, 730, 740, 745, 754, 765, 785, 793, 800, 820
Offset: 1

Views

Author

Keywords

Comments

Order and signs don't count. E.g. 50 = 5^2+5^2 = 7^2+1^2 (= (-5)^2+5^2, but that doesn't count as different).
A131574 is a subsequence. - Zak Seidov, Jan 31 2014
A025426(a(n)) = 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Programs

  • Haskell
    a025285 n = a025285_list !! (n-1)
    a025285_list = filter ((== 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
    
  • Mathematica
    selQ[n_] := Length[ Select[ PowersRepresentations[n, 2, 2], Times @@ # != 0 &]] == 2; Select[Range[1000], selQ] (* Jean-François Alcover, Oct 03 2013 *)
  • PARI
    is(n)=sum(k=sqrtint((n-1)\2)+1,sqrtint(n-1), issquare(n-k^2))==2 \\ Charles R Greathouse IV, May 24 2016
    
  • PARI
    is(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)==4 \\ Charles R Greathouse IV, May 24 2016

Formula

a(n) >= A007692(n) with equality only for n <= 16. - Alois P. Heinz, Mar 23 2023

A107978 Products of two primes of the form 4n+3 (A002145).

Original entry on oeis.org

9, 21, 33, 49, 57, 69, 77, 93, 121, 129, 133, 141, 161, 177, 201, 209, 213, 217, 237, 249, 253, 301, 309, 321, 329, 341, 361, 381, 393, 413, 417, 437, 453, 469, 473, 489, 497, 501, 517, 529, 537, 553, 573, 581, 589, 597, 633, 649, 669, 681, 713, 717, 721, 737
Offset: 1

Views

Author

Jonathan Vos Post, Jun 12 2005

Keywords

Comments

Every odd semiprime must be in one of three disjoint sets: the product of two primes of the form 4n+1 (A121387), the product of two primes of the form 4n+3 (A107978), or the product of a prime of the form 4n+1 and a prime of the form 4n+3 (A080774).

Crossrefs

Union of A131574 and A080109.
Third row of A121388.

Programs

  • Mathematica
    p = Select[ Prime@ Range@ 60, Mod[ #, 4] == 3 &]; Take[ Sort@ Flatten@ Table[ p[[i]] p[[j]], {j, 30}, {i, j}], 54] (* or *)
    fQ[n_] := Block[{fi = FactorInteger@ n}, Plus @@ Last /@ fi == 2 && Union@ Mod[ First /@ fi, 4] == {3}]; Select[ Range@ 748, fQ@# &] (* Robert G. Wilson v, May 20 2010 *)

Formula

{a(n)} = {p*q: p and q both elements of A002145}.

Extensions

Edited by N. J. A. Sloane, May 20 2010

A121387 Semiprimes p*q with p and q primes of the form 4k+1 (A002144).

Original entry on oeis.org

25, 65, 85, 145, 169, 185, 205, 221, 265, 289, 305, 365, 377, 445, 481, 485, 493, 505, 533, 545, 565, 629, 685, 689, 697, 745, 785, 793, 841, 865, 901, 905, 949, 965, 985, 1037, 1073, 1145, 1157, 1165, 1189, 1205, 1241, 1261, 1285, 1313, 1345, 1369, 1385, 1405, 1417
Offset: 1

Views

Author

Alford Arnold, Jul 26 2006, corrected Jun 24 2007

Keywords

Comments

p and q can be the same. [Harvey P. Dale, Jan 15 2012]
The terms are semiprimes of the form 4k + 1, and comprise only a portion of all such semiprimes, see A108181. - Richard R. Forberg, Aug 27 2013

Examples

			65 = 5 * 13. Note that 5 mod 4 = 1 and 13 mod 4 = 1, so 65 is a term.
		

Crossrefs

Fifth row of A121388.
Union of A080109 and A131574.

Programs

  • Mathematica
    With[{prs=Select[Prime[Range[150]],Mod[#,4]==1&]},Take[Union[Times @@@ Tuples[prs,2]],60]] (* Harvey P. Dale, Jan 15 2012 *)

Extensions

Better definition from T. D. Noe, Sep 25 2007

A264498 Numbers n that are the product of three distinct odd primes and x^2 + y^2 = n has integer solutions.

Original entry on oeis.org

1105, 1885, 2405, 2465, 2665, 3145, 3445, 3485, 3965, 4505, 4745, 5185, 5365, 5785, 5945, 6205, 6305, 6409, 6565, 7085, 7345, 7565, 7585, 7685, 8177, 8245, 8585, 8845, 8905, 9061, 9265, 9605, 9685, 9805, 10205, 10585, 10865, 11245, 11285, 11645, 11713, 11765
Offset: 1

Views

Author

Colin Barker, Nov 15 2015

Keywords

Comments

The three primes are of the form 4*k + 1.

Examples

			1105 is in the sequence because x^2 + y^2 = 1105 = 5*13*17 has solutions (x,y) = (4,33), (9,32), (12,31) and (23,24).
		

Crossrefs

Programs

  • PARI
    dop(d, nmax) = {
      my(L=List(), v=vector(d,m,1)~, f);
      for(n=1, nmax,
        f=factorint(n);
        if(#f~==d && f[1,1]>2 && f[,2]==v && f[,1]%4==v, listput(L, n))
      );
      Vec(L)
    }
    dop(3, 15000)

A190299 Squarefree semiprimes of the form 4k+1.

Original entry on oeis.org

21, 33, 57, 65, 69, 77, 85, 93, 129, 133, 141, 145, 161, 177, 185, 201, 205, 209, 213, 217, 221, 237, 249, 253, 265, 301, 305, 309, 321, 329, 341, 365, 377, 381, 393, 413, 417, 437, 445, 453, 469, 473, 481, 485, 489, 493, 497, 501, 505, 517, 533, 537, 545
Offset: 1

Views

Author

Keywords

Comments

There are 961 squarefree semiprimes of the form 4k+1 below 10000.

Crossrefs

Cf. A001358, A006881, A080774. Union of A131574 and A016105.

Programs

  • Mathematica
    Select[Range[1,600,4],Last/@FactorInteger[#]=={1,1}&]

Extensions

Edited by Ray Chandler, Dec 16 2011

A264499 Numbers n that are the product of four distinct odd primes and x^2 + y^2 = n has integer solutions.

Original entry on oeis.org

32045, 40885, 45305, 58565, 67405, 69745, 77285, 80665, 91205, 98345, 98605, 99905, 101065, 107185, 111605, 114985, 120445, 124865, 127465, 128945, 130645, 137605, 141245, 146705, 150365, 151385, 162565, 164645, 166685, 167765, 173485, 175565, 179945, 182845
Offset: 1

Views

Author

Colin Barker, Nov 15 2015

Keywords

Comments

The four primes are of the form 4*k + 1.

Examples

			32045 is in the sequence because x^2 + y^2 = 32045 = 5*13*17*29 has solutions (x,y) = (2,179), (19,178), (46,173), (67,166), (74,163), (86,157), (109,142) and (122,131).
		

Crossrefs

Programs

  • PARI
    dop(d, nmax) = {
      my(L=List(), v=vector(d,m,1)~, f);
      for(n=1, nmax,
        f=factorint(n);
        if(#f~==d && f[1,1]>2 && f[,2]==v && f[,1]%4==v, listput(L, n))
      );
      Vec(L)
    }
    dop(4, 200000)

A248649 Numbers n that are the product of three distinct primes such that x^2+y^2 = n has integer solutions.

Original entry on oeis.org

130, 170, 290, 370, 410, 442, 530, 610, 730, 754, 890, 962, 970, 986, 1010, 1066, 1090, 1105, 1130, 1258, 1370, 1378, 1394, 1490, 1570, 1586, 1730, 1802, 1810, 1885, 1898, 1930, 1970, 2074, 2146, 2290, 2314, 2330, 2378, 2405, 2410, 2465, 2482, 2522, 2570
Offset: 1

Views

Author

Colin Barker, Oct 12 2014

Keywords

Comments

Union of 2*A131574 and A264498. - Ray Chandler, Dec 09 2019

Examples

			130 is in the sequence because 130 = 2*5*13, and x^2+y^2=130 has integer solutions (x,y) = (3,11) and (7,9).
1105 is in the sequence because x^2 + y^2 = 1105 = 5*13*17 has solutions (x,y) = (4,33), (9,32), (12,31) and (23,24).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[3000],PrimeNu[#]==PrimeOmega[#]==3&&FindInstance[x^2+y^2==#,{x,y},Integers]!={}&] (* Harvey P. Dale, Dec 16 2023 *)
Showing 1-8 of 8 results.