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 34 results. Next

A068315 For numbers k such that A025474(k) > 1 and A025474(k+1) > 1, sequence gives A000961(k).

Original entry on oeis.org

8, 25, 121, 2187, 32761
Offset: 1

Views

Author

Naohiro Nomoto, Mar 08 2002

Keywords

Comments

Equivalently, prime powers (either A000961 or A246655) q such that q and the next prime power are both composite numbers. - Paolo Xausa, Oct 25 2023

Examples

			The interval (121,122,123,124,125) contains no primes, so 121 is in the sequence. - _Gus Wiseman_, Dec 24 2024
		

Crossrefs

Bisection of A068435.
For perfect powers instead of prime powers we have A116086, indices A274605.
The position of a(k) in the prime powers A246655 is A379156(k).
For just one prime we have A379157, indices A379155.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A046933 gives run-lengths of composites between primes.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers, differences A057820.
A366833 counts prime powers between primes, see A053607, A304521.
A366835 counts primes between prime powers.

Programs

  • Mathematica
    With[{upto=33000},Map[First,Select[Partition[Select[Range[upto],PrimePowerQ],2,1],NoneTrue[#,PrimeQ]&]]] (* Paolo Xausa, Oct 25 2023 *)

Formula

a(n) = A246655(A379156(n)). - Gus Wiseman, Dec 24 2024

Extensions

Definition corrected by Jinyuan Wang, Sep 05 2020

A175107 a(1)=1. For n >= 2, if A025474(n) is the exponent of the n-th prime-power (1 is considered the first prime-power here), then a(n) = the A025474(n)th integer from among those positive integers not yet in the sequence.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 9, 8, 7, 10, 14, 11, 12, 13, 16, 18, 15, 17, 23, 19, 20, 21, 22, 25, 24, 26, 27, 33, 28, 29, 30, 31, 36, 32, 34, 35, 37, 38, 39, 40, 41, 43, 45, 42, 51, 44, 46, 47, 48, 49, 50, 52, 53, 55, 54, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 73, 69, 78, 70
Offset: 1

Views

Author

Leroy Quet, Feb 11 2010

Keywords

Comments

This sequence is a permutation of the positive integers.

Examples

			9 is the 8th power of a prime. 9 = 3^2. So we want the 2nd integer (because 2 is the exponent) from among those positive integers not in the first 7 terms of the sequence. The first 7 terms are 1,2,3,5,4,6, 9. Those positive integers not yet appearing form the infinite sequence 7,8,10,11,12,13,14,15,16... The 2nd integer not yet occurring is 8. So a(9)=8.
		

Crossrefs

Cf. A025474.

Extensions

Extended by Ray Chandler, Mar 10 2010

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

A100995 If n is a prime power p^m, m >= 1, then m, otherwise 0.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 26 2004

Keywords

Comments

Calculate matrix powers: (A175992^1)/1 - (A175992^2)/2 + (A175992^3)/3 - (A175992^4)/4 + ... Then the nonzero values of a(n) are found as reciprocals in the first column. Compare this to the Taylor series for log(1+x) = (x)/1 - (x^2)/2 + (x^3)/3 - (x^4)/4 + ... Therefore it is natural to write 0, 1/1, 1/1, 1/2, 1/1, 0, 1/1, 1/3, 1/2, 0, 1/1, ... Raising n to a such power gives A014963. - Mats Granvik, Gary W. Adamson, Apr 04 2011
The Dirichlet series that generates the reciprocals of this sequence is the logarithm of the Riemann zeta function. - Mats Granvik, Gary W. Adamson, Apr 04 2011
Number of automorphisms of the finite field with n elements, or 0 if the field does not exist. For n=p^k where p is a prime and k is an integer, the automorphism group of the finite field with n elements is a cyclic group of order k generated by the Frobenius endomorphism. - Yancheng Lu, Jan 11 2021

Crossrefs

Programs

  • Haskell
    a100995 n = f 0 n where
       f e 1 = e
       f e x = if r > 0 then 0 else f (e + 1) x'
               where (x', r) = divMod x p
       p = a020639 n
    -- Reinhard Zumkeller, Mar 19 2013
  • Maple
    f:= proc(n) local F;
        F:= ifactors(n)[2];
        if nops(F) = 1 then F[1][2]
        else 0
        fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 09 2015
  • Mathematica
    ppm[n_]:=If[PrimePowerQ[n],FactorInteger[n][[1,2]],0]; Array[ppm,110] (* Harvey P. Dale, Mar 03 2014 *)
    a=Table[Limit[Sum[If[Mod[n, k] == 0, MoebiusMu[n/k]/(n/k)^(s - 1)/(1 - 1/n^(s - 1)), 0], {k, 1, n}], s -> 1], {n, 1, 105}];
    Numerator[a]*Denominator[a] (* Mats Granvik, Jun 09 2015 *)
    a = FullSimplify[Table[MangoldtLambda[n]/Log[n], {n, 1, 105}]]
    Numerator[a]*Denominator[a] (* Mats Granvik, Jun 09 2015 *)
  • PARI
    {a(n) = my(t); if( n<1, 0, t = factor(n); if( [1,2] == matsize(t), t[1,2], 0))} /* Michael Somos, Aug 15 2012 */
    
  • PARI
    {a(n) = my(t); if( n<1, 0, if( t = isprimepower(n), t))} /* Michael Somos, Aug 15 2012 */
    

Formula

A100994(n) = A014963(n)^a(n);
a(A000961(n)) = A025474(n).
a(n) = Sum_{d|n, gcd(d, n/d) = 1} (-1)^omega(n/d) * bigomega(d). - Ilya Gutkovskiy, Apr 15 2021

Extensions

Edited by Daniel Forgues and N. J. A. Sloane, Aug 18 2009

A025473 a(1) = 1; for n > 1, a(n) = prime root of n-th prime power (A000961).

Original entry on oeis.org

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

Views

Author

David W. Wilson, Dec 11 1999

Keywords

Comments

This sequence is related to the cyclotomic sequences A013595 and A020500, leading to the procedure used in the Mathematica program. - Roger L. Bagula, Jul 08 2008
"LCM numeral system": a(n+1) is radix for index n, n >= 0; a(-n+1) is 1/radix for index n, n < 0. - Daniel Forgues, May 03 2014
This is the LCM-transform of A000961; same as A014963 with all 1's (except a(1)) removed. - David James Sycamore, Jan 11 2024

References

  • Paul J. McCarthy, Algebraic Extensions of Fields, Dover books, 1976, pages 40, 69

Crossrefs

Programs

  • Haskell
    a025473 = a020639 . a000961 -- Reinhard Zumkeller, Aug 14 2013
    
  • 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:
    A025473_list := n -> [1,seq(cvm(i,0),i=1..n)];
    A025473_list(240); # Peter Luschny, Sep 21 2011
  • Mathematica
    a = Join[{1}, Flatten[Table[If[PrimeQ[Apply[Plus, CoefficientList[Cyclotomic[n, x], x]]], Apply[Plus, CoefficientList[Cyclotomic[n, x], x]], {}], {n, 1, 1000}]]] (* Roger L. Bagula, Jul 08 2008 *)
    Join[{1}, First@ First@# & /@ FactorInteger@ Select[Range@ 240, PrimePowerQ]] (* Robert G. Wilson v, Aug 17 2017 *)
  • PARI
    print1(1); for(n=2,1e3, if(isprimepower(n,&p), print1(", "p))) \\ Charles R Greathouse IV, Apr 28 2014
    
  • Python
    from sympy import primepi, integer_nthroot, primefactors
    def A025473(n):
        if n == 1: return 1
        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 primefactors(m)[0] # Chai Wah Wu, Aug 15 2024
  • Sage
    def A025473_list(n) :
        R = [1]
        for i in (2..n) :
            if i.is_prime_power() :
                R.append(prime_divisors(i)[0])
        return R
    A025473_list(239) # Peter Luschny, Feb 07 2012
    

Formula

a(n) = A006530(A000961(n)) = A020639(A000961(n)). - David Wasserman, Feb 16 2006
From Reinhard Zumkeller, Jun 26 2011: (Start)
A000961(n) = a(n)^A025474(n).
A056798(n) = a(n)^(2*A025474(n)).
A192015(n) = A025474(n)*a(n)^(A025474(n)-1). (End)
a(1) = A051451(1) ; for n > 1, a(n) = A051451(n)/A051451(n-1). - Peter Munn, Aug 11 2024

Extensions

Offset corrected by David Wasserman, Dec 22 2008

A091050 Number of divisors of n that are perfect powers.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 3, 2, 1, 3, 2, 1, 1, 1, 5, 1, 1, 1, 4, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 4, 2, 2, 1, 2, 1, 3, 1, 3, 1, 1, 1, 2, 1, 1, 2, 6, 1, 1, 1, 2, 1, 1, 1, 5, 1, 1, 2, 2, 1, 1, 1, 4, 4, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 5, 1, 2, 2, 4, 1, 1
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 15 2003

Keywords

Comments

Not the same as A005361: a(72)=5 <> A005361(72)=6.

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} = 5.
		

Crossrefs

Programs

  • Haskell
    a091050 = sum . map a075802 . a027750_row
    -- Reinhard Zumkeller, Dec 13 2012
    
  • Mathematica
    ppQ[n_] := GCD @@ Last /@ FactorInteger@ n > 1; ppQ[1] = True; f[n_] := Length@ Select[ Divisors@ n, ppQ]; Array[f, 105] (* Robert G. Wilson v, Dec 12 2012 *)
  • PARI
    a(n) = 1+ sumdiv(n, d, ispower(d)>1); \\ Michel Marcus, Sep 21 2014
    
  • PARI
    a(n)={my(f=factor(n)[,2]); 1 + if(#f, sum(k=2, vecmax(f), moebius(k)*(1 - prod(i=1, #f, 1 + f[i]\k))))} \\ Andrew Howroyd, Aug 30 2020

Formula

a(n) = 1 iff n is squarefree: a(A005117(n)) = 1, a(A013929(n)) > 1.
a(p^k) = k for p prime, k>0: a(A000961(n)) = A025474(n).
a(n) = Sum_{k=1..A000005(n)} A075802(A027750(n,k)). - Reinhard Zumkeller, Dec 13 2012
G.f.: Sum_{k=i^j, i>=1, j>=2, excluding duplicates} x^k/(1 - x^k). - Ilya Gutkovskiy, Mar 20 2017
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 + A072102 = 1.874464... . - Amiram Eldar, Dec 31 2023

Extensions

Wrong formula deleted by Amiram Eldar, Apr 29 2020

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

A366835 In the pair (A246655(n), A246655(n+1)), how many primes are there?

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Oct 25 2023

Keywords

Comments

First 0 terms appear at n = 6, 14, 41, 359, 3589, corresponding to consecutive prime powers (8,9), (25,27), (121,125), (2187,2197) and (32761,32768), respectively (cf. A068315 and A068435).
There cannot be primes strictly between consecutive prime powers, so we get the same result considering the whole interval (not just the pair). - Gus Wiseman, Dec 25 2024

Examples

			a(1) = 2 because in the first prime power pair (2 and 3) there are two primes.
a(14) = 0 because in the 14th prime power pair (25 and 27) there are no primes.
		

Crossrefs

For perfect powers instead of prime powers we have A080769.
Positions of 1 are A379155, indices of A379157.
Positions of 0 are A379156, indices of A068315.
Positions of 2 are A379158, indices of A379541.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A080101 and A366833 count prime powers between primes, see A053607, A304521.
A246655 lists the prime powers, differences A057820.

Programs

  • Mathematica
    With[{upto=500},Map[Count[#,_?PrimeQ]&,Partition[Select[Range[upto],PrimePowerQ],2,1]]] (* Considers prime powers up to 500 *)
  • PARI
    lista(nn) = my(v=[p| p <- [1..nn], isprimepower(p)]); vector(#v-1, k, isprime(v[k]) + isprime(v[k+1])); \\ Michel Marcus, Oct 26 2023

A379155 Numbers k such that there is a unique prime between the k-th and (k+1)-th prime powers (A246655).

Original entry on oeis.org

2, 3, 5, 7, 9, 10, 13, 15, 17, 18, 22, 23, 26, 27, 31, 32, 40, 42, 43, 44, 52, 53, 67, 68, 69, 70, 77, 78, 85, 86, 90, 91, 116, 117, 119, 120, 135, 136, 151, 152, 169, 170, 186, 187, 197, 198, 243, 244, 246, 247, 291, 292, 312, 313, 339, 340, 358, 360, 362
Offset: 1

Views

Author

Gus Wiseman, Dec 22 2024

Keywords

Comments

Numbers k such that exactly one of A246655(k) and A246655(k+1) is prime. - Robert Israel, Jan 22 2025
The prime powers themselves are: 3, 4, 7, 9, 13, 16, 23, 27, 31, 32, 47, 49, 61, 64, ...

Examples

			The 4th and 5th prime powers are 5 and 7, with interval (5,6,7) containing two primes, so 4 is not in the sequence.
The 13th and 14th prime powers are 23 and 25, with interval (23,24,25) containing only one prime, so 13 is in the sequence.
The 18th and 19th prime powers are 32 and 37, with interval (32,33,34,35,36,37) containing just one prime 37, so 18 is in the sequence.
		

Crossrefs

These are the positions of 1 in A366835, for perfect powers A080769.
For perfect powers instead of prime powers we have A378368.
For no primes we have A379156, for perfect powers A274605.
The prime powers themselves are A379157, for previous A175106.
A000015 gives the least prime power >= n.
A000040 lists the primes, differences A001223.
A000961 lists the powers of primes, differences A057820.
A031218 gives the greatest prime power <= n.
A065514 gives the greatest prime power < prime(n), difference A377289.
A246655 lists the prime powers.
A366833 counts prime powers between primes, see A053607, A304521.

Programs

  • Maple
    N:= 1000: # for terms k where A246655(k+1) <+ N
    P:= select(isprime,[2,seq(i,i=3..N,2)]):
    S:= convert(P,set):
    for p in P while p^2 <= N do
      S:= S union {seq(p^j,j=2..ilog[p](N))}
    od:
    PP:= sort(convert(S,list)):
    state:= 1: Res:= NULL:
    ip:= 2:
    for i from 2 to nops(PP) do
      if PP[i] = P[ip] then
        if state = 0 then Res:= Res,i-1 fi;
        state:= 1;
        ip:= ip+1;
      else
        if state = 1 then Res:= Res,i-1 fi;
        state:= 0;
      fi
    od:
    Res; # Robert Israel, Jan 22 2025
  • Mathematica
    v=Select[Range[100],PrimePowerQ];
    Select[Range[Length[v]-1],Length[Select[Range[v[[#]],v[[#+1]]],PrimeQ]]==1&]

Formula

A246655(a(n)) = A379157(n).

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).
Showing 1-10 of 34 results. Next