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.

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

A225375 Odd numbers with exactly 2 distinct prime factors.

Original entry on oeis.org

15, 21, 33, 35, 39, 45, 51, 55, 57, 63, 65, 69, 75, 77, 85, 87, 91, 93, 95, 99, 111, 115, 117, 119, 123, 129, 133, 135, 141, 143, 145, 147, 153, 155, 159, 161, 171, 175, 177, 183, 185, 187, 189, 201, 203, 205, 207, 209, 213, 215, 217, 219, 221, 225, 235, 237
Offset: 1

Views

Author

R. J. Mathar, Oct 13 2008

Keywords

Comments

Numbers of the form p^i*q^j where p, q are distinct odd primes and i>=1, j>=1.
Subset of A098905 (which contains in addition A046390 and numbers like 255255, 285285, 345345, 373065 etc.).

Crossrefs

Subsequence of A272592. A046388 is a subsequence.
Different from A046388, A098905.

Programs

  • Maple
    isA225375 := proc(n) RETURN( (n mod 2 = 1) and (A001221(n) = 2) ); end proc:
    for n from 1 to 840 do if isA225375(n) then printf("%d,",n) ; end if; end do:
  • Mathematica
    Select[2 Range[200] + 1, PrimeNu[#] == 2&] (* Jean-François Alcover, Apr 04 2020 *)
  • PARI
    is_A046388(n)={ bittest(n,0) & omega(n)==2 } \\ M. F. Hasler, Feb 13 2012

Extensions

Entry created by N. J. A. Sloane, May 09 2013 in order to restore the original definition of A046388.

A046372 Odd numbers with exactly 2 palindromic prime factors (counted with multiplicity).

Original entry on oeis.org

9, 15, 21, 25, 33, 35, 49, 55, 77, 121, 303, 393, 453, 505, 543, 573, 655, 707, 755, 905, 917, 939, 955, 1057, 1059, 1111, 1119, 1149, 1267, 1337, 1441, 1565, 1661, 1765, 1865, 1915, 1991, 2101, 2181, 2191, 2271, 2361, 2391, 2471, 2611, 2681, 2757, 2787
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Showing 1-3 of 3 results.