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.

User: Kevin Foote

Kevin Foote's wiki page.

Kevin Foote has authored 2 sequences.

A334395 Partial products of A334393.

Original entry on oeis.org

1, 2, 6, 24, 120, 840, 6720, 60480, 665280, 8648640, 147026880, 2793510720, 64250746560, 1606268664000, 43369253928000, 1257708363912000, 38988959281272000, 1247646697000704000, 46162927789026048000, 1892680039350067968000, 81385241692052922624000
Offset: 1

Author

Kevin Foote, Apr 26 2020

Keywords

Examples

			a(6) = 1*2*3*4*5*7 = 840.
		

Crossrefs

Programs

  • Mathematica
    Rest @ FoldList[Times, 1, Select[Range[43], Length[(f = FactorInteger[#])] == 1 && ((e = f[[1, 2]]) == 1 || PrimeQ[e]) &]] (* Amiram Eldar, May 11 2020 *)
  • PARI
    isok(n) = if (n==1, return (1)); my(k=isprimepower(n)); (k==1) || isprime(k); \\ A334393
    lista(nn) = {my(v = select(x->isok(x), [1..nn]), p=1); for (n=1, #v, p *= v[n]; print1(p, ", "););} \\ Michel Marcus, May 11 2020

Formula

a(n) = Product_{i=1..n} A334393(i).

A334393 Numbers of the form p^q where p and q are either 1 or prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 243, 251
Offset: 1

Author

Kevin Foote, Apr 26 2020

Keywords

Comments

First differs from A115975 at a(42). - Omar E. Pol, Apr 26 2020

Crossrefs

Union of A008578 and A053810.
Cf. A115975.

Programs

  • Mathematica
    Select[Range[250], Length[(f = FactorInteger[#])] == 1 && ((e = f[[1, 2]]) == 1 || PrimeQ[e]) &] (* Amiram Eldar, Apr 27 2020 *)
  • PARI
    isok(n) = if (n==1, return (1)); my(k=isprimepower(n)); (k==1) || isprime(k); \\ Michel Marcus, Apr 27 2020
    
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A334393(n):
        def f(x): return int(n-1+x-primepi(x)-sum(primepi(integer_nthroot(x, p)[0]) for p in primerange(x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 13 2024