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.

A145521 Take the primes raised to prime exponents, arranged in numerical order (A053810). If A053810(n) = r(n)^q(n), where r(n) and q(n) are primes, then a(n) = q(n)^r(n).

Original entry on oeis.org

4, 9, 8, 32, 27, 25, 128, 2048, 243, 49, 8192, 125, 131072, 2187, 524288, 8388608, 536870912, 2147483648, 177147, 137438953472, 2199023255552, 8796093022208, 121, 343, 1594323, 140737488355328, 9007199254740992, 3125, 576460752303423488, 2305843009213693952, 147573952589676412928
Offset: 1

Views

Author

Leroy Quet, Oct 12 2008

Keywords

Comments

a(n) = A053812(n)^A053811(n).

Crossrefs

Programs

  • PARI
    lista(nn) = for(k=1, nn, if(isprime(isprimepower(k, &p)), print1(bigomega(k)^p, ", "))); \\ Jinyuan Wang, Feb 25 2020
    
  • Python
    from math import prod
    from sympy import primepi, integer_nthroot, primerange, factorint
    def A145521(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
        kmin, kmax = 1,2
        while f(kmax) >= kmax:
            kmax <<= 1
        while True:
            kmid = kmax+kmin>>1
            if f(kmid) < kmid:
                kmax = kmid
            else:
                kmin = kmid
            if kmax-kmin <= 1:
                break
        return prod(e**p for p,e in factorint(kmax).items()) # Chai Wah Wu, Aug 13 2024

Extensions

Extended by Ray Chandler, Nov 01 2008
More terms from Jinyuan Wang, Feb 25 2020