login
a(n) is the minimal j >= n such that the sum of consecutive integers from n to j is a palindrome.
2

%I #8 Jul 03 2023 12:59:59

%S 1,2,3,4,5,6,7,8,9,12,11,45,24,19,18,17,27,29,34,26,23,22,30,32,43,31,

%T 28,35,40,44,44,34,33,45,56,38,106,39,49,61,73,50,58,44,56,48,54,53,

%U 50,51,60,59,58,57,55,58,64,63,62,61,69,72,68,67,66,66,79,100,72,71,83,78

%N a(n) is the minimal j >= n such that the sum of consecutive integers from n to j is a palindrome.

%H Harvey P. Dale, <a href="/A109841/b109841.txt">Table of n, a(n) for n = 1..1000</a>

%e a(14)=19 because 14 + 15 + 16 + 17 + 18 + 19 = 99.

%t sci[n_]:=Module[{k=n},While[!PalindromeQ[Total[Range[n,k]]],k++];k]; Array[sci,80] (* _Harvey P. Dale_, Jul 03 2023 *)

%Y Cf. A109842.

%K base,easy,nonn

%O 1,2

%A _Jason Earls_, Jul 05 2005