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

A305719 Numbers whose squares have the same first and last digits.

Original entry on oeis.org

1, 2, 3, 11, 22, 26, 39, 41, 68, 75, 97, 101, 109, 111, 119, 121, 129, 131, 139, 141, 202, 208, 212, 218, 222, 225, 235, 246, 254, 256, 264, 303, 307, 313, 319, 321, 329, 331, 339, 341, 349, 351, 359, 361, 369, 371, 379, 381, 389, 391, 399, 401, 409, 411, 419, 421, 429, 431, 439, 441, 638
Offset: 1

Views

Author

Neville Holmes, Jun 08 2018

Keywords

Examples

			For k = 11, k^2 = 121;
for k = 26, k^2 = 676.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[638], (d = IntegerDigits[#^2]; d[[1]] == d[[-1]]) &] (* Giovanni Resta, Jun 25 2018 *)
  • PARI
    for(n=1, 10^3, my(d=digits(n^2)); if( d[1]==d[#d], print1(n,", "))); \\ Joerg Arndt, Jun 10 2018
    
  • Python
    def ok(n): s = str(n*n); return s[0] == s[-1]
    print(list(filter(ok, range(1, 639)))) # Michael S. Branicky, Jul 16 2021

A186438 Positive numbers whose squares end in two identical digits.

Original entry on oeis.org

10, 12, 20, 30, 38, 40, 50, 60, 62, 70, 80, 88, 90, 100, 110, 112, 120, 130, 138, 140, 150, 160, 162, 170, 180, 188, 190, 200, 210, 212, 220, 230, 238, 240, 250, 260, 262, 270, 280, 288, 290, 300, 310, 312, 320, 330, 338, 340, 350, 360, 362, 370, 380, 388, 390, 400, 410, 412
Offset: 1

Views

Author

Michel Lagneau, Feb 21 2011

Keywords

Comments

The numbers are of the form : 10k, or 50k - 12, or 50k + 12, or 50k + 38.

Examples

			62 is in the sequence because 62^2 = 3844.
		

References

  • Jean Meeus, Letter to N. J. A. Sloane, Dec 26 1974.

Crossrefs

Cf. A016742 (even squares), A123912.

Programs

  • Maple
    with(numtheory):T:=array(1..10):for p from 1 to 1000 do:n:=p^2:l:=length(n):n0:=n:for
      m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :T[m]:=u:od:if T[1]=T[2]
      then printf(`%d, `,p):else fi:od:
  • Mathematica
    tidQ[n_]:=Module[{idn=IntegerDigits[n^2]},idn[[-1]]==idn[[-2]]]; Select[ Range[ 4,500],tidQ] (* or *) LinearRecurrence[{1,0,0,0,0,0,1,-1},{10,12,20,30,38,40,50,60},60] (* Harvey P. Dale, Jan 25 2014 *)

Formula

G.f.: 2*x*(5*x^6+x^5+4*x^4+5*x^3+4*x^2+x+5)/((x-1)^2 * (x^6+x^5+x^4+x^3+x^2+x+1)). [Colin Barker, Jul 02 2012]

A346774 Numbers whose square starts and ends with exactly 2 identical digits.

Original entry on oeis.org

88, 150, 210, 212, 338, 340, 470, 580, 670, 880, 940, 1050, 1060, 1062, 1070, 1080, 1088, 1090, 1488, 1510, 1512, 1820, 1830, 1838, 1840, 2110, 2112, 2120, 2350, 2360, 2362, 2570, 2580, 2588, 2780, 2790, 2970, 3150, 3160, 3320, 3330, 3350, 3360, 3362, 3370, 3380, 3388, 3390, 3410
Offset: 1

Views

Author

Bernard Schott, Aug 03 2021

Keywords

Comments

The terminal digits are 00 or 44.

Examples

			150 is a term because 150^2 = 22500.
212 is a term because 212^2 = 44944 (smallest square with 2 times two 4's).
2788 is not a term because 2788^2 = 7772944.
		

Crossrefs

Subsequence of A346678.

Programs

  • Mathematica
    Select[Range[32, 3500], (d = IntegerDigits[#^2])[[1]] == d[[2]] != d[[3]] && d[[-1]] == d[[-2]] != d[[-3]] &] (* Amiram Eldar, Aug 03 2021 *)
  • Python
    def ok(n):
        s = str(n*n)
        if len(s) < 4: return False # there are no ok squares with < 4 digits
        return s[0] == s[1] != s[2] and s[-1] == s[-2] != s[-3]
    print(list(filter(ok, range(3411)))) # Michael S. Branicky, Aug 03 2021

A346812 Positive numbers whose square starts with exactly 2 identical digits.

Original entry on oeis.org

15, 21, 34, 47, 58, 67, 88, 94, 105, 106, 107, 108, 109, 150, 151, 182, 183, 184, 210, 211, 212, 235, 236, 257, 258, 278, 279, 297, 315, 316, 332, 333, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 470, 471, 473, 474, 475, 476, 477, 478, 479, 575, 576, 577, 578, 579, 580, 581
Offset: 1

Views

Author

Bernard Schott, Aug 05 2021

Keywords

Comments

If m is a term, then 10*m is another term.

Examples

			34 is a term because 34^2 = 1156.
149 is not a term because 149^2 = 22201.
		

Crossrefs

Subsequence of A123912.
A346774 is a subsequence.
Cf. A186438, A186439, A346678 (similar, with "ends").

Programs

  • Mathematica
    Select[Range[10, 600], (d = IntegerDigits[#^2])[[1]] == d[[2]] != d[[3]] &] (* Amiram Eldar, Aug 05 2021 *)
  • PARI
    isok(m) = my(d=digits(m^2)); (#d > 2) && (d[2] == d[1]) && (d[3] != d[2]); \\ Michel Marcus, Aug 05 2021
  • Python
    def ok(n): s = str(n*n); return len(s) > 2 and s[0] == s[1] != s[2]
    print(list(filter(ok, range(582)))) # Michael S. Branicky, Aug 05 2021
    

A353080 Numbers whose squares have the first three digits the same as the next three digits.

Original entry on oeis.org

1429, 1537, 1692, 1823, 2001, 2312, 2467, 2729, 2858, 3148, 3242, 3635, 3849, 4002, 4541, 4552, 5851, 6003, 6216, 6296, 6375, 7145, 7152, 7159, 7698, 8004, 9093, 9104, 9235, 9444, 10005, 10154, 12006, 12335, 13645, 14007, 14290, 14325, 15272, 15370, 16008, 16531
Offset: 1

Views

Author

Tanya Khovanova, Apr 22 2022

Keywords

Examples

			1429^2 = 2042041 and 1537^2 = 2362369. Thus, 1429 and 1537 are both in this sequence.
		

Crossrefs

Programs

  • Maple
    q:= n-> (s-> is(s[1..3]=s[4..6]))(""||(n^2)):
    select(q, [$317..17000])[];  # Alois P. Heinz, Apr 22 2022
  • Mathematica
    Select[Range[317, 20000], Take[IntegerDigits[#^2], {1, 3}] == Take[IntegerDigits[#^2], {4, 6}] &]
  • Python
    def ok(n): s = str(n**2); return len(s) > 5 and s[:3] == s[3:6]
    print([k for k in range(20000) if ok(k)]) # Michael S. Branicky, Apr 22 2022

A353081 Numbers whose squares have the first two digits the same as the next two digits.

Original entry on oeis.org

201, 264, 402, 482, 603, 689, 772, 804, 932, 964, 1005, 1101, 1146, 1231, 1557, 1798, 1907, 2010, 2035, 2084, 2132, 2202, 2357, 2582, 2640, 2659, 2678, 2734, 2878, 3015, 3114, 3179, 3334, 3482, 3624, 3761, 3893, 4020, 4021, 4144, 4264, 4381, 4495, 4606, 4714, 4820, 4924
Offset: 1

Views

Author

Tanya Khovanova, Apr 22 2022

Keywords

Crossrefs

Programs

  • Maple
    q:= n-> (s-> is(s[1..2]=s[3..4]))(""||(n^2)):
    select(q, [$32..10000])[];  # Alois P. Heinz, Apr 22 2022
  • Mathematica
    Select[Range[32, 5000], Take[IntegerDigits[#^2], {1, 2}] ==  Take[IntegerDigits[#^2], {3, 4}] &]
  • PARI
    do(n)=my(v=List()); for(a=1,9, for(b=0,9, my(N=10^(n-4), t=(1010*a+101*b)*N-1); for(k=sqrtint(t)+1,sqrtint(t+N), listput(v,k)))); Vec(v) \\ finds terms corresponding to n-digit squares; Charles R Greathouse IV, Apr 24 2022
  • Python
    def ok(n): s = str(n**2); return len(s) > 3 and s[:2] == s[2:4]
    print([k for k in range(5000) if ok(k)]) # Michael S. Branicky, Apr 22 2022
    

Formula

201^2 = 40401 and 264^2 = 69696. Thus, both 201 and 264 are in this sequence.
Showing 1-6 of 6 results.