A186438 Positive numbers whose squares end in two identical digits.
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
Examples
62 is in the sequence because 62^2 = 3844.
References
- Jean Meeus, Letter to N. J. A. Sloane, Dec 26 1974.
Links
- J. Meeus & N. J. A. Sloane, Correspondence, 1974-1975
- Ana Rechtman, Juillet 2021, 4e défi, Images des Mathématiques, CNRS, 2021 (in French).
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
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]
Comments