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.

Previous Showing 11-20 of 28 results. Next

A053812 Exponents occurring in A053810.

Original entry on oeis.org

2, 3, 2, 2, 3, 5, 2, 2, 3, 7, 2, 5, 2, 3, 2, 2, 2, 2, 3, 2, 2, 2, 11, 7, 3, 2, 2, 5, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 13, 2, 2, 2, 2, 2, 3, 2, 2, 5, 2, 2, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 7, 2, 3, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 17, 2, 2, 2, 2, 3, 2, 2, 2
Offset: 1

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Crossrefs

Programs

  • PARI
    LIM = prime(80)^2; v = vector(400); count = 0; forprime (p = 2, prime(80), x = 2; while (p^x <= LIM, count++; v[count] = p^x; x = nextprime(x + 1))); v = vecsort(vector(count, i, v[i])); vector(count, i, bigomega(v[i])) \\ David Wasserman, Feb 17 2006
    
  • Python
    from sympy import primepi, integer_nthroot, primerange, factorint
    def A053812(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 list(factorint(kmax).values())[0] # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A001222(A053810(n)). - David Wasserman, Feb 17 2006
a(n) = log(A053810(n))/log(A053811(n)). - Amiram Eldar, Nov 21 2020

Extensions

More terms from David Wasserman, Feb 17 2006
Offset corrected by Amiram Eldar, Nov 21 2020

A085818 For n > 1: a(n) = p if n = p^e with p prime and e > 1, otherwise a(n) = (n-m)-th prime, where m = number of nonprime prime powers <= n; a(1)=1.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Jul 04 2003

Keywords

Comments

a(n) = A025473(n) if n = p^e with p prime and e > 1, otherwise a(n) = A008578(n-A085501(n));
n divides A085819(n) = Product_{k<=n} a(k), as by construction: a(1)=1; if n divides A085819(n-1) then a(n) = smallest prime not occurring earlier; if n does not divide A085819(n-1) then a(n) = greatest prime factor of n (A006530);
A000040 occurs infinitely many times as a subsequence.
a(A085971(n))=A000040(n) and for all k > 1: a(A000040(n)^k)=A000040(n); A085985(n)=A049084(a(n)). - Reinhard Zumkeller, Jul 06 2003

Crossrefs

Programs

  • PARI
    f(n) = 1 + sum(k=2, n, isprimepower(k) && !isprime(k));  \\ A085501
    a(n) = {if (n==1, return (1)); my(p); if (isprimepower(n, &p) && !isprime(n), p, prime(n-f(n)));} \\ Michel Marcus, Jan 28 2021
    
  • Python
    from sympy import primefactors, prime, primepi, integer_nthroot
    def A085818(n): return 1 if n==1 else (f[0] if len(f:=primefactors(n))==1 and f[0]Chai Wah Wu, Aug 20 2024

A086455 Sum of divisors of prime powers: sigma(p^e).

Original entry on oeis.org

1, 3, 4, 7, 6, 8, 15, 13, 12, 14, 31, 18, 20, 24, 31, 40, 30, 32, 63, 38, 42, 44, 48, 57, 54, 60, 62, 127, 68, 72, 74, 80, 121, 84, 90, 98, 102, 104, 108, 110, 114, 133, 156, 128, 255, 132, 138, 140, 150, 152, 158, 164, 168, 183, 174, 180, 182, 192, 194, 198
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Crossrefs

Programs

  • Maple
    A086455 := proc(n)
        numtheory[sigma](A000961(n)) ;
    end proc: # R. J. Mathar, Jun 04 2016
  • Mathematica
    DivisorSigma[1, #]& /@ Join[{1}, Select[Range[2, 200], PrimePowerQ]] (* Jean-François Alcover, Feb 10 2018 *)
  • PARI
    list(lim) = apply(sigma, select(x -> x == 1 || isprimepower(x), vector(lim, i, i))); \\ Amiram Eldar, May 07 2025

Formula

a(n) = A000203(A000961(n)).
a(n) = (p^(e+1)-1)/(p-1), where p^e = A000961(n).
a(n) = (A025473(n)^(A025474(n)+1)-1)/(A025473(n)-1).

A192133 Difference of base and exponent of prime powers (cf. A000961).

Original entry on oeis.org

1, 1, 2, 0, 4, 6, -1, 1, 10, 12, -2, 16, 18, 22, 3, 0, 28, 30, -3, 36, 40, 42, 46, 5, 52, 58, 60, -4, 66, 70, 72, 78, -1, 82, 88, 96, 100, 102, 106, 108, 112, 9, 2, 126, -5, 130, 136, 138, 148, 150, 156, 162, 166, 11, 172, 178, 180, 190, 192, 196, 198, 210
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(1) = 1 by convention, in accordance with A025473(1) = 1 and A025474(1) = 0.

Crossrefs

A006093 and A090076 are subsequences.

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]] - f[[1, 2]], Nothing]]; s[1] = 1; Array[s, 250] (* Amiram Eldar, May 16 2025 *)

Formula

a(n) = A025473(n)-A025474(n) = A192134(n)*A025473(n)/A000961(n).

A257572 Prime root of n-th term in A257278.

Original entry on oeis.org

2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 3, 5, 2, 3, 2, 5, 2, 3, 2, 3, 2, 5, 2, 3, 2, 5, 2, 3, 7, 2, 3, 5, 2, 2, 3, 7, 2, 5, 3, 2, 2, 7, 3, 5, 2, 3, 2, 5, 2, 7, 3, 2, 2, 3, 5, 7, 2, 3, 2, 5, 2, 3, 7, 2, 5, 3, 2, 2, 3, 7, 2, 5, 2, 3, 11, 2, 7, 5, 3, 2, 2, 3
Offset: 1

Views

Author

Reinhard Zumkeller, May 01 2015

Keywords

Crossrefs

Programs

  • Haskell
    a257572 = a020639 . a257278
  • Mathematica
    seq[lim_] := Module[{s = {}, p = 2, r}, While[p^p <= lim, r = Range[p, Log[p, lim]]; AppendTo[s, Transpose[{ConstantArray[p, Length[r]], p^r}]]; p = NextPrime[p]]; SortBy[Flatten[s, 1], Last][[;; , 1]]]; seq[10^13] (* Amiram Eldar, Apr 14 2025 *)

Formula

a(n) = A020639(A257278(n)).
A257278(n) = a(n) ^ A257573(n).
a(n) <= A257573(n) by definition of A257278.

A085730 Euler's totient function applied to the sequence of prime powers.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 4, 6, 10, 12, 8, 16, 18, 22, 20, 18, 28, 30, 16, 36, 40, 42, 46, 42, 52, 58, 60, 32, 66, 70, 72, 78, 54, 82, 88, 96, 100, 102, 106, 108, 112, 110, 100, 126, 64, 130, 136, 138, 148, 150, 156, 162, 166, 156, 172, 178, 180, 190, 192, 196, 198, 210
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Crossrefs

Programs

  • Haskell
    a085730 1 = 1
    a085730 n = (p - 1) * p ^ (e - 1)
       where p =  a025473 n; e =  a025474 n
    -- Reinhard Zumkeller, Feb 16 2012
    
  • Mathematica
    f[p_, e_] := (p-1)*p^(e-1); s[n_] := If[n == 1, 1, If[PrimePowerQ[n], f @@ (FactorInteger[n][[1]]), Nothing]]; Array[s, 220] (* Amiram Eldar, Apr 05 2025 *)
  • PARI
    list(lim)=my(v=List(primes(primepi(lim)))); listput(v,1); for(e=2, log(lim+.5)\log(2),forprime(p=2,(lim+.5)^(1/e),listput(v, p^e))); apply(n->eulerphi(n),vecsort(Vec(v))) \\ Charles R Greathouse IV, Apr 30 2012

Formula

a(n) = A000010(A000961(n)).
a(p^e) = (p-1)*p^(e-1).
a(n) = (A025473(n)-1)*A025473(n)^(A025474(n)-1).

A192083 Arithmetic derivative of squares of prime powers: a(n) = A003415(A056798(n)).

Original entry on oeis.org

0, 4, 6, 32, 10, 14, 192, 108, 22, 26, 1024, 34, 38, 46, 500, 1458, 58, 62, 5120, 74, 82, 86, 94, 1372, 106, 118, 122, 24576, 134, 142, 146, 158, 17496, 166, 178, 194, 202, 206, 214, 218, 226, 5324, 18750, 254, 114688, 262, 274, 278, 298, 302, 314, 326, 334
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

A001787 and A024622 give record values and where they occur.

Crossrefs

Programs

  • Mathematica
    s[n_] := If[PrimePowerQ[n], f = FactorInteger[n][[1]]; 2*f[[2]]*n^(2 - 1/f[[2]]), Nothing]; s[1] = 0; Array[s, 200] (* Amiram Eldar, Apr 06 2025 *)

Formula

a(n) = 2 * A025474(n) * A025473(n)^(2*A025474(n) - 1).
A192084(n) = A003415(a(n)).

A207193 Auxiliary function for computing the Carmichael lambda function (A002322).

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 2, 6, 10, 12, 4, 16, 18, 22, 20, 18, 28, 30, 8, 36, 40, 42, 46, 42, 52, 58, 60, 16, 66, 70, 72, 78, 54, 82, 88, 96, 100, 102, 106, 108, 112, 110, 100, 126, 32, 130, 136, 138, 148, 150, 156, 162, 166, 156, 172, 178, 180, 190, 192, 196, 198
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 16 2012

Keywords

Crossrefs

Programs

  • Haskell
    a207193 1 = 1
    a207193 n | p == 2 && e > 2 = 2 ^ (e - 2)
              | otherwise       = (p - 1) * p ^ (e - 1)
              where p = a025473 n; e = a025474 n
  • Mathematica
    f[p_, e_] := If[p == 2 && e > 2, 2^(e-2), (p-1)*p^(e-1)]; s[n_] := If[n == 1, 1, If[PrimePowerQ[n], f @@ (FactorInteger[n][[1]]), Nothing]]; Array[s, 200] (* Amiram Eldar, Apr 05 2025 *)

Formula

a(n) = f(A000961(n)), where f(1) = 1, and f(p^e) = 2^(e-2) if p = 2 and e > 2, and f(p^e) = (p-1)*p^(e-1) otherwise.

A063872 Let m be the n-th positive integer such that phi(m) is divisible by m - phi(m). Then a(n) = phi(m)/(m - phi(m)).

Original entry on oeis.org

1, 2, 1, 4, 6, 1, 2, 10, 12, 1, 16, 18, 22, 4, 2, 28, 30, 1, 36, 40, 42, 46, 6, 52, 58, 60, 1, 66, 70, 72, 78, 2, 82, 88, 96, 100, 102, 106, 108, 112, 10, 4, 126, 1, 130, 136, 138, 148, 150, 156, 162, 166, 12, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232
Offset: 1

Views

Author

Labos Elemer, Aug 27 2001

Keywords

Comments

m is the n-th prime power larger than 1; i.e., m = A000961(n+1). Proof: If phi(m) is divisible by m-phi(m), then m is divisible by m-phi(m). Let k be the product of the distinct prime factors of m. Then phi(m)/m = phi(k)/k, so k/(k-phi(k)) = m/(m-phi(m)) is an integer. Thus k is divisible by k-phi(k) and k is squarefree. Let k-phi(k) = d and k/(k-phi(k)) = e; note that e>1 and GCD(d,e)=1. Thus d = k - phi(k) = d e - phi(d e) = d e - phi(d) phi(e) so d (e-1) = d e - d = phi(d) phi(e) <= phi(d) (e-1) and d <= phi(d). But this implies that d=1, so phi(k)=k-1 and k is prime. Hence m is a prime power. - Dean Hickerson, Aug 28 2001
For primes, quotient = (p - 1) / 1 = p - 1; for prime powers, p^a, a > 1: quotient = p^(a - 1)(p - 1) / p^(a - 1) = p - 1, so each p - 1 values occur infinitely often: a(n) + 1 = root of n-th prime power with positive exponent, i.e., A025473(n+1). - [Edited by] Daniel Forgues, May 08 2014
"LCM numeral system": a(n+1) is maximum digit for index n, n >= 0; a(-n) is maximum digit for index n, n < 0. - Daniel Forgues, May 03 2014

Crossrefs

Programs

  • Mathematica
    epd[n_]:=Module[{ep=EulerPhi[n]},If[Divisible[ep,n-ep],ep/(n-ep),Nothing]]; Array[epd,300,2] (* Harvey P. Dale, Dec 27 2020 *)
  • PARI
    M(n) = ispower(n, , &n); if (isprime(n), n, 1); \\ A014963
    apply(x->x-1, select(isprime, apply(x->M(x+1), [1..260]))) \\ Michel Marcus, Sep 14 2021

Formula

a(n) = A025473(n + 1) - 1. - Bill McEachen, Sep 11 2021

A085729 Sum of prime factors of prime powers.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 6, 6, 11, 13, 8, 17, 19, 23, 10, 9, 29, 31, 10, 37, 41, 43, 47, 14, 53, 59, 61, 12, 67, 71, 73, 79, 12, 83, 89, 97, 101, 103, 107, 109, 113, 22, 15, 127, 14, 131, 137, 139, 149, 151, 157, 163, 167, 26, 173, 179, 181, 191, 193, 197, 199, 211, 223
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 20 2003

Keywords

Crossrefs

Programs

  • Mathematica
    s[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, Times @@ f[[1]], Nothing]]; s[1] = 0; Array[s, 225] (* Amiram Eldar, May 14 2025 *)

Formula

a(n) = A001414(A000961(n)).
a(n) = e*p when n = p^e: a(n) = A025474(n)*A025473(n).
Previous Showing 11-20 of 28 results. Next