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

A242268 Squares not ending in 00 that remain squares if prefixed with the digit 1.

Original entry on oeis.org

225, 5625, 5405625, 23765625, 2127515625, 58503515625, 51921031640625, 250727431640625, 20090404775390625, 608180644775390625, 498431438615478515625, 2642208974615478515625, 189450791534674072265625, 6319494849134674072265625, 9981411957966851806640625
Offset: 1

Views

Author

Reiner Moewald, Aug 16 2014

Keywords

Comments

It can easily be shown that all squares that remain squares if prefixed with the digit 1 end in 00 or 25 and, moreover, that all squares ending in 00 are multiples of the squares ending in 5 (factor: 10^(2*n)).
Subsequence of A167035. - Michel Marcus, Sep 08 2014

Examples

			225 = 15*15 and 1225 = 35*35.
		

Crossrefs

Cf. A167035.

Programs

  • Maple
    A:= {}:
    for m from 3 to 100 do
      cand1:= floor(log[5](1/2*(1+sqrt(2))*10^(m/2)));
      cand2:= floor(log[5](2*(1+sqrt(2))*(5/2)^(m/2)));
      s1:= 5^cand1 - 10^m/4/5^cand1;
      s2:=  2^m/4*5^cand2 - 5^(m-cand2);
      if s1^2 >= 10^(m-1) then A:= A union {s1^2} fi;
      if s2^2 >= 10^(m-1) then A:= A union {s2^2} fi;
    od:
    A; # Robert Israel, Sep 08 2014
  • PARI
    for(n=1,10^20,p=n^2;if(p%100,s=concat("1",Str(p));if(issquare(eval(s)),print1(p,", ")))) \\ Derek Orr, Aug 23 2014
  • Python
    import math
    def power(a, n):
       pow = 1
       for i in range(0, n):
          pow = pow * a
       return pow
    end = 50
    for n in range(1, end):
       l1 = 1/math.log(5)*(math.log(math.sqrt(2)-1)+(n-2)/2*math.log(2))+ n/2
       u1 = 1/math.log(5)*(math.log(math.sqrt(11)-1)+(n-3)/2*math.log(2))+ (n-1)/2
       if math.ceil(l1) == math.floor(u1) and math.ceil(l1)>0:
          p = math.ceil(l1)
          x = power(5, p)*(-1)+power(2, n-2)*power(5, n-p)
          print(x*x)
       l2 = 1/math.log(5)*(math.log(math.sqrt(11)+1)+(n-3)/2*math.log(2))+ (n-1)/2
       u2 = 1/math.log(5)*(math.log(math.sqrt(2)+1)+(n-2)/2*math.log(2))+ n/2
       if math.ceil(l2) == math.floor(u2) and math.ceil(l2)>0:
          p = math.ceil(l2)
          x = power(5, p)-power(2, n-2)*power(5, n-p)
          print(x*x)
    print('End.')
    

A247885 Smallest square that remains a square when prefixed with n.

Original entry on oeis.org

225, 25, 4225, 9, 625, 4, 225, 1, 3025, 5625, 9025, 1, 225, 4, 625, 9, 64, 49, 36, 25, 16, 5625, 87025, 8850625, 889914313729282379150390625, 9669767640625, 225, 9, 16, 25, 36, 4, 64, 81, 15625, 1, 1456358697509765625, 142604475904693603515625, 1050625
Offset: 1

Views

Author

Derek Orr, Sep 25 2014

Keywords

Crossrefs

Programs

  • PARI
    a(n)=k=1;while(!issquare(eval(concat(Str(n),Str(k^2)))),k++);k^2
    vector(24,n,a(n))

Extensions

a(25)-a(39) from Hiroaki Yamanouchi, Sep 26 2014

A167045 Squares that remains a square when some single digit is inserted in front of its decimal expansion.

Original entry on oeis.org

1, 4, 9, 25, 100, 225, 400, 625, 900, 1225, 2025, 2500, 3025, 4225, 5625, 7225, 10000, 22500, 30625, 40000, 50625, 62500, 70225, 75625, 90000, 93025, 122500, 202500, 250000, 302500, 330625, 422500, 455625, 562500, 722500, 765625, 950625, 1000000
Offset: 1

Views

Author

Claudio Meller, Oct 27 2009

Keywords

Examples

			225 is in the sequence because both 225 and 1225 are squares.
		

Programs

  • Maple
    a := proc (n) local s, c, j: s := proc (n) options operator, arrow: nops(convert(n, base, 10)) end proc: c := 0: for j to 9 do if type(sqrt(j*10^s(n^2)+n^2), integer) = true then c := c+1 else end if end do: if 0 < c then n^2 else end if end proc: seq(a(n), n = 1 .. 1200); # Emeric Deutsch, Nov 01 2009
  • Mathematica
    srsQ[n_]:=AnyTrue[Range[9]*10^IntegerLength[n]+n,IntegerQ[Sqrt[#]]&]; Select[ Range[1200]^2,srsQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jul 19 2016 *)

Formula

Extensions

Edited by N. J. A. Sloane, Oct 29 2009
More terms from R. J. Mathar and Emeric Deutsch, Oct 30 2009
Showing 1-3 of 3 results.