cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A265203 Palindromes that can be written as the sum of two or more consecutive positive cubes.

This page as a plain text file.
%I A265203 #31 Nov 13 2024 12:48:02
%S A265203 9,99,9009,14841,76167,108801,239932,828828,886688,2112112,4663664,
%T A265203 7152517,17333371,17511571,42844824,61200216,135666531,658808856,
%U A265203 6953443596,6961551696,27110501172,46277277264,405162261504,483867768384,522733337225,588114411885
%N A265203 Palindromes that can be written as the sum of two or more consecutive positive cubes.
%C A265203 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 A265203 Chai Wah Wu, <a href="/A265203/b265203.txt">Table of n, a(n) for n = 1..46</a> (all terms < 2000000300000030000001)
%e A265203 14841 can be written as 16^3 + 17^3 + 18^3.
%p A265203 ispali:= proc(n) local L; L:= convert(n,base,10);
%p A265203   ListTools:-Reverse(L) = L end proc:
%p A265203 A265203:= proc(N) # get all terms <= N
%p A265203   local S,a,b,t;
%p A265203   S:= select(t -> t<=N and ispali(t),
%p A265203      {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 A265203   sort(convert(S,list));
%p A265203 end proc:
%p A265203 A265203(10^9); # _Robert Israel_, Dec 07 2015
%t A265203 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 A265203 (Sage)
%o A265203 def palindromic_cubic_sums(x_max):
%o A265203     success = set()
%o A265203     for x_min in range(1,x_max^(1/3)):
%o A265203         sum_powers = x_min^3
%o A265203         for i in range(x_min+1,x_max^(1/3)):
%o A265203             sum_powers += (i^3)
%o A265203             if sum_powers >= x_max:
%o A265203                 break
%o A265203             if str(sum_powers) == str(sum_powers)[::-1]:
%o A265203                 success.add(sum_powers)
%o A265203     return sorted(success)
%Y A265203 Cf. A002113, A217843.
%K A265203 nonn,base
%O A265203 1,1
%A A265203 _Ann Marie Murray_, Dec 03 2015