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.

A046316 Numbers of the form p*q*r where p,q,r are (not necessarily distinct) odd primes.

Original entry on oeis.org

27, 45, 63, 75, 99, 105, 117, 125, 147, 153, 165, 171, 175, 195, 207, 231, 245, 255, 261, 273, 275, 279, 285, 325, 333, 343, 345, 357, 363, 369, 385, 387, 399, 423, 425, 429, 435, 455, 465, 475, 477, 483, 507, 531, 539, 549, 555, 561, 575, 595, 603, 605
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

A369979 sorted into ascending order.
Subsequence of A014612 and of A046340.
Cf. A255646 (final digits), A369054, A369058 (characteristic function), A369252 [= A003415(a(n))].

Programs

  • Haskell
    a046316 n = a046316_list !! (n-1)
    a046316_list = filter ((== 3) . a001222) [1, 3 ..]
    -- Reinhard Zumkeller, May 05 2015
    
  • PARI
    list(lim)=my(v=List(),pq); forprime(p=3,lim\9, forprime(q=3,min(lim\3\p,p), pq=p*q; forprime(r=3,lim\pq, listput(v, pq*r)))); Set(v) \\ Charles R Greathouse IV, Aug 23 2017
    
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A046316(n):
        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
        def f(x): return int(n+x-sum(primepi(x//(k*m))-b+1 for a,k in enumerate(primerange(3,integer_nthroot(x,3)[0]+1),2) for b,m in enumerate(primerange(k,isqrt(x//k)+1),a)))
        return bisection(f,n,n) # Chai Wah Wu, Oct 18 2024

Extensions

Definition clarified by N. J. A. Sloane, Dec 19 2017

A369245 Number of representations of the n-th Euclid number, A002110(n) + 1, as a sum (p*q + p*r + q*r) with three odd primes p <= q <= r. (Definition implies that p=3 and q > 3).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 2, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1
Offset: 0

Views

Author

Antti Karttunen, Jan 22 2024

Keywords

Comments

Number of representations of the n-th Euclid number, A002110(n) + 1, as a sum of the form 3*(p+q) + p*q, where p and q are odd primes.
Question: Will there be an eventual growth spurt for this sequence? Even though all solutions must be multiples of 3 (but not of 9), because A006862(n) == 1 (mod 3), for n > 1, and the solutions belong to a set listed by A369461.
Similar sequence A369242 grows more vigorously because A033312(n) == -1 (mod 3) for n >= 3, thus allowing non-multiples of 3 as solutions. See comments in A369252.

Examples

			a(4) = 1 as there exists a natural number 399 = 3 * 7 * 19, whose arithmetic derivative (indicated with 399', see A003415) is computed as ((3*7) + (3*19) + (7*19)) = 211 = 1 + prime(4)# = A006862(4), and because 399 is the unique term in A046316 that satisfies the condition.
a(17) >= 1 because there exists (at least one) solution k = 4903038892893242229501 = 3 * 17 * 96138017507710631951 with A003415(k) = 1+A002110(17).
For other cases, see examples in A369246.
		

Crossrefs

Cf. also A116979, A369000, A369239 for similar counts, also A369241, A369242 and A369247.

Programs

  • PARI
    \\ Needs also program from A369054.
    A002110(n) = prod(i=1,n,prime(i));
    A369245(n) = A369054(A002110(n)+1);
    
  • PARI
    \\ Optimized version of above, employs the fact that solutions must all be multiples of 3. Outputs also terms for A369246.
    search_for_3k1_cases(n) = if(3!=(n%4),0, my(p = 5, q, c=0); while(1, q = (n-(3*p)) / (3+p); if(q < p, return(c), if(1==denominator(q) && isprime(q),c++; write("b369246_by_search_order_to.txt", n, " ", 3*p*q))); p = nextprime(1+p)));
    A002110(n) = prod(i=1,n,prime(i));
    A369245(n) = search_for_3k1_cases(A002110(n)+1);

Formula

a(n) = A369054(A006862(n)).
Showing 1-2 of 2 results.