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

A030668 Smallest nontrivial extension of n which is a cube.

Original entry on oeis.org

125, 27, 343, 4096, 512, 64, 729, 8000, 9261, 1000, 110592, 125, 1331, 140608, 15625, 166375, 1728, 185193, 19683, 205379, 216, 226981, 238328, 24389, 250047, 262144, 2744, 287496, 29791, 300763, 314432, 32768, 3375, 343, 35937
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A030669.

Programs

  • Python
    from gmpy2 import iroot
    def A030668(n):
        d, nd = 10, 10*n
        while True:
            x = (iroot(nd-1,3)[0]+1)**3
            if x < nd+d:
                return int(x)
            d *= 10
            nd *= 10 # Chai Wah Wu, May 24 2016

A030679 Cube root of A030678.

Original entry on oeis.org

5, 3, 7, 16, 8, 4, 9, 20, 21, 48, 61, 15, 164, 82, 188, 92, 96, 215, 466, 481, 23, 236, 242, 533, 253, 258, 122, 576, 587, 277, 606, 615, 624, 632, 64, 301, 656, 143, 312, 679, 1479, 322, 70, 707, 714, 72, 1565, 34, 1593, 346, 1619, 1632, 763, 357, 1668
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    N:= 3: # to get extensions of all palindromes of <= N digits
    f:= proc(n) local d, x;
      for d from 1 do
        x:= ceil((n*10^d)^(1/3));
        if x^3 < (n+1)*10^d then return x fi
      od
    end proc:
    digrev:= proc(n) local i, L;
      L:= convert(n, base, 10);
      add(L[-i]*10^(i-1), i=1..nops(L))
    end proc:
    Res:= seq(f(i), i=1..9):
    for d from 2 to N do
    if d::even then
        m:= d/2;
        Res:= Res, seq(f(n*10^m + digrev(n)), n=10^(m-1)..10^m-1);
    else
        m:= (d-1)/2;
        Res:= Res, seq(seq(f(n*10^(m+1)+y*10^m+digrev(n)), y=0..9), n=10^(m-1)..10^m-1)
    fi
    od: Res; # Robert Israel, Dec 25 2018

Formula

a(n) = A030669(A002113(n+1)) = A030678(n)^(1/3). - Robert Israel, Dec 25 2018
Showing 1-2 of 2 results.