login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of n-th triangular number and its reversal.
1

%I #16 Apr 03 2023 10:36:11

%S 0,2,6,12,11,66,33,110,99,99,110,132,165,110,606,141,767,504,342,281,

%T 222,363,605,948,303,848,504,1251,1010,969,1029,1190,1353,726,1190,

%U 666,1332,1010,888,867,848,1029,1212,1595,1089,6336,2882,9339,7887,6446

%N Sum of n-th triangular number and its reversal.

%C Gupta states in Prime Curios: "The smallest odd prime which can be represented as sum of a triangular number and its reverse, i.e., 10 + 01 = 11."

%H Alois P. Heinz, <a href="/A127698/b127698.txt">Table of n, a(n) for n = 0..14141</a>

%H G. L. Honaker, Jr. and Chris Caldwell, eds., <a href="https://t5k.org/curios/page.php?short=11">11</a>.

%F a(n) = A000217(n) + A004086(A000217(n)).

%e a(0) = 0 + 0 = 0.

%e a(1) = 1 + 1 = 2 is the even prime.

%e a(4) = 10 + 1 = 11 is an odd prime.

%e a(5) = 15 + 51 = 66 = A000217(10).

%e a(19) = 190 + 91 = 281 is an odd prime.

%e a(24) = 300 + 3 = 303.

%e a(35) = 630 + 36 = 666 = A000217(36).

%p a:= n-> (p-> parse(cat(p, "+", seq(p[-i],

%p i=1..length(p)))))(""||(n*(n+1)/2)):

%p seq(a(n), n=0..60); # _Alois P. Heinz_, Jun 19 2016

%t rev[n_] := FromDigits@ Reverse@ IntegerDigits@ n; t[n_] := n (n + 1)/2; Table[t@ n + rev@ t@ n, {n, 0, 49}] (* _Giovanni Resta_, Jun 19 2016 *)

%t #+IntegerReverse[#]&/@Accumulate[Range[0,50]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 20 2016 *)

%Y Cf. A000217, A004086.

%K base,easy,look,nonn

%O 0,2

%A _Jonathan Vos Post_, Apr 03 2007

%E Edited by _Giovanni Resta_, Jun 19 2016