login
Triangular numbers such that moving the first digit to the end produces a square number.
2

%I #14 Dec 29 2023 13:20:53

%S 1,10,136,406,111628,400960,624403,40423536,1119043156276,

%T 4291092052416,600441627703203,93344240136333376,4950849307261614030,

%U 9159508712581260256,91853946457361410960,94418158421136440556,108128255436355107240,111546878242671354528

%N Triangular numbers such that moving the first digit to the end produces a square number.

%C The square roots are: 1, 1, 19, 8, 341, 98, 494, 2058, 1091069, 1706142, 2101494 - _Robert G. Wilson v_, Oct 14 2007

%C a(17) > 10^20. - _Donovan Johnson_, Mar 14 2011

%H Giovanni Resta, <a href="/A133197/b133197.txt">Table of n, a(n) for n = 1..87</a> (terms < 10^63)

%e 136 is a triangular number, 361 is a square number - hence 136 belongs to this sequence.

%t Select[Table[n(n + 1)/2, {n, 1000000}], IntegerQ[Sqrt[ FromDigits[ Append[Drop[IntegerDigits[ # ], 1], First[IntegerDigits[ # ]]]]]] &]

%t lst = {}; Do[ t = n (n + 1)/2; id = IntegerDigits@ t; If[MemberQ[{1, 4, 5, 6, 9}, id[[1]]] && IntegerQ@ Sqrt@ FromDigits@ RotateLeft@ id, AppendTo[lst, t]; Print@t], {n, 44000000}]; lst - _Robert G. Wilson v_, Oct 14 2007

%t Select[Accumulate[Range[10^6]],IntegerQ[Sqrt[FromDigits[RotateLeft[IntegerDigits[#]]]]]&] (* The program generates the first 8 terms of the sequence. To generate more, increase the Range constant but the program may take a long time to run. *) (* _Harvey P. Dale_, Dec 29 2023 *)

%Y Cf. A133198.

%K base,nonn

%O 1,2

%A _Tanya Khovanova_, Oct 09 2007

%E More terms from _Robert G. Wilson v_, Oct 14 2007

%E a(12) from _Donovan Johnson_, May 13 2010

%E a(13)-a(16) from _Donovan Johnson_, Mar 14 2011

%E a(17)-a(18) from _Giovanni Resta_, May 11 2016