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.

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

This page as a plain text file.
%I A138173 #16 Feb 27 2020 04:29:17
%S A138173 1,16,21,55,63,154,17,4,201,10,23,113,257,27,609,295,307,148,1535,342,
%T A138173 164,1692,809,1793,397,878,9,428,944,4482,987,1008,1029,4872,107,2349,
%U A138173 5154,5247,2478,252,552,5609,5697,5785,2726,1284,2806,6131,2885
%N A138173 a(n) is the smallest m such that m^3 begins with n^2.
%C A138173 Differs from A030691.
%H A138173 Chai Wah Wu, <a href="/A138173/b138173.txt">Table of n, a(n) for n = 1..10000</a>
%F A138173 a(n) = (A138174(n))^(1/3).
%o A138173 (Sage)
%o A138173 A138173 = lambda n: next(m for m in IntegerRange(1, infinity) if str(m**3).startswith(str(n**2)))
%o A138173 # _D. S. McNeil_, Dec 12 2010
%o A138173 (Python)
%o A138173 from gmpy2 import iroot
%o A138173 def A138173(n):
%o A138173     d, nd = 1, n**2
%o A138173     while True:
%o A138173         x = iroot(nd-1,3)[0]+1
%o A138173         if x**3 < nd+d:
%o A138173             return int(x)
%o A138173         d *= 10
%o A138173         nd *= 10 # _Chai Wah Wu_, May 24 2016
%Y A138173 Cf. A030690, A030691, A018852, A018797, A077729, A077730, A138174.
%K A138173 nonn,base
%O A138173 1,2
%A A138173 _Zak Seidov_, Mar 05 2008