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.

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.