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.

A273373 Squares ending in digit 6.

Original entry on oeis.org

16, 36, 196, 256, 576, 676, 1156, 1296, 1936, 2116, 2916, 3136, 4096, 4356, 5476, 5776, 7056, 7396, 8836, 9216, 10816, 11236, 12996, 13456, 15376, 15876, 17956, 18496, 20736, 21316, 23716, 24336, 26896, 27556, 30276, 30976, 33856, 34596, 37636, 38416, 41616
Offset: 1

Views

Author

Vincenzo Librandi, May 21 2016

Keywords

Comments

These are the only squares whose second last digit is odd. This implies that the only squares whose last two digits are the same are those ending with 0 or 4; those ending with 1, 5, and 9 are paired with even second last digits. - Waldemar Puszkarz, May 24 2016

Crossrefs

Cf. A017341 (numbers ending in 6), A017343 (cubes ending in 6).
Cf. squares with last digit k: A017270 (k=0), A273372 (k=1), A273375 (k=4), A017330 (k=5), this sequence (k=6), A273374 (k=9).

Programs

  • Magma
    /* By definition: */ [n^2: n in [0..200] | Modexp(n,2,10) eq 6];
    
  • Magma
    [(10*n - 3*(-1)^n - 5)^2/4: n in [1..50]];
  • Maple
    seq(seq((10*i+j)^2,j=[4,6]),i=0..20); # Robert Israel, May 24 2016
  • Mathematica
    Table[(10 n - 3 (-1)^n - 5)^2/4, {n, 1, 50}]
    CoefficientList[Series[4 (4 + 5 x + 32 x^2 + 5 x^3 + 4 x^4) / ((1 + x)^2 (1 - x)^3), {x, 0, 50}], x]
    Select[Range[250]^2,Mod[#,10]==6&] (* Harvey P. Dale, May 31 2020 *)

Formula

G.f.: 4*x*(4 + 5*x + 32*x^2 + 5*x^3 + 4*x^4)/((1 + x)^2*(1 - x)^3).
a(n) = 4*A047221(n)^2 = (10*n - 3*(-1)^n - 5)^2/4.
a(n) = A090773(n)^2. - Michel Marcus, May 25 2016
Sum_{n>=1} 1/a(n) = 2*Pi^2/(25*(5+sqrt(5))). - Amiram Eldar, Feb 16 2023

Extensions

Corrected and extended by Bruno Berselli, May 23 2016

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