login
a(n) is the greatest y such that A393978(n)^2 - y^2 is an anagram of y^2.
6

%I #6 Mar 13 2026 16:50:50

%S 0,27,51,72,147,156,231,246,126,252,294,249,282,282,273,270,282,267,

%T 321,327,336,396,324,414,318,375,519,510,498,651,651,651,405,429,708,

%U 483,564,690,420,375,729,729,603,639,336,660,567,759,375,579,618,645,642,633,708,666,507,672,873,954

%N a(n) is the greatest y such that A393978(n)^2 - y^2 is an anagram of y^2.

%C All terms are divisible by 3.

%H Robert Israel, <a href="/A394001/b394001.txt">Table of n, a(n) for n = 1..10000</a>

%F A004186(A393978(n)^2 - a(n)^2) = A004186(a(n)^2).

%e a(7) = 231 because A393978(7) = 264 and 264^2 = 231^2 + 16335, where 16335 is an anagram of 231^2 = 53361, and 231 is the greatest number that works.

%p # given a list of the first N terms of A393978, for some N

%p g:= proc(x) local s,y,r,L,Lr;

%p s:= x^2;

%p for y from x-3 by -3 do

%p r:= s - y^2;

%p if ilog10(r) <> ilog10(y^2) then next fi;

%p if sort(convert(r,base,10)) = sort(convert(y^2,base,10)) then return y fi

%p od

%p end proc:

%p g(0):= 0:

%p map(g, A393978);

%Y Cf. A004186, A393978, A393998.

%K nonn,base

%O 1,2

%A _Robert Israel_, Mar 06 2026