%I #31 Nov 13 2024 12:48:02
%S 9,99,9009,14841,76167,108801,239932,828828,886688,2112112,4663664,
%T 7152517,17333371,17511571,42844824,61200216,135666531,658808856,
%U 6953443596,6961551696,27110501172,46277277264,405162261504,483867768384,522733337225,588114411885
%N Palindromes that can be written as the sum of two or more consecutive positive cubes.
%C Can any term in the sequence be written as sum of 2 or more consecutive cubes in more than one way? The answer is no for a(1)-a(46). - _Chai Wah Wu_, Dec 17 2015
%H Chai Wah Wu, <a href="/A265203/b265203.txt">Table of n, a(n) for n = 1..46</a> (all terms < 2000000300000030000001)
%e 14841 can be written as 16^3 + 17^3 + 18^3.
%p ispali:= proc(n) local L; L:= convert(n,base,10);
%p ListTools:-Reverse(L) = L end proc:
%p A265203:= proc(N) # get all terms <= N
%p local S,a,b,t;
%p S:= select(t -> t<=N and ispali(t),
%p {seq(seq(b^2*(b+1)^2/4 - a^2*(a+1)^2/4, a=0..b-2),b=2..(1+iroot(4*N,3))/2)});
%p sort(convert(S,list));
%p end proc:
%p A265203(10^9); # _Robert Israel_, Dec 07 2015
%t lim = 800; Sort@ Select[Plus @@@ Map[#^3 &, Select[Flatten[Table[Partition[Range@ lim, k, 1], {k, 2, lim}], 1], Times @@ Differences@ # == 1 &]], # == Reverse@ # &@ IntegerDigits@ # &] (* _Michael De Vlieger_, Dec 16 2015 *)
%o (Sage)
%o def palindromic_cubic_sums(x_max):
%o success = set()
%o for x_min in range(1,x_max^(1/3)):
%o sum_powers = x_min^3
%o for i in range(x_min+1,x_max^(1/3)):
%o sum_powers += (i^3)
%o if sum_powers >= x_max:
%o break
%o if str(sum_powers) == str(sum_powers)[::-1]:
%o success.add(sum_powers)
%o return sorted(success)
%Y Cf. A002113, A217843.
%K nonn,base
%O 1,1
%A _Ann Marie Murray_, Dec 03 2015