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

A272671 Numbers k such that the decimal number 1k is a square.

Original entry on oeis.org

6, 21, 44, 69, 96, 156, 225, 296, 369, 444, 521, 600, 681, 764, 849, 936, 1025, 1236, 1449, 1664, 1881, 2100, 2321, 2544, 2769, 2996, 3225, 3456, 3689, 3924, 4161, 4400, 4641, 4884, 5129, 5376, 5625, 5876, 6129, 6384, 6641, 6900, 7161, 7424, 7689, 7956, 8225, 8496, 8769, 9044, 9321, 9600
Offset: 1

Views

Author

Keywords

Examples

			44 is a member because 144 = 12^2 is a square.
0 is not a member because 10 is not a square.
		

Crossrefs

Cf. A265432, A272672, A045855 (squares beginning with 1), A272684, A272685.

Programs

  • Magma
    [n: n in [1..10000 ] | IsSquare(Seqint(Intseq(n) cat Intseq(1)))]; // Marius A. Burtea, Mar 21 2019
    
  • Maple
    t1:=[];
    for k from 1 to 20000 do
    if issqr(k+10^length(k)) then t1:=[op(t1),k]; fi;
    od;
    t1;
  • Mathematica
    Flatten[n /. Solve[10^# + n == a^2 && 10^(# - 1) <= n < 10^# && a > 0, {n, a}, Integers] & /@ Range[3]] (* Davin Park, Feb 05 2017 *)
    Select[Range[10000],IntegerQ[Sqrt[10^IntegerLength[#]+#]]&] (* Harvey P. Dale, Jul 20 2025 *)
  • PARI
    isok(n) = issquare(eval(concat(1, Str(n)))); \\ Michel Marcus, Mar 21 2019
    
  • Python
    from sympy.ntheory.primetest import is_square
    def ok(n): return is_square(int('1'+str(n)))
    print(list(filter(ok, range(9601)))) # Michael S. Branicky, Jun 21 2021

Extensions

Extended by Davin Park, Feb 05 2017

A045784 Squares with initial digit '1'.

Original entry on oeis.org

1, 16, 100, 121, 144, 169, 196, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 10000, 10201, 10404, 10609, 10816, 11025, 11236, 11449, 11664, 11881, 12100, 12321, 12544, 12769, 12996, 13225, 13456, 13689, 13924
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[120]^2,First[IntegerDigits[#]]==1&] (* Harvey P. Dale, Dec 31 2011 *)

Formula

a(n) = A045855(n)^2. - Michel Marcus, Sep 04 2021

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 *)

A348487 Positive numbers whose square starts and ends with exactly one 1.

Original entry on oeis.org

1, 11, 39, 41, 101, 111, 119, 121, 129, 131, 139, 141, 319, 321, 329, 331, 349, 351, 359, 361, 369, 371, 379, 381, 389, 391, 399, 401, 409, 411, 419, 421, 429, 431, 439, 441, 1001, 1009, 1011, 1019, 1021, 1029, 1031, 1039, 1041, 1099, 1101, 1109, 1111, 1119, 1121, 1129, 1131, 1139
Offset: 1

Views

Author

Bernard Schott, Oct 21 2021

Keywords

Comments

When a square ends with 1, this square ends with exactly one 1.
Sequences A000533 and A253213 show that there are an infinity of terms. The square of their terms, for n >= 3, starts and ends with exactly one 1. Also, the numbers 119, 1119, 11119, ..., ((10^k + 71) / 9)^2, (k >= 3) are terms. The squares ((10^k + 71) / 9)^2, have the last digit 1 and because 12*10^(2*k - 3) < ((10^k + 71) / 9)^2 <13*10^(2*k - 3), for k >= 3, the squares ((10^k + 71) / 9)^2, k >= 4, start with 12. - Marius A. Burtea, Oct 21 2021

Examples

			39 is a term since 39^2 = 1521.
109 is not a term since 109^2 = 11881.
119 is a term since 119^2 = 14161.
		

Crossrefs

Cf. A045855, A090771, A253213, A273372 (squares ending with 1), A017281, A017377.
Cf. A000533, A253213 for n >= 2 (subsequences).
Subsequence of A305719.

Programs

  • Magma
    [1] cat [n:n in [2..1200]|Intseq(n*n)[1] eq 1 and Intseq(n*n)[#Intseq(n*n)] eq 1 and Intseq(n*n)[-1+#Intseq(n*n)] ne 1]; // Marius A. Burtea, Oct 21 2021
  • Mathematica
    Join[{1}, Select[Range[11, 1200], (d = IntegerDigits[#^2])[[1]] == d[[-1]] == 1 && d[[2]] != 1 &]] (* Amiram Eldar, Oct 21 2021 *)
  • PARI
    isok(k) = my(d=digits(sqr(k))); (d[1]==1) && (d[#d]==1) && if (#d>2, (d[2]!=1) && (d[#d-1]!=1), 1); \\ Michel Marcus, Oct 21 2021
    
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("1")) == len(s.lstrip("1")) == len(s)-1
    def aupto(N):
      r = takewhile(lambda x: x<=N, (10*i+d for i in count(0) for d in [1, 9]))
      return [k for k in r if ok(k)]
    print(aupto(1140)) # Michael S. Branicky, Oct 21 2021
    

A272673 Take list of squares that start with 1 (A045784) and omit the leading 1 and any leading zeros from what is left; if the number was a power of 10, replace it with 0.

Original entry on oeis.org

0, 6, 0, 21, 44, 69, 96, 24, 89, 156, 225, 296, 369, 444, 521, 600, 681, 764, 849, 936, 0, 201, 404, 609, 816, 1025, 1236, 1449, 1664, 1881, 2100, 2321, 2544, 2769, 2996, 3225, 3456, 3689, 3924, 4161, 4400, 4641, 4884, 5129, 5376, 5625, 5876
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    A272673_list = [0] + [int(str(m**2)[1:]) if sum(int(d) for d in str(m**2)[1:]) != 1 else 0 for m in range(4,10**3) if str(m**2)[0] == '1'] # Chai Wah Wu, May 21 2016
Showing 1-5 of 5 results.