login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k with squares that are concatenations k^2 = x//y such that x is an anagram of y.
1

%I #17 Jul 19 2024 20:58:05

%S 836,3911,6926,6941,9701,9786,32119,35268,39011,40104,40645,40991,

%T 41489,42849,43204,45743,49498,50405,50705,54335,55493,57089,57111,

%U 59872,60406,62043,64396,64671,66979,68595,69028,69907,70107,72475,73625,75926,76279

%N Numbers k with squares that are concatenations k^2 = x//y such that x is an anagram of y.

%C Cases with leading zeros in y, for example 51674^2 = 2670202276, are not admitted.

%C Contains 4*10^(2*k)+10^k+4, 5*10^(2*k)+4*10^k+5, 5*10^(2*k)+7*10^k+5,

%C 6*10^(2*k)+4*10^k+6, 7*10^(2*k)+10^k+7 for k >= 2. In particular, the sequence is infinite. - _Robert Israel_, Apr 16 2019

%H Robert Israel, <a href="/A162945/b162945.txt">Table of n, a(n) for n = 1..1000</a>

%e 836^2 = 698896 = 698//896 and 698 is an anagram of 896.

%p isA162945 := proc(n) local n2,x,y ; n2 := convert(n^2,base,10) ; if nops(n2) mod 2 = 0 then if op(nops(n2)/2,n2) <> 0 then y := sort( [op(1..nops(n2)/2,n2)] ); x := sort( [op(nops(n2)/2+1..nops(n2),n2)] ); RETURN( x = y) ; else false; fi; else false; fi; end:

%p for n from 1 to 90000 do if isA162945(n) then printf("%d,\n",n) ; fi; od: # _R. J. Mathar_, Jul 21 2009

%t Cases[If[OddQ@(l = IntegerLength@(p = #^2)),

%t Nothing, {#, Partition[IntegerDigits@p, l/2]}] & /@

%t Range@500000, {a_, _?(Sort@#[[1]] == Sort@#[[2]] && #[[2]][[1]] != 0 &)} :> a] (* _Hans Rudolf Widmer_, Jul 19 2024 *)

%K nonn,base

%O 1,1

%A _Claudio Meller_, Jul 18 2009

%E Keyword:base added by _R. J. Mathar_ Jul 21 2009