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-3 of 3 results.

A097054 Nonsquare perfect powers.

Original entry on oeis.org

8, 27, 32, 125, 128, 216, 243, 343, 512, 1000, 1331, 1728, 2048, 2187, 2197, 2744, 3125, 3375, 4913, 5832, 6859, 7776, 8000, 8192, 9261, 10648, 12167, 13824, 16807, 17576, 19683, 21952, 24389, 27000, 29791, 32768, 35937, 39304, 42875, 50653
Offset: 1

Views

Author

Hugo Pfoertner, Jul 21 2004

Keywords

Comments

Terms of A001597 that are not in A000290.
All terms of this sequence are also in A070265 (odd powers), but omitting those odd powers that are also a square (e.g. 64=4^3=8^2).

Crossrefs

Cf. A001597 (perfect powers), A000290 (the squares), A008683, A070265 (odd powers), A097055, A097056, A239870, A239728, A093771.

Programs

  • Haskell
    import Data.Map (singleton, findMin, deleteMin, insert)
    a097054 n = a097054_list !! (n-1)
    a097054_list = f 9 (3, 2) (singleton 4 (2, 2)) where
       f zz (bz, be) m
        | xx < zz && even be =
                    f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
        | xx < zz = xx :
                    f zz (bz, be+1) (insert (bx*xx) (bx, be+1) $ deleteMin m)
        | xx > zz = 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, be)) = findMin m
    -- Reinhard Zumkeller, Mar 28 2014
    
  • Maple
    # uses code of A001597
    for n from 4 do
        if not issqr(n) and isA001597(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, Jan 13 2021
  • Mathematica
    nn = 50653; Select[Union[Flatten[Table[n^i, {i, Prime[Range[2, PrimePi[Log[2, nn]]]]}, {n, 2, nn^(1/i)}]]], ! IntegerQ[Sqrt[#]] &] (* T. D. Noe, Apr 19 2011 *)
  • PARI
    is(n)=ispower(n)%2 \\ Charles R Greathouse IV, Aug 28 2016
    
  • PARI
    list(lim)=my(v=List()); forprime(e=3,logint(lim\=1,2), for(b=2,sqrtnint(lim,e), if(!issquare(b), listput(v,b^e)))); Set(v) \\ Charles R Greathouse IV, Jan 09 2023
    
  • Python
    from sympy import mobius, integer_nthroot
    def A097054(n):
        def f(x): return int(n-1+x+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(3,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

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

A295931 Number of ways to write n in the form n = (x^y)^z where x, y, and z are positive integers.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 3, 3, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Gus Wiseman, Nov 29 2017

Keywords

Comments

By convention a(1) = 1.
Values can be 1, 3, 6, 9, 10, 15, 18, 21, 27, 28, 30, 36, 45, 54, 60, 63, 84, 90, etc. - Robert G. Wilson v, Dec 10 2017

Examples

			The a(256) = 10 ways are:
(2^1)^8    (2^2)^4   (2^4)^2  (2^8)^1
(4^1)^4    (4^2)^2   (4^4)^1
(16^1)^2   (16^2)^1
(256^1)^1
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,d,t;
      m:= igcd(seq(t[2],t=ifactors(n)[2]));
      add(numtheory:-tau(d),d=numtheory:-divisors(m))
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Dec 19 2017
  • Mathematica
    Table[Sum[DivisorSigma[0,d],{d,Divisors[GCD@@FactorInteger[n][[All,2]]]}],{n,100}]

Formula

a(A175082(k)) = 1, a(A093771(k)) = 3.
a(n) = Sum_{d|A052409(n)} A000005(d).

A001292 Concatenations of cyclic permutations of initial positive integers.

Original entry on oeis.org

1, 12, 21, 123, 231, 312, 1234, 2341, 3412, 4123, 12345, 23451, 34512, 45123, 51234, 123456, 234561, 345612, 456123, 561234, 612345, 1234567, 2345671, 3456712, 4567123, 5671234, 6712345, 7123456
Offset: 1

Views

Author

R. Muller

Keywords

Comments

Entries are sorted numerically, so after a(45) = 912345678 we have a(46) = 10123456789 instead of a(46) = 12345678910. - Giovanni Resta, Mar 21 2017
From Marco Ripà, Apr 21 2022: (Start)
In 1996, Kenichiro Kashihara conjectured that there is no prime power of an integer (A093771) belonging to this sequence (disregarding the trivial case 1); a direct search from 12 to a(100128) has confirmed the conjecture up to 10^1035. There are no perfect powers among terms t which are permutations of 123_...(m - 1)_m for m == {2, 3, 5, 6} (mod 9). This is since 10 == 1 (mod 9) and also (1 + 0) == 1 (mod 9), so digit position has no effect. Hence, t == A134804(m) (mod 9). Now, if m is such that A134804(m) = {3, 6}, there is a lone factor of 3, which is not a perfect power (indeed).
Therefore, any perfect power in this sequence is necessarily congruent modulo 9 to 0 or 1.
(End)

Crossrefs

Programs

  • Mathematica
    Sort@ Flatten@ Table[ FromDigits[ Join @@ IntegerDigits /@ RotateLeft[Range[n], i - 1]], {n, 11}, {i, n}] (* Giovanni Resta, Mar 21 2017 *)
  • Python
    from itertools import count, islice
    def A001292gen():
        s = []
        for i in count(1):
            s.append(str(i))
            yield from sorted(int("".join(s[j:]+s[:j])) for j in range(i))
    print(list(islice(A001292gen(), 46))) # Michael S. Branicky, Jul 01 2022
Showing 1-3 of 3 results.