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

A097056 Numbers n such that the interval n^2 < x < (n+1)^2 contains two or more distinct nonsquare perfect powers A097054.

Original entry on oeis.org

5, 11, 46, 2536, 558640, 572783, 3362407, 7928108, 8928803, 67460050, 106938971, 1763350849, 2501641555, 2756149047, 4584349318, 5713606932, 17941228664, 375376083513, 411124334926, 452894760105, 1167680330892, 1933159894790, 1946131548918, 2506032014606, 2507269866902, 8217688694093
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Comments

Empirically, there seem to be no intervals between consecutive squares containing more than two nonsquare perfect powers.
It is easy to see that two distinct powers between n^2 and (n+1)^2 are necessarily of the form x^p and y^q where p, q are distinct odd primes. Among the first 180 terms, only 4 are of type (p,q) = (3,7) and all others are of type (3,5). The first term with q = 11, if it exists, is > (1e6)^(11/2) = 1e33. - M. F. Hasler, Jan 18 2021

Examples

			a(1) = 5: 5^2 < 3^3 < 2^5 < 6^2,
a(2) = 11: 11^2 < 5^3 < 2^7 < 12^2,
a(3) = 46: 46^2 = 2116 < 3^7 = 2187 < 13^3 = 2197 < 47^2 = 2209.
a(4) = 2536: 2536^2 = 6431296 < 186^3 = 6434856 < 23^5 = 6436343 < 2537^2 = 6436369.
22 is not in the sequence because 2^9 and 8^3 (22^2 < 512 < 23^2) are not distinct.
Also, 181 is not listed since between 181^2 and 182^2 there is only 32^3 = 8^5.
		

Crossrefs

Cf. A173341 (q=5), A173342 (q=7): y with a(n)^2 < y^q < (a(n)+1)^2.

Programs

  • PARI
    is(n)=my(s,t); forprime(p=3,2*log(n+1.5)\log(2), t=floor((n+1)^(2/p)); if(t^p>n^2 && !ispower(t) && s++ > 1, return(1))); 0 \\ Charles R Greathouse IV, Dec 11 2012
    
  • PARI
    haspow(lower,upper,eMin,eMax)=if(sqrtnint(upper,3)^3>lower, return(1)); forprime(e=eMin,eMax, if(sqrtnint(upper,e)^e>lower, return(1))); 0
    list(lim)=lim\=1; my(v=List(),M=(lim+1)^2,L=logint(M,2),s); forprime(e=5,L, forprime(p=2,sqrtnint(M,e), s=sqrtint(p^e); if(haspow(s^2,(s+1)^2-1,e+1,L) && s<=lim, listput(v,s)))); Set(v) \\ Charles R Greathouse IV, Nov 05 2015

Extensions

a(5)-a(20) from Don Reble
a(21)-a(26) from David Wasserman, Dec 17 2007

A097055 Numbers n such that the interval n^2 < x < (n+1)^2 contains at least one nonsquare perfect power A097054.

Original entry on oeis.org

2, 5, 11, 14, 15, 18, 22, 31, 36, 41, 45, 46, 52, 55, 58, 70, 76, 82, 88, 89, 90, 96, 103, 110, 117, 129, 132, 140, 148, 156, 164, 172, 181, 189, 198, 207, 225, 234, 243, 252, 262, 272, 279, 281, 291, 301, 311, 316, 322, 332, 353, 362, 364, 374, 385, 396, 401
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Examples

			a(1)=2 because 2^2<2^3<3^2, a(2)=5: 5^2<3^3<2^5<6^2, a(3)=11: 11^2<5^3<2^7<12^2.
		

Crossrefs

Programs

  • Mathematica
    nn=1000^2; pp=Select[Union[Flatten[Table[n^i, {i,Prime[Range[2,PrimePi[Log[2,nn]]]]}, {n,2,nn^(1/i)}]]], !IntegerQ[Sqrt[#]]&]; Union[Floor[Sqrt[pp]]] (* T. D. Noe, Apr 19 2011 *)
  • PARI
    is(n)=my(n2=n^2,t=n2+2*n); for(e=3,logint(t,2), if(sqrtnint(t,e)^e>n2, return(1))); 0 \\ Charles R Greathouse IV, Aug 28 2016
    
  • Python
    from itertools import count, islice
    from sympy import mobius, integer_nthroot
    def A097055_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n: sum(mobius(k)*(1-integer_nthroot((n+1)**2,k)[0]) for k in range((n**2).bit_length(),((n+1)**2).bit_length()))+sum(mobius(k)*(integer_nthroot(n**2,k)[0]-integer_nthroot((n+1)**2,k)[0]) for k in range(3,(n**2).bit_length())), count(max(startvalue,2)))
    A097055_list = list(islice(A097055_gen(),30)) # Chai Wah Wu, Aug 14 2024

Formula

a(n) ~ n^(3/2). - Charles R Greathouse IV, Aug 28 2016

A001597 Perfect powers: m^k where m > 0 and k >= 2.

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81, 100, 121, 125, 128, 144, 169, 196, 216, 225, 243, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764
Offset: 1

Views

Author

Keywords

Comments

Might also be called the nontrivial powers. - N. J. A. Sloane, Mar 24 2018
See A175064 for number of ways to write a(n) as m^k (m >= 1, k >= 1). - Jaroslav Krizek, Jan 23 2010
a(1) = 1, for n >= 2: a(n) = numbers m such that sum of perfect divisors of x = m has no solution. Perfect divisor of n is divisor d such that d^k = n for some k >= 1. a(n) for n >= 2 is complement of A175082. - Jaroslav Krizek, Jan 24 2010
A075802(a(n)) = 1. - Reinhard Zumkeller, Jun 20 2011
Catalan's conjecture (now a theorem) is that 1 occurs just once as a difference, between 8 and 9.
For a proof of Catalan's conjecture, see the paper by Metsänkylä. - L. Edson Jeffery, Nov 29 2013
m^k is the largest number n such that (n^k-m)/(n-m) is an integer (for k > 1 and m > 1). - Derek Orr, May 22 2014
From Daniel Forgues, Jul 22 2014: (Start)
a(n) is asymptotic to n^2, since the density of cubes and higher powers among the squares and higher powers is 0. E.g.,
a(10^1) = 49 (49% of 10^2),
a(10^2) = 6400 (64% of 10^4),
a(10^3) = 804357 (80.4% of 10^6),
a(10^4) = 90706576 (90.7% of 10^8),
a(10^n) ~ 10^(2n) - o(10^(2n)). (End)
A proper subset of A001694. - Robert G. Wilson v, Aug 11 2014
a(10^n): 1, 49, 6400, 804357, 90706576, 9565035601, 979846576384, 99066667994176, 9956760243243489, ... . - Robert G. Wilson v, Aug 15 2014

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 66.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D9.
  • René Schoof, Catalan's Conjecture, Springer-Verlag, 2008, p. 1.
  • 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

Complement of A007916.
Subsequence of A072103; A072777 is a subsequence.
Union of A075109 and A075090.
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), and which are sometimes confused with the present sequence.
First differences give A053289.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a001597 n = a001597_list !! (n-1)
    (a001597_list, a025478_list, a025479_list) =
       unzip3 $ (1, 1, 2) : f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, ez) m
        | xx < zz = (xx, bx, ex) :
                    f zz (bz, ez+1) (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        | xx > zz = (zz, bz, 2) :
                    f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
        | otherwise = f (zz+2*bz+1) (bz+1, 2) m
        where (xx, (bx, ex)) = findMin m  --  bx ^ ex == xx
    -- Reinhard Zumkeller, Mar 28 2014, Oct 04 2012, Apr 13 2012
    
  • Magma
    [1] cat [n : n in [2..1000] | IsPower(n) ];
    
  • Maple
    isA001597 := proc(n)
        local e ;
        e := seq(op(2,p),p=ifactors(n)[2]) ;
        return ( igcd(e) >=2 or n =1 ) ;
    end proc:
    A001597 := proc(n)
        option remember;
        local a;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA001597(a) then
                    return a ;
                end if;
             end do;
        end if;
    end proc:
    seq(A001597(n),n=1..70) ; # R. J. Mathar, Jun 07 2011
    N:= 10000: # to get all entries <= N
    sort({1,seq(seq(a^b, b = 2 .. floor(log[a](N))), a = 2 .. floor(sqrt(N)))}); # Robert FERREOL, Jul 18 2023
  • Mathematica
    min = 0; max = 10^4;  Union@ Flatten@ Table[ n^expo, {expo, Prime@ Range@ PrimePi@ Log2@ max}, {n, Floor[1 + min^(1/expo)], max^(1/expo)}] (* T. D. Noe, Apr 18 2011; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    perfectPowerQ[n_] := n == 1 || GCD @@ FactorInteger[n][[All, 2]] > 1; Select[Range@ 1765, perfectPowerQ] (* Ant King, Jun 29 2013; slightly modified by Robert G. Wilson v, Aug 11 2014 *)
    nextPerfectPower[n_] := If[n == 1, 4, Min@ Table[ (Floor[n^(1/k)] + 1)^k, {k, 2, 1 + Floor@ Log2@ n}]]; NestList[ nextPerfectPower, 1, 55] (* Robert G. Wilson v, Aug 11 2014 *)
    Join[{1},Select[Range[2000],GCD@@FactorInteger[#][[All,2]]>1&]] (* Harvey P. Dale, Apr 30 2018 *)
  • PARI
    {a(n) = local(m, c); if( n<2, n==1, c=1; m=1; while( cMichael Somos, Aug 05 2009 */
    
  • PARI
    is(n)=ispower(n) || n==1 \\ Charles R Greathouse IV, Sep 16 2015
    
  • PARI
    list(lim)=my(v=List(vector(sqrtint(lim\=1),n,n^2))); for(e=3,logint(lim,2), for(n=2,sqrtnint(lim,e), listput(v,n^e))); Set(v) \\ Charles R Greathouse IV, Dec 10 2019
    
  • Python
    from sympy import perfect_power
    def ok(n): return n==1 or perfect_power(n)
    print([m for m in range(1, 1765) if ok(m)]) # Michael S. Branicky, Jan 04 2021
    
  • Python
    import sympy
    class A001597() :
        def _init_(self) :
            self.a = [1]
        def at(self, n):
            if n <= len(self.a):
                return self.a[n-1]
            else:
                cand = self.at(n-1)+1
                while sympy.perfect_power(cand) == False:
                    cand += 1
                self.a.append(cand)
                return cand
    a001597 = A001597()
    for n in range(1,20):
        print(a001597.at(n)) # R. J. Mathar, Mar 28 2023
    
  • Python
    from sympy import mobius, integer_nthroot
    def A001597(n):
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) 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 kmax # Chai Wah Wu, Aug 13 2024
  • Sage
    def A001597_list(n) :
        return [k for k in (1..n) if k.is_perfect_power()]
    A001597_list(1764) # Peter Luschny, Feb 03 2012
    

Formula

Goldbach showed that Sum_{n >= 2} 1/(a(n)-1) = 1.
Formulas from postings to the Number Theory List by various authors, 2002:
Sum_{i >= 2} Sum_{j >= 2} 1/i^j = 1;
Sum_{k >= 2} 1/(a(k)+1) = Pi^2 / 3 - 5/2;
Sum_{k >= 2} 1/a(k) = Sum_{n >= 2} mu(n)(1- zeta(n)) approx = 0.87446436840494... See A072102.
For asymptotics see Newman.
For n > 1: gcd(exponents in prime factorization of a(n)) > 1, cf. A124010. - Reinhard Zumkeller, Apr 13 2012
a(n) ~ n^2. - Thomas Ordowski, Nov 04 2012
a(n) = n^2 - 2*n^(5/3) - 2*n^(7/5) + (13/3)*n^(4/3) - 2*n^(9/7) + 2*n^(6/5) - 2*n^(13/11) + o(n^(13/11)) (Jakimczuk, 2012). - Amiram Eldar, Jun 30 2023

Extensions

Minor corrections from N. J. A. Sloane, Jun 27 2010

A070265 Odd powers: numbers n = m^e with e > 1 odd.

Original entry on oeis.org

1, 8, 27, 32, 64, 125, 128, 216, 243, 343, 512, 729, 1000, 1024, 1331, 1728, 2048, 2187, 2197, 2744, 3125, 3375, 4096, 4913, 5832, 6859, 7776, 8000, 8192, 9261, 10648, 12167, 13824, 15625, 16384, 16807, 17576, 19683, 21952, 24389, 27000
Offset: 1

Views

Author

Eric W. Weisstein, May 07 2002

Keywords

Crossrefs

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    {1,seq(seq(a^(2*k+1), k = 1 .. floor((log[a](N)-1)/2)),a=2..floor(N^(1/3)))};
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(%,list)); # Robert Israel, Apr 24 2015
  • Mathematica
    nn = 27000; Join[{1}, Union[Flatten[Table[n^i, {i, Prime[Range[2, PrimePi[Log[2, nn]]]]}, {n, 2, nn^(1/i)}]]]] (* T. D. Noe, Apr 19 2011 *)
  • PARI
    is(x)=p=ispower(x);x==1||(p>1&bitand(p,p-1)!=0) \\ Charles R Greathouse IV, Apr 20 2015; corrected by Jeppe Stig Nielsen, Jul 14 2015
    
  • PARI
    list(lim)=my(v=List([1])); forstep(e=3,log(lim)\log(2),2, for(n=2,sqrtnint(lim\1,e), listput(v,n^e))); Set(v) \\ Charles R Greathouse IV, Apr 20 2015
    
  • Python
    from sympy import mobius, integer_nthroot
    def A070265(n):
        def f(x): return int(n-2+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(3,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 14 2024

Formula

a(n) ~ n^3. - Charles R Greathouse IV, Apr 20 2015
Sum_{n>=1} 1/a(n) = 1 + Sum_{k>=1} mu(2*k+1)*(1-zeta(2*k+1)) = 1.2479294392... - Amiram Eldar, Dec 21 2020

Extensions

Name clarified by Charles R Greathouse IV, Oct 16 2015

A239728 Perfect power but neither square nor cube.

Original entry on oeis.org

32, 128, 243, 2048, 2187, 3125, 7776, 8192, 16807, 78125, 100000, 131072, 161051, 177147, 248832, 279936, 371293, 524288, 537824, 759375, 823543, 1419857, 1594323, 1889568, 2476099, 3200000, 4084101, 5153632, 6436343, 7962624, 8388608, 10000000, 11881376, 17210368
Offset: 1

Views

Author

Jeppe Stig Nielsen, Mar 25 2014

Keywords

Examples

			279936 is included since 279936 = 6^7 is a power and this is not a square or a cube.
59049 = 9^5 not included since this is a square 243^2 = 59049.
32768 = 8^5 not included since this is a cube 32^3 = 32768.
		

Crossrefs

Cf. A001597 (perfect powers), A097054 (nonsquare perfect powers), A340585 (noncube perfect powers).

Programs

  • PARI
    for(i=1, 2^25, if(gcd(ispower(i), 6) == 1, print(i)))
    
  • Python
    from sympy import mobius, integer_nthroot
    def A239728(n):
        def f(x): return int(n+x-integer_nthroot(x,5)[0]+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(7,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 kmax # Chai Wah Wu, Aug 14 2024

Formula

GCD(A052409(a(n)), 6) = 1. - Reinhard Zumkeller, Mar 28 2014
Sum_{n>=1} 1/a(n) = 1 - zeta(2) - zeta(3) + zeta(6) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 0.0448164603... - Amiram Eldar, Dec 21 2020

A340642 Perfect powers such that the two immediately adjacent perfect powers both have an exponent greater than 2.

Original entry on oeis.org

4, 9, 25, 225, 676, 2116, 6724, 7921, 8100, 16641, 104329, 131044, 160801, 176400, 372100, 389376, 705600, 4096576, 7306209, 7884864, 47444544, 146385801, 254817369, 373262400, 607622500, 895804900, 1121580100, 1330936324, 1536875209, 2097182025, 2258435529, 2749953600
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Comments

Apparently, all known terms (checked through 10^18) are squares with maximum exponent 2, i.e., terms of A111245 (squares that are not a higher power). This would imply that of 3 immediately adjacent perfect powers, at least one is a term of A111245. Is there a known counterexample of 3 consecutive perfect powers, none of which is in A111245?

Examples

			The first terms, assuming 1 being at least a cube:
.
  n   p1  x^p1  p2  a(n)  p3  z^p3
                   =y^p2
  1  >2     1   2     4   3     8
  2   3     8   2     9   4    16
  3   4    16   2    25   3    27
  4   3   216   2   225   5   243
  5   4   625   2   676   6   729
		

Crossrefs

Programs

  • PARI
    a340642(limit)={my(p2=999, p1=2, n2=1, n1=4); for(n=5, limit, my(p0=ispower(n)); if(p0>1, if(p2>2&p0>2, print1(n1,", ")); n2=n1; n1=n; p2=p1; p1=p0))};
    a340642(50000000)

A239870 Noncube perfect powers. [Warning: definition does not match the DATA.].

Original entry on oeis.org

4, 9, 16, 32, 36, 49, 81, 121, 128, 144, 169, 196, 243, 256, 324, 400, 441, 484, 576, 625, 841, 900, 961, 1024, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1849, 1936, 2025, 2048, 2187, 2209, 2304, 2401, 2601, 2704, 2916, 3025, 3125, 3249, 3364, 3600
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 28 2014

Keywords

Comments

The NAME suggests that this is an erroneous version of A340585 (which includes 25, for example), but the Haskell implementation indicates that the true definition is more complicated. - R. J. Mathar, Jan 13 2021

Crossrefs

Cf. A097054, A239728, intersection of A007412 and A001597.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a239870 n = a239870_list !! (n-1)
    a239870_list = f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, ez) m
        | xx < zz = if ex `mod` 3 > 0
          then xx : f zz (bz, ez+1) (insert (bx*xx) (bx, ex+1) $ deleteMin m)
          else      f zz (bz, ez+1) (insert (bx*xx) (bx, ex+1) $ deleteMin m)
        | xx > zz = if ez `mod` 3 > 0
          then zz : f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
          else      f (zz+2*bz+1) (bz+1, 2) (insert (bz*zz) (bz, 3) m)
        | otherwise = f (zz+2*bz+1) (bz+1, 2) m
        where (xx, (bx, ex)) = findMin m  --  bx ^ ex == xx

Formula

A052409(a(n)) mod 3 > 0.

A340585 Noncube perfect powers.

Original entry on oeis.org

4, 9, 16, 25, 32, 36, 49, 81, 100, 121, 128, 144, 169, 196, 225, 243, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2048, 2116, 2187, 2209, 2304, 2401, 2500
Offset: 1

Views

Author

Hugo Pfoertner, Jan 12 2021

Keywords

Comments

This was the original definition of A239870. However, the true definition of that sequence seems to be slightly different.

Crossrefs

Programs

  • Maple
    filter:= proc(n) local g;
      g:= igcd(op(ifactors(n)[2][..,2]));
      g > 1 and (g mod 3 <> 0)
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Jan 12 2021
  • Mathematica
    Select[Range[2, 2500], (g = GCD @@ FactorInteger[#][[;; , 2]]) > 1 && !Divisible[g, 3] &] (* Amiram Eldar, Jan 12 2021 *)
  • PARI
    for(n=2,2500,if( ispower(n) % 3, print1(n,", ")))
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A340585(n):
        def f(x): return int(n+x-isqrt(x)+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(5,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 kmax # Chai Wah Wu, Aug 14 2024

Formula

Sum_{n>=1} 1/a(n) = 1 - zeta(3) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 1 - A002117 + A072102 = 0.6724074652... - Amiram Eldar, Jan 12 2021

A384518 Nonsquarefree numbers that are squarefree numbers raised to an odd power.

Original entry on oeis.org

8, 27, 32, 125, 128, 216, 243, 343, 512, 1000, 1331, 2048, 2187, 2197, 2744, 3125, 3375, 4913, 6859, 7776, 8192, 9261, 10648, 12167, 16807, 17576, 19683, 24389, 27000, 29791, 32768, 35937, 39304, 42875, 50653, 54872, 59319, 68921, 74088, 78125, 79507, 97336, 100000
Offset: 1

Views

Author

Amiram Eldar, Jun 01 2025

Keywords

Comments

Subsequence of A097054 and first differs from it at n = 12: A097054(12) = 1728 = 2^6 * 3^3 is not a term of this sequence.
Numbers whose prime factorization exponents are equal, odd and larger than 1.

Crossrefs

Intersection of A072777 and A268335.
Equals A072777 \ A384517.
Subsequence of A097054.
Cf. A005117.

Programs

  • Mathematica
    Select[Range[10^5], Length[(u = Union[FactorInteger[#][[;; , 2]]])] == 1 && u[[1]] > 1 && OddQ[u[[1]]] &]
  • PARI
    isok(k) = {my(s, e = ispower(k, , &s)); e % 2 && issquarefree(s);}
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A384518(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1		
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def g(x): return sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        def f(x): return n+x-sum(g(integer_nthroot(x,e)[0])-1 for e in range(3,x.bit_length(),2))
        return bisection(f,n,n) # Chai Wah Wu, Jun 01 2025

Formula

Sum_{n>=1} 1/a(n) = Sum_{k>=1} (zeta(2*k+1)/zeta(4*k+2)-1) = 0.22841193284408713846... .

A340643 Numbers k such that the two perfect powers immediately adjacent to k^2 both have exponents greater than 2.

Original entry on oeis.org

2, 3, 5, 15, 26, 46, 82, 89, 90, 129, 323, 362, 401, 420, 610, 624, 840, 2024, 2703, 2808, 6888, 12099, 15963, 19320, 24650, 29930, 33490, 36482, 39203, 45795, 47523, 52440, 66050, 69168, 83408, 94248, 94863, 103683, 114284, 164399, 185364, 206442, 222785, 227530, 229180
Offset: 1

Views

Author

Hugo Pfoertner, Jan 14 2021

Keywords

Comments

Within the range of the data, a(n)^2 = A340642(n), i.e., no 3 immediately consecutive perfect powers x^p1, y^p2, z^p3 with min (p1, p2, p3) > 2 are seen. Is there a counterexample?

Crossrefs

Programs

  • PARI
    a340643(limit)={my(p2=999, p1=2, n2=1, n1=4); for(n=5, limit, my(p0=ispower(n)); if(p0>1, if(issquare(n1)&p2>2&p0>2, print1(sqrtint(n1),", ")); n2=n1; n1=n; p2=p1; p1=p0))};
    a340643(10^8)
    
  • PARI
    upto(n) = {n *= n; my(v = List(), res = List([2])); for(i = 2, sqrtnint(n, 3), for(e = 3, logint(n, i), listput(v, i^e) ); ); listsort(v, 1); for(i = 1, #v - 1, if(sqrtint(v[i]) + 1 == sqrtint(v[i+1]) - issquare(v[i+1]), listput(res, sqrtint(v[i+1]-issquare(v[i+1]))); ) ); res }

Extensions

More terms from David A. Corneth, Jan 14 2021
Showing 1-10 of 12 results. Next