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-10 of 28 results. Next

A000961 Powers of primes. Alternatively, 1 and the prime powers (p^k, p prime, k >= 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 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
Offset: 1

Views

Author

Keywords

Comments

The term "prime power" is ambiguous. To a mathematician it means any number p^k, p prime, k >= 0, including p^0 = 1.
Any nonzero integer is a product of primes and units, where the units are +1 and -1. This is tied to the Fundamental Theorem of Arithmetic which proves that the factorizations are unique up to order and units. (So, since 1 = p^0 does not have a well defined prime base p, it is sometimes not regarded as a prime power. See A246655 for the sequence without 1.)
These numbers are (apart from 1) the numbers of elements in finite fields. - Franz Vrabec, Aug 11 2004
Numbers whose divisors form a geometrical progression. The divisors of p^k are 1, p, p^2, p^3, ..., p^k. - Amarnath Murthy, Jan 09 2002
These are also precisely the orders of those finite affine planes that are known to exist as of today. (The order of a finite affine plane is the number of points in an arbitrarily chosen line of that plane. This number is unique for all lines comprise the same number of points.) - Peter C. Heinig (algorithms(AT)gmx.de), Aug 09 2006
Except for first term, the index of the second number divisible by n in A002378, if the index equals n. - Mats Granvik, Nov 18 2007
These are precisely the numbers such that lcm(1,...,m-1) < lcm(1,...,m) (=A003418(m) for m>0; here for m=1, the l.h.s. is taken to be 0). We have a(n+1)=a(n)+1 if a(n) is a Mersenne prime or a(n)+1 is a Fermat prime; the converse is true except for n=7 (from Catalan's conjecture) and n=1, since 2^1-1 and 2^0+1 are not considered as Mersenne resp. Fermat prime. - M. F. Hasler, Jan 18 2007, Apr 18 2010
The sequence is A000015 without repetitions, or more formally, A000961=Union[A000015]. - Zak Seidov, Feb 06 2008
Except for a(1)=1, indices for which the cyclotomic polynomial Phi[k] yields a prime at x=1, cf. A020500. - M. F. Hasler, Apr 04 2008
Also, {A138929(k) ; k>1} = {2*A000961(k) ; k>1} = {4,6,8,10,14,16,18,22,26,32,34,38,46,50,54,58,62,64,74,82,86,94,98,...} are exactly the indices for which Phi[k](-1) is prime. - M. F. Hasler, Apr 04 2008
A143201(a(n)) = 1. - Reinhard Zumkeller, Aug 12 2008
Number of distinct primes dividing n=omega(n) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
Numbers n such that Sum_{p-1|p is prime and divisor of n} = Product_{p-1|p is prime and divisor of n}. A055631(n) = A173557(n-1). - Juri-Stepan Gerasimov, Dec 09 2009, Mar 10 2010
Numbers n such that A028236(n) = 1. Klaus Brockhaus, Nov 06 2010
A188666(k) = a(k+1) for k: 2*a(k) <= k < 2*a(k+1), k > 0; notably a(n+1) = A188666(2*a(n)). - Reinhard Zumkeller, Apr 25 2011
A003415(a(n)) = A192015(n); A068346(a(n)) = A192016(n); a(n)=A192134(n) + A192015(n). - Reinhard Zumkeller, Jun 26 2011
A089233(a(n)) = 0. - Reinhard Zumkeller, Sep 04 2013
The positive integers n such that every element of the symmetric group S_n which has order n is an n-cycle. - W. Edwin Clark, Aug 05 2014
Conjecture: these are numbers m such that Sum_{k=0..m-1} k^phi(m) == phi(m) (mod m), where phi(m) = A000010(m). - Thomas Ordowski and Giovanni Resta, Jul 25 2018
Numbers whose (increasingly ordered) divisors are alternatingly squares and nonsquares. - Michel Marcus, Jan 16 2019
Possible numbers of elements in a finite vector space. - Jianing Song, Apr 22 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • M. Koecher and A. Krieg, Ebene Geometrie, Springer, 1993.
  • R. Lidl and H. Niederreiter, Introduction to Finite Fields and Their Applications, Cambridge 1986, Theorem 2.5, p. 45.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

There are four different sequences which may legitimately be called "prime powers": A000961 (p^k, k >= 0), A246655 (p^k, k >= 1), A246547 (p^k, k >= 2), A025475 (p^k, k=0 and k >= 2). When you refer to "prime powers", be sure to specify which of these you mean. Also A001597 is the sequence of nontrivial powers n^k, n >= 1, k >= 2. - N. J. A. Sloane, Mar 24 2018
Cf. indices of record values of A003418; A000668 and A019434 give a member of twin pairs a(n+1)=a(n)+1.
A138929(n) = 2*a(n).
A028236 (if n = Product (p_j^k_j), a(n) = numerator of Sum 1/p_j^k_j). - Klaus Brockhaus, Nov 06 2010
A000015(n) = Min{term : >= n}; A031218(n) = Max{term : <= n}.
Complementary (in the positive integers) to sequence A024619. - Jason Kimberley, Nov 10 2015

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a000961 n = a000961_list !! (n-1)
    a000961_list = 1 : g (singleton 2) (tail a000040_list) where
    g s (p:ps) = m : g (insert (m * a020639 m) $ insert p s') ps
    where (m, s') = deleteFindMin s
    -- Reinhard Zumkeller, May 01 2012, Apr 25 2011
    
  • Magma
    [1] cat [ n : n in [2..250] | IsPrimePower(n) ]; // corrected by Arkadiusz Wesolowski, Jul 20 2012
    
  • Maple
    readlib(ifactors): for n from 1 to 250 do if nops(ifactors(n)[2])=1 then printf(`%d,`,n) fi: od:
    # second Maple program:
    a:= proc(n) option remember; local k; for k from
          1+a(n-1) while nops(ifactors(k)[2])>1 do od; k
        end: a(1):=1: A000961:= a:
    seq(a(n), n=1..100);  # Alois P. Heinz, Apr 08 2013
  • Mathematica
    Select[ Range[ 2, 250 ], Mod[ #, # - EulerPhi[ # ] ] == 0 & ]
    Select[ Range[ 2, 250 ], Length[FactorInteger[ # ] ] == 1 & ]
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]^m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, n]; max = w], {n, 1, 1000}]; a (* Artur Jasinski *)
    Join[{1}, Select[Range[2, 250], PrimePowerQ]] (* Jean-François Alcover, Jul 07 2015 *)
  • PARI
    A000961(n,l=-1,k=0)=until(n--<1,until(lA000961(lim=999,l=-1)=for(k=1,lim, l==lcm(l,k) && next; l=lcm(l,k); print1(k,",")) \\ M. F. Hasler, Jan 18 2007
    
  • PARI
    isA000961(n) = (omega(n) == 1 || n == 1) \\ Michael B. Porter, Sep 23 2009
    
  • PARI
    nextA000961(n)=my(m,r,p);m=2*n;for(e=1,ceil(log(n+0.01)/log(2)),r=(n+0.01)^(1/e);p=prime(primepi(r)+1);m=min(m,p^e));m \\ Michael B. Porter, Nov 02 2009
    
  • PARI
    is(n)=isprimepower(n) || n==1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    list(lim)=my(v=primes(primepi(lim)),u=List([1])); forprime(p=2,sqrtint(lim\1),for(e=2,log(lim+.5)\log(p),listput(u,p^e))); vecsort(concat(v,Vec(u))) \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primerange
    def A000961_list(limit): # following Python style, list terms < limit
        L = [1]
        for p in primerange(1, limit):
            pe = p
            while pe < limit:
                L.append(pe)
                pe *= p
        return sorted(L) # Chai Wah Wu, Sep 08 2014, edited by M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import primepi
    from sympy.ntheory.primetest import integer_nthroot
    def A000961(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Jul 23 2024
  • Sage
    def A000961_list(n):
        R = [1]
        for i in (2..n):
            if i.is_prime_power(): R.append(i)
        return R
    A000961_list(227) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A025473(n)^A025474(n). - David Wasserman, Feb 16 2006
a(n) = A117331(A117333(n)). - Reinhard Zumkeller, Mar 08 2006
Panaitopol (2001) gives many properties, inequalities and asymptotics, including a(n) ~ prime(n). - N. J. A. Sloane, Oct 31 2014, corrected by M. F. Hasler, Jun 12 2023 [The reference gives pi*(x) = pi(x) + pi(sqrt(x)) + ... where pi*(x) counts the terms up to x, so it is the inverse function to a(n).]
m=a(n) for some n <=> lcm(1,...,m-1) < lcm(1,...,m), where lcm(1...0):=0 as to include a(1)=1. a(n+1)=a(n)+1 <=> a(n+1)=A019434(k) or a(n)=A000668(k) for some k (by Catalan's conjecture), except for n=1 and n=7. - M. F. Hasler, Jan 18 2007, Apr 18 2010
A001221(a(n)) < 2. - Juri-Stepan Gerasimov, Oct 30 2009
A008480(a(n)) = 1 for all n >= 1. - Alois P. Heinz, May 26 2018
Sum_{k=1..n} 1/a(k) ~ log(log(a(n))) + 1 + A077761 + A136141. - François Huppé, Jul 31 2024

Extensions

Description modified by Ralf Stephan, Aug 29 2014

A051451 a(n) = lcm{ 1,2,...,x } where x is the n-th prime power (A000961).

Original entry on oeis.org

1, 2, 6, 12, 60, 420, 840, 2520, 27720, 360360, 720720, 12252240, 232792560, 5354228880, 26771144400, 80313433200, 2329089562800, 72201776446800, 144403552893600, 5342931457063200, 219060189739591200, 9419588158802421600, 442720643463713815200
Offset: 1

Views

Author

Labos Elemer, Dec 11 1999

Keywords

Comments

This sequence is the list of distinct terms in A003418.
This may be the "smallest" product-based numbering system that has a unique finite representation for every rational number. In this base 1/2 = .1 (1*1/2), 1/3 = .02 (0*1/2 + 2*1/6), 1/5 = .0102 (0*1/2 + 1*1/6 + 0*1/12 + 2*1/60). - Russell Easterly, Oct 03 2001
Partial products of A025473, prime roots of the prime powers.
Conjecture: For every n > 2, there exists a twin prime pair [p, p+2] with p < a(n), such that [a(n)+p, a(n)+p+2] is also a twin prime pair. Example: For n=6 we can take p=11, because for a(6) = 420 is [420+11, 420+13] = [431, 433] also a twin prime pair. This has been verified for 2 < n <= 200. - Mike Winkler, Sep 12 2013, May 09 2014
The prime powers give all values, and do so uniquely. (Other positive integers give repeated values.) - Daniel Forgues, Apr 28 2014
"LCM numeral system": a(n+1) is place value for index n, n >= 0; a(-n+1) is (place value)^(-1) for index n, n < 0. - Daniel Forgues, May 03 2014
Repetitions removed from slowest growing integer series A003418 with integers > 0 converging to 0 in the ring Z^ of profinite integers. Both A003418 and the present sequence may be used as a replacement for the usual "factorial system" for coding profinite integers. - Herbert Eberle, May 01 2016
Every term of this sequence is deeply composite (A095848). Moreover, the terms of this sequence are the "special deeply composite numbers", in analogy to the special highly composite numbers (A106037). A special highly composite number is a highly composite number (A002182) that divides every larger highly composite number. In the same fashion, the deeply composite numbers that divide every larger deeply composite number are just the terms of this sequence. This follows from the formula for deeply composite numbers. - Hal M. Switkay, Jun 08 2021
From Bill McEachen, Apr 28 2023: (Start)
Every term belongs to A025487.
Conjecture: Every term = A001013(j)*A129912(k) for some j,k. (End)

Examples

			lcm[1,...,n] is 2520 for n=9 and 10. The smallest such n's are always prime powers, where A003418 jumps.
		

Crossrefs

Programs

  • Haskell
    a051451 n = a051451_list !! (n-1)
    a051451_list = scanl1 lcm a000961_list
    -- Reinhard Zumkeller, Mar 01 2012
    
  • Mathematica
    f[n_] := LCM @@ Range@ n; Union@ Array[f, 41] (* Robert G. Wilson v, Jul 11 2011 *)
    Join[{1},LCM@@Range[#]&/@Select[Range[50],PrimePowerQ]] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    do(lim)=my(v=primes(primepi(lim)), u=List([1])); forprime(p=2, sqrtint(lim\1), for(e=2, log(lim+.5)\log(p), listput(u, p^e))); v=vecsort(concat(v, Vec(u))); for(i=2,#v,v[i]=lcm(v[i],v[i-1])); v \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    {lim=100; n=1; i=1; j=1; until(n==lim, until(a!=j, a=lcm(j,i+1); i++;); j=a; n++; print(n" "a););} \\ Mike Winkler, Sep 07 2013
    
  • PARI
    x=1;for(i=1,100,if(omega(i)==1,x*=factor(i)[1,1])) \\ Florian Baur, Apr 11 2022
    
  • Python
    from math import prod
    from sympy import primepi, integer_nthroot, integer_log, primerange
    def A051451(n):
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return prod(p**integer_log(m, p)[0] for p in primerange(m+1)) # Chai Wah Wu, Aug 15 2024
  • Sage
    def A051451_list(n):
        a = [ ]
        L = [1]
        for i in (1..n):
           a.append(i)
           if (is_prime_power(i) == 1):
               L.append(lcm(a))
        return(L)
    A051451_list(42) # Jani Melik, Jul 07 2022
    

Formula

a(n) = A003418(A000961(n)).
a(n) = A208768(n) + 1. - Reinhard Zumkeller, Mar 01 2012
Sum_{n>=1} 1/a(n) = A064890. - Amiram Eldar, Nov 16 2020

Extensions

Minor edits by Ray Chandler, Jan 16 2009

A025474 Exponent of the n-th prime power A000961(n).

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 3, 2, 1, 1, 4, 1, 1, 1, 2, 3, 1, 1, 5, 1, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 8, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of automorphisms on the field with order A000961(n). This group of automorphisms is cyclic of order a(n). - Geoffrey Critzer, Feb 23 2018

Crossrefs

Cf. A000961 (the prime powers), A025473 (prime root of these), A100995 (exponent of prime powers or 0 otherwise), A001222 (bigomega), A056798 (prime powers with even exponents).
Cf. A117331.

Programs

  • Haskell
    a025474 = a001222 . a000961 -- Reinhard Zumkeller, Aug 13 2013
    
  • Mathematica
    Prepend[Table[ FactorInteger[q][[1, 2]], {q,
    Select[Range[1, 1000], PrimeNu[#] == 1 &]}], 0] (* Geoffrey Critzer, Feb 23 2018 *)
  • PARI
    A025474_upto(N)=apply(bigomega, A000961_list(N)) \\ M. F. Hasler, Jun 16 2022
    
  • Python
    A025474_upto = lambda N: [A001222(n) for n in A000961_list(N)] # M. F. Hasler, Jun 16 2022
    
  • Python
    from sympy import prime, integer_nthroot, factorint
    def A025474(n):
        if n == 1: return 0
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return list(factorint(m).values())[0] # Chai Wah Wu, Aug 15 2024

Formula

a(n) = A100995(A000961(n)).
A000961(n) = A025473(n)^a(n); A056798(n) = A025473(n)^(2*a(n));
A192015(n) = a(n)*A025473(n)^(a(n)-1). - Reinhard Zumkeller, Jun 24 2011
a(n) = A001222(A000961(n)). - David Wasserman, Feb 16 2006

Extensions

Edited by M. F. Hasler, Jun 16 2022

A056798 Prime powers with even nonnegative exponents.

Original entry on oeis.org

1, 4, 9, 16, 25, 49, 64, 81, 121, 169, 256, 289, 361, 529, 625, 729, 841, 961, 1024, 1369, 1681, 1849, 2209, 2401, 2809, 3481, 3721, 4096, 4489, 5041, 5329, 6241, 6561, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12769, 14641, 15625, 16129, 16384
Offset: 1

Views

Author

Labos Elemer, Aug 28 2000

Keywords

Comments

Also numbers whose geometric mean of divisors is an integer. - Ctibor O. Zizka, Sep 29 2008
This is just a special case. In fact, the numbers whose geometric mean of divisors is an integer are all the squares of integers (A000290). - Daniel Lignon, Nov 29 2014

Crossrefs

Programs

  • Mathematica
    Take[Union[Flatten[Table[Prime[n]^k, {n, 31}, {k, 0, 14, 2}]]], 45] (* Alonso del Arte, Jul 05 2011 *)
  • PARI
    is(n)=my(e=isprimepower(n)); if(e, e%2==0, n==1) \\ Charles R Greathouse IV, Sep 18 2015
    
  • Python
    from sympy import primepi, integer_nthroot
    def A056798(n):
        if n==1: return 1
        def f(x): return int(n-2+x-sum(primepi(integer_nthroot(x,k)[0])for k in range(2,x.bit_length(),2)))
        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 kmax # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A025473(n)^(2*A025474(n)) = A000961(n)^2;
A001222(a(n)) mod 2 = 0;
A003415(a(n)) = A192083(n); A068346(a(n)) = A192084(n). - Reinhard Zumkeller, Jun 26 2011
Sum_{n>=2} 1/a(n) = A154945. - Amiram Eldar, Sep 21 2020

A051613 a(n) = partitions of n into powers of distinct primes (1 not considered a power).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 4, 4, 4, 8, 4, 8, 6, 9, 8, 10, 10, 13, 12, 13, 16, 16, 19, 17, 21, 23, 23, 25, 29, 31, 31, 31, 37, 40, 42, 44, 48, 49, 54, 55, 64, 67, 68, 70, 77, 84, 90, 92, 99, 102, 108, 115, 127, 133, 135, 138, 150, 165, 171, 183, 186, 198, 201, 220
Offset: 0

Views

Author

Keywords

Examples

			a(16) = 8 because we can write 16 = 2^4 = 3+13 = 5+11 = 3^2+7 = 2+3+11 = 2+3^2+5 = 2^3+3+5 = 2^2+5+7.
		

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo3, integral)
    a051613' = p 1 2 where
       p x _ 0 = 1
       p x k m | m < qq       = 0
               | mod x q == 0 = p x (k + 1) m
               | otherwise    = p (q * x) (k + 1) (m - qq) + p x (k + 1) m
               where q = a025473 k; qq = a000961 k
    -- Reinhard Zumkeller, Nov 23 2015
    
  • Maple
    b:= proc(n,i) option remember; local p;
          p:= `if`(i<1, 1, ithprime(i));
          `if`(n=0, 1, `if`(i<1, 0, b(n,i-1)+
          add(b(n-p^j, i-1), j=1..ilog[p](n))))
        end:
    a:= n-> b(n, numtheory[pi](n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Feb 15 2013
  • Mathematica
    max = 70; f[x_] := Product[ 1 + Sum[x^(Prime[n]^k), {k, 1, If[n > 4, 1, 6]}], {n, 1, PrimePi[max]}]; CoefficientList[ Series[f[x], {x, 0, max}] , x](* Jean-François Alcover, Sep 12 2012 *)
  • PARI
    first(n)=my(x='x,pr=O(x^(n+1))+1); forprime(p=sqrtint(n)+1,n, pr*=1+x^p); forprime(p=2,sqrtint(n), pr*=1+sum(e=1,logint(n,2), x^p^e)); Vec(pr) \\ Charles R Greathouse IV, Jun 25 2017

Formula

a(n) = number of m such that A008475(m) = n.
G.f.: Product_{p prime} (1 + Sum_{k >= 1} x^(p^k)).

Extensions

Better description from David W. Wilson, Apr 19 2000

A192015 Arithmetic derivative of prime powers: a(n) = A003415(A000961(n)).

Original entry on oeis.org

0, 1, 1, 4, 1, 1, 12, 6, 1, 1, 32, 1, 1, 1, 10, 27, 1, 1, 80, 1, 1, 1, 1, 14, 1, 1, 1, 192, 1, 1, 1, 1, 108, 1, 1, 1, 1, 1, 1, 1, 1, 22, 75, 1, 448, 1, 1, 1, 1, 1, 1, 1, 1, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 405, 1, 1024, 1, 1, 1, 1, 1, 1, 1, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(A000040(n)) = 1; a(A002808(n)) > 1;
A001787, A027471, A100484, A079705 and A051674 are subsequences;
A001787 and A024622 give record values and where they occur;
A192016(n) = A003415(a(n)).

Programs

  • Haskell
    a192015 = a003415 . a000961  -- Reinhard Zumkeller, Apr 16 2014
    
  • Mathematica
    Join[{0}, Reap[For[n = 1, n <= 300, n++, f = FactorInteger[n]; If[Length[f] == 1, Sow[n*Total[Apply[#2/#1&, f, {1}]]]]]][[2, 1]]] (* Jean-François Alcover, Feb 21 2014 *)
  • Python
    from sympy import primepi, integer_nthroot, factorint
    def A192015(n):
        if n == 1: return 0
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return sum((m*e//p for p,e in factorint(m).items())) # Chai Wah Wu, Aug 15 2024

Formula

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

A192134 Difference between n-th prime power and its arithmetic derivative.

Original entry on oeis.org

1, 1, 2, 0, 4, 6, -4, 3, 10, 12, -16, 16, 18, 22, 15, 0, 28, 30, -48, 36, 40, 42, 46, 35, 52, 58, 60, -128, 66, 70, 72, 78, -27, 82, 88, 96, 100, 102, 106, 108, 112, 99, 50, 126, -320, 130, 136, 138, 148, 150, 156, 162, 166, 143, 172, 178, 180, 190, 192, 196
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Crossrefs

Programs

  • Haskell
    a192134 n = a000961 n - a192015 n  -- Reinhard Zumkeller, Apr 16 2014
  • Mathematica
    f[n_] := If[n == 1, 1, If[PrimePowerQ[n], {p, e} = FactorInteger[n][[1]]; n - e*p^(e-1), Nothing]]; Array[f, 300] (* Amiram Eldar, Apr 11 2025 *)

Formula

a(n) = A000961(n)-A192015(n) = A000961(n)-A003415(A000961(n)) = A192133(n)*A025473(n)^(A025474(n)-1) = A192133(n)*A000961(n)/A025473(n).
a(A095874(A000040(n))) = A006093(n).
a(A095874(A001248(n))) = A005722(n) + 1.

A025476 Prime root of n-th nontrivial prime power (A025475, A246547).

Original entry on oeis.org

2, 2, 3, 2, 5, 3, 2, 7, 2, 3, 11, 5, 2, 13, 3, 2, 17, 7, 19, 2, 23, 5, 3, 29, 31, 2, 11, 37, 41, 43, 2, 3, 13, 47, 7, 53, 5, 59, 61, 2, 67, 17, 71, 73, 79, 3, 19, 83, 89, 2, 97, 101, 103, 107, 109, 23, 113, 11, 5, 127, 2, 7, 131, 137, 139, 3, 149, 151, 29, 157, 163, 167, 13, 31, 173, 179
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    cvm := proc(n, level) local f,opf; if n < 2 then RETURN() fi;
    f := ifactors(n); opf := op(1,op(2,f)); if nops(op(2,f)) > 1 or
    op(2,opf) <= level then RETURN() fi; op(1,opf) end:
    A025476_list := n -> seq(cvm(i,1),i=1..n); # n is search limit
    A025476_list(30000);  # Peter Luschny, Sep 21 2011
    # Alternative:
    isA246547 := n -> n > 1 and not isprime(n) and type(n, 'primepower'):
    seq(ifactors(p)[2][1][1], p in select(isA246547, [$1..30000])); # Peter Luschny, Jul 15 2023
  • Mathematica
    Transpose[ Flatten[ FactorInteger[ Select[ Range[2, 30000], !PrimeQ[ # ] && Mod[ #, # - EulerPhi[ # ]] == 0 &]], 1]][[1]] (* Robert G. Wilson v *)
  • PARI
    forcomposite(n=4,10^5,if( ispower(n, , &p) && isprime(p), print1(p,", "))) \\ Joerg Arndt, Sep 11 2021
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A025476(n):
        def f(x): return int(n-1+x-sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,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 primefactors(kmax)[0] # Chai Wah Wu, Aug 15 2024

A091051 Sum of divisors of n that are perfect powers.

Original entry on oeis.org

1, 1, 1, 5, 1, 1, 1, 13, 10, 1, 1, 5, 1, 1, 1, 29, 1, 10, 1, 5, 1, 1, 1, 13, 26, 1, 37, 5, 1, 1, 1, 61, 1, 1, 1, 50, 1, 1, 1, 13, 1, 1, 1, 5, 10, 1, 1, 29, 50, 26, 1, 5, 1, 37, 1, 13, 1, 1, 1, 5, 1, 1, 10, 125, 1, 1, 1, 5, 1, 1, 1, 58, 1, 1, 26, 5, 1, 1, 1, 29, 118, 1, 1, 5, 1, 1, 1, 13, 1, 10
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 15 2003

Keywords

Comments

a(n) = 1 iff n is squarefree: a(A005117(n))=1, a(A013929(n))>1;
a(p^k) = 1+(p^2)*(p^(k-1)-1)/(p-1) for p prime, k>0.
a(A000961(n)) = A086455(n)-A025473(n).

Examples

			Divisors of n=108: {1,2,3,4,6,9,12,18,27,36,54,108}, a(108) = 1^2 + 2^2 + 3^2 + 3^3 + 6^2 = 1+4+9+27+36 = 77.
		

Crossrefs

Differs from A183097 for the first time at n=72.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, #*Boole[# == 1 || GCD @@ FactorInteger[#][[All, 2]] > 1]&]; Array[a, 90] (* Jean-François Alcover, May 09 2017 *)
  • PARI
    a(n) = sumdiv(n, d, d*((d==1) || ispower(d))); \\ Michel Marcus, Oct 02 2014

Formula

G.f.: Sum_{k=i^j, i>=1, j>=2, excluding duplicates} k*x^k/(1 - x^k). - Ilya Gutkovskiy, Mar 20 2017

A053811 Primes (in order) occurring in A053810.

Original entry on oeis.org

2, 2, 3, 5, 3, 2, 7, 11, 5, 2, 13, 3, 17, 7, 19, 23, 29, 31, 11, 37, 41, 43, 2, 3, 13, 47, 53, 5, 59, 61, 67, 17, 71, 73, 79, 19, 83, 89, 2, 97, 101, 103, 107, 109, 23, 113, 127, 7, 131, 137, 139, 149, 151, 29, 157, 163, 167, 31, 173, 179, 181, 191, 193, 197, 199, 211, 223
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])); A = vector(count); for (i = 1, count, f = factor(v[i]); A[i] = f[1, 1]); A \\ David Wasserman, Feb 17 2006
    
  • Python
    from sympy import primepi, integer_nthroot, primerange, primefactors
    def A053811(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 primefactors(kmax)[0] # Chai Wah Wu, Aug 13 2024

Formula

a(n) = A006530(A053810(n)) = A020639(A053810(n)). - David Wasserman, Feb 17 2006
a(n) = A053810(n)^(1/A053812(n)). - Amiram Eldar, Nov 21 2020

Extensions

More terms from David Wasserman, Feb 17 2006
Offset corrected by Amiram Eldar, Nov 21 2020
Showing 1-10 of 28 results. Next