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

A018852 a(n)^3 is smallest cube beginning with n.

Original entry on oeis.org

0, 1, 3, 7, 16, 8, 4, 9, 2, 21, 10, 48, 5, 11, 52, 25, 55, 12, 57, 27, 59, 6, 61, 62, 29, 63, 64, 3, 66, 31, 67, 68, 32, 15, 7, 33, 154, 72, 73, 34, 16, 161, 35, 76, 164, 77, 36, 78, 169, 17, 37, 8, 174, 81, 38, 82, 178, 83, 18, 39, 182, 85, 184, 86, 4, 87, 188, 189, 19, 191, 89, 193, 9
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A018797.
Cf. A018851 (k=2), this sequence (k=3), A018853 (k=4), A018872 (k=5), A018874 (k=6), A018876 (k=7), A018878 (k=8), A018880 (k=9), A018882 (k=10).

Programs

  • Maple
    f:= proc(n) local d,m;
      for d from 0 do
        m:= ceil((10^d*n)^(1/3));
        if m^3 < 10^d*(n+1) then return m fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 26 2015
  • PARI
    a(n)=k=1;while(k,d=digits(k^3);D=digits(n);if(#D<=#d,c=1;for(i=1,#D,if(D[i]!=d[i],c=0;break));if(c,return(k)));k++)
    vector(100,n,a(n)) \\ Derek Orr, Jul 26 2015
  • Python
    for n in range(1,10**3):
        for k in range(10**3):
            if str(k**3).startswith(str(n)):
                print(k,end=', ')
                break
        n += 1 # Derek Orr, Aug 03 2014
    

Formula

a(n) >= n^(1/3), for all n > 0, with equality when n is a cube. - Derek Orr, Jul 26 2015

Extensions

0 prepended by Seiichi Manyama, Jan 30 2017

A138173 a(n) is the smallest m such that m^3 begins with n^2.

Original entry on oeis.org

1, 16, 21, 55, 63, 154, 17, 4, 201, 10, 23, 113, 257, 27, 609, 295, 307, 148, 1535, 342, 164, 1692, 809, 1793, 397, 878, 9, 428, 944, 4482, 987, 1008, 1029, 4872, 107, 2349, 5154, 5247, 2478, 252, 552, 5609, 5697, 5785, 2726, 1284, 2806, 6131, 2885
Offset: 1

Views

Author

Zak Seidov, Mar 05 2008

Keywords

Comments

Differs from A030691.

Crossrefs

Programs

  • Python
    from gmpy2 import iroot
    def A138173(n):
        d, nd = 1, n**2
        while True:
            x = iroot(nd-1,3)[0]+1
            if x**3 < nd+d:
                return int(x)
            d *= 10
            nd *= 10 # Chai Wah Wu, May 24 2016
  • Sage
    A138173 = lambda n: next(m for m in IntegerRange(1, infinity) if str(m**3).startswith(str(n**2)))
    # D. S. McNeil, Dec 12 2010
    

Formula

a(n) = (A138174(n))^(1/3).

A030673 Smallest cube that begins with n-th prime.

Original entry on oeis.org

27, 343, 512, 729, 110592, 1331, 1728, 19683, 238328, 29791, 314432, 373248, 4173281, 438976, 474552, 531441, 59319, 614125, 6751269, 7189057, 7301384, 79507, 830584, 8998912, 97336, 101194696, 103823, 10793861, 1092727, 11390625
Offset: 1

Views

Author

Keywords

Examples

			a(1) = 27 because 27 = 3^3 is the smallest cube beginning (base 10) with prime(1) = 2.
a(2) = 343 because 343 = 7^3 is the smallest cube beginning (base 10) with prime(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k, l = Ceiling@ Log[10, Prime@ n], p = IntegerDigits@ Prime@ n}, k = Ceiling[ Prime[n]^(1/3)]; While[ Take[ IntegerDigits[k^3], l] != p, k++ ]; k^3]; Array[f, 31] (* Robert G. Wilson v, May 31 2008 *)

Formula

a(n) = A018797(A000040(n)).

Extensions

Edited by N. J. A. Sloane, Aug 29 2008 at the suggestion of R. J. Mathar

A138174 a(n) is the smallest cube that begins with n^2.

Original entry on oeis.org

1, 4096, 9261, 166375, 250047, 3652264, 4913, 64, 8120601, 1000, 12167, 1442897, 16974593, 19683, 225866529, 25672375, 28934443, 3241792, 3616805375, 40001688, 4410944, 4843965888, 529475129, 5764224257, 62570773, 676836152
Offset: 1

Views

Author

Zak Seidov, Mar 05 2008

Keywords

Comments

Differs from A030690.

Crossrefs

Formula

a(n) = (A138173(n))^3.

Extensions

Corrected by D. S. McNeil, Dec 12 2010
Showing 1-4 of 4 results.