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-10 of 21 results. Next

A018796 Smallest square that begins with n.

Original entry on oeis.org

0, 1, 25, 36, 4, 529, 64, 729, 81, 9, 100, 1156, 121, 1369, 144, 1521, 16, 1764, 1849, 196, 2025, 2116, 225, 2304, 2401, 25, 2601, 2704, 289, 2916, 3025, 3136, 324, 3364, 3481, 35344, 36, 3721, 3844, 3969, 400, 41209, 4225, 4356, 441, 45369, 4624, 4761, 484, 49
Offset: 0

Views

Author

Keywords

Comments

If 4*(n+1) < 10^d then a(n) < (n+1)*10^d. - Robert Israel, Aug 01 2014

Examples

			Among the first 100001 terms, the largest is a(99999) = 99999515529 = 316227^2. - _Zak Seidov_, May 22 2016
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k,d,x;
      if issqr(n) then return n
      else for d from 1 do
        for k from 0 to 10^d-1 do
        x:= 10^d*n+k;
        if issqr(x) then return x fi
        od
        od
      fi
    end proc:
    seq(a(n),n=1..100); # Robert Israel, Jul 31 2014
  • Mathematica
    Table[With[{d = IntegerDigits@ n}, k = 1; While[Or[IntegerLength[k^2] < Length@ d, Take[IntegerDigits[k^2], Length@ d] != d], k++]; k^2], {n, 49}] (* Michael De Vlieger, May 23 2016 *)
  • PARI
    \\Set precision high enough (for the cases where n+1 is a square)!
    a(n) = {my(v=vector(2));if(issquare(n),return(n), v=[sqrt(n),sqrt(n+1-(10^-((#digits(n)+7))))]; while(ceil(v[1])>floor(v[2]),v*=sqrt(10)));ceil(v[1])^2
    } \\ David A. Corneth, May 22 2016
  • Python
    n = 1
    while n < 100:
        for k in range(10**3):
            if str(k**2).startswith(str(n)):
                print(k**2,end=', ')
                break
        n += 1 # Derek Orr, Jul 31 2014
    
  • Python
    from gmpy2 import isqrt
    def A018796(n):
        if n == 0:
            return 0
        else:
            d, nd = 1, n
            while True:
                x = (isqrt(nd-1)+1)**2
                if x < nd+d:
                    return int(x)
                d *= 10
                nd *= 10 # Chai Wah Wu, May 23 2016
    

Extensions

a(0)=0 prepended by Zak Seidov, May 22 2016

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

A265432 a(n) = smallest k with concat(1,k) and concat(n,k) both square numbers.

Original entry on oeis.org

225, 6, 1025, 6, 225, 9937257544619140625, 80625, 225, 19025, 14797831640625, 5625, 89450791534674072265625, 96, 69, 44, 21, 1993672119140625, 2002541101386962890625, 225, 6, 8734765625, 99758030615478515625, 5625, 863225, 80625, 6, 40625, 225, 890625, 158764150390625
Offset: 0

Views

Author

Keywords

Comments

k must be a positive integer (and of course cannot begin with 0). - N. J. A. Sloane, May 19 2016
Every term is a member of A272671, by definition. Certainly every term of A272671 which is a power of 100 times an earlier term of A272671 (such as 600, 2100, 4400) will not appear, by the "smallest k" condition. Does every other term of A272671 (that is, the terms of A272684) eventually appear? See A272685 and A273369 for the first appearance of these terms. - Nathan Fox, Brooke Logan, and N. J. A. Sloane, May 23 2016

Examples

			a(0) = 225 because 1225 is a square as is (0)225. (In other words, 225 is the first term in A272672 that is itself a square). - _N. J. A. Sloane_, May 21 2016
a(2) = 1025 because concat(1,1025) = 11025 = 105^2 and concat(2,1025) = 21025 = 145^2.
		

Crossrefs

Cf. A045855, A272671, A018796, A272684, A272685 and A273369 (smallest inverse).
For records see A272674, A272675.
For square roots referred to in definition see A272682, A272683.
A018851 is a simpler sequence in the same spirit.

Programs

  • Mathematica
    << Combinatorica`
    A265432[0] = 225;
    A265432[1] = 6;
    A265432[n_] := Block[{x = {-1, 1, 0, 1}[[Mod[n, 4, 1]]], d = Infinity, l, i}, While[d > Sqrt[10.0^(x - 1)] (Sqrt[10.0 n + 1] - Sqrt[11.0]), x++; d = Infinity; l = Divisors[((n - 1) 10^x)/4]; i = BinarySearch[l, 0.5 Sqrt[(n + 1) 10.0^x - 1] - 0.5 Sqrt[2*10.0^x - 1]]; If[i <= Length@l, d = 2*l[[i + 1/2]]]]; (((n - 1) 10^x - d^2)/(2 d))^2 - 10^x] (* Davin Park, Apr 11 2017 *)

A018853 a(n)^4 is smallest fourth power beginning with n.

Original entry on oeis.org

0, 1, 4, 14, 8, 15, 5, 29, 3, 31, 10, 33, 6, 19, 11, 35, 2, 65, 37, 21, 12, 68, 69, 22, 7, 4, 72, 23, 13, 74, 132, 42, 134, 24, 43, 77, 138, 44, 14, 25, 8, 45, 144, 81, 46, 26, 147, 83, 47, 84, 15, 151, 85, 27, 86, 273, 154, 49, 276, 88, 157, 28, 5, 159, 283, 9, 286, 51, 91, 289, 29
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A018798 (a(n)^4).
Cf. A018851 (k=2), A018852 (k=3), this sequence (k=4), A018872 (k=5), A018874 (k=6), A018876 (k=7), A018878 (k=8), A018880 (k=9), A018882 (k=10).

Programs

  • PARI
    v=[]; k=1; while(#v<100, d=digits(k^4); D=digits(#v+1); if(#D<=#d, c=1; for(i=1, #D, if(D[i]!=d[i], c=0; break)); if(c, v=concat(v, k); k=0)); k++); v \\ Derek Orr, Aug 12 2015

Formula

a(n^4) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018872 a(n)^5 is smallest fifth power beginning with n.

Original entry on oeis.org

0, 1, 3, 2, 21, 9, 23, 6, 61, 25, 4, 26, 66, 42, 17, 69, 7, 28, 18, 72, 29, 116, 47, 75, 3, 48, 192, 77, 31, 124, 79, 5, 2, 32, 51, 129, 205, 13, 52, 33, 21, 53, 212, 134, 85, 34, 136, 86, 137, 87, 55, 22, 35, 14, 352, 56, 224, 142, 226, 9, 36, 144, 91, 363, 23, 58, 146, 232, 147, 37
Offset: 0

Views

Author

Keywords

Crossrefs

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

Programs

  • PARI
    a(n) = my(k=0, ss=Str(n)); while(strsplit(Str(k^5), ss)[1] != "", k++); k; \\ Michel Marcus, Aug 19 2025

Formula

a(n^5) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018874 a(n)^6 is smallest sixth power beginning with n.

Original entry on oeis.org

0, 1, 8, 18, 4, 9, 2, 3, 21, 46, 10, 7, 33, 49, 23, 5, 16, 11, 35, 24, 77, 36, 53, 115, 17, 37, 8, 55, 81, 12, 26, 121, 83, 263, 18, 39, 124, 85, 27, 271, 4, 127, 59, 87, 188, 189, 6, 19, 13, 89, 131, 61, 132, 9, 42, 133, 62, 134, 197, 29, 92, 292, 63, 43, 2, 201, 137, 202, 64, 138
Offset: 0

Views

Author

Keywords

Crossrefs

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

Formula

a(n^6) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018876 a(n)^7 is smallest seventh power beginning with n.

Original entry on oeis.org

0, 1, 3, 12, 9, 34, 13, 5, 7, 37, 10, 38, 2, 28, 76, 55, 4, 15, 21, 11, 8, 3, 58, 42, 22, 114, 16, 6, 116, 84, 117, 44, 85, 119, 23, 12, 167, 45, 234, 63, 88, 17, 33, 46, 89, 24, 173, 9, 174, 65, 47, 91, 34, 127, 66, 92, 128, 248, 48, 129, 67, 18, 13, 181, 35, 351, 131, 49, 183, 95, 255
Offset: 0

Views

Author

Keywords

Examples

			a(2)=3, because 3^7=2187 is the first 7th power with the most significant digit 2;
a(16)=4, because 4^7=16384 is the first 7th power whose two most significant digits are 16.
		

Crossrefs

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

Formula

a(n^7) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018878 a(n)^8 is smallest eighth power beginning with n.

Original entry on oeis.org

0, 1, 2, 5, 9, 7, 3, 23, 13, 42, 10, 18, 58, 78, 14, 25, 6, 34, 81, 61, 26, 11, 35, 47, 63, 2, 113, 85, 27, 86, 115, 65, 87, 49, 277, 37, 66, 21, 158, 5, 67, 283, 12, 9, 286, 51, 287, 91, 289, 122, 29, 69, 123, 39, 22, 93, 221, 7, 222, 125, 94, 223, 53, 126, 71, 3, 95, 127, 226, 17
Offset: 0

Views

Author

Keywords

Comments

a(2)=2, because 2^8=256 is the first 8th power with the most significant decimal digit equal to 2;
a(16)=6, because 6^8=1679616 is the first 8th power with two most significant decimal digits equal to 16.

Crossrefs

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

Formula

a(n^8) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018880 a(n)^9 is smallest ninth power beginning with n.

Original entry on oeis.org

0, 1, 4, 9, 7, 2, 16, 21, 59, 46, 6, 17, 22, 8, 29, 63, 38, 137, 23, 3, 14, 109, 141, 11, 184, 86, 4, 52, 87, 188, 113, 68, 19, 191, 148, 32, 149, 193, 9, 54, 7, 117, 91, 152, 118, 71, 33, 92, 154, 332, 43, 2, 93, 201, 26, 121, 261, 94, 73, 122, 34, 44, 264, 57, 123, 343, 74, 344, 16
Offset: 0

Views

Author

Keywords

Crossrefs

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

Formula

a(n^9) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017

A018882 a(n)^10 is smallest tenth power beginning with n.

Original entry on oeis.org

0, 1, 7, 9, 23, 3, 6, 49, 31, 5, 2, 32, 81, 13, 26, 33, 21, 42, 67, 85, 17, 43, 86, 109, 69, 11, 22, 35, 7, 28, 56, 89, 71, 113, 9, 18, 36, 72, 91, 182, 115, 23, 29, 58, 116, 232, 185, 147, 37, 74, 148, 59, 47, 94, 375, 188, 75, 15, 189, 3, 6, 12, 38, 24, 48, 152, 96, 121, 192, 305
Offset: 0

Views

Author

Keywords

Crossrefs

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

Formula

a(n^10) = n for n >= 0. - Seiichi Manyama, Jan 30 2017

Extensions

Added initial 0. - Seiichi Manyama, Jan 30 2017
Showing 1-10 of 21 results. Next