login
Triangular numbers t such that (sum of digits of t) + (product of digits of t) is a triangular number.
1

%I #22 Sep 08 2022 08:46:13

%S 0,3,10,105,120,136,190,210,300,406,703,780,820,1081,1128,1431,1540,

%T 1653,1770,1891,1953,2080,2211,2628,2701,2850,3003,3160,3403,3570,

%U 4560,4656,5050,5460,7021,7260,7503,8646,8911,9453,10011,10153,11026,12403,14028,15400

%N Triangular numbers t such that (sum of digits of t) + (product of digits of t) is a triangular number.

%C All the terms in this sequence are triangular, and hence 0 or 1 (mod 3).

%H K. D. Bajpai, <a href="/A261127/b261127.txt">Table of n, a(n) for n = 1..10000</a>

%e a(6) = 136 = 16 * (16+1) / 2, that is triangular number. (1+3+6) + (1*3*6) = 28, which is 7th triangular number.

%e a(15) = 1128 = 47 * (47+1) / 2, that is triangular number. (1+1+2+8) + (1*1*2*8) = 28, which is 7th triangular number.

%p with(numtheory): A261127:= proc() local a,k,t;t:=n*(n+1)/2; a:= (add(d,d=convert(t, base, 10)) + mul(d,d=convert(t, base, 10)));k:=(-1 + sqrt(8*a + 1))/2; if k=floor(k) then RETURN (t); fi; end: seq(A261127 (),n=0..300);

%t A261127 = {}; Do[t = n*(n + 1)/2; k = Plus @@ IntegerDigits[t] + Times @@ IntegerDigits[t]; If[IntegerQ[( -1 + Sqrt[8*k + 1])/2], AppendTo[A261127, t]], {n,0,1000}]; A261127

%o (PARI) for(n =0, 500, t = n*(n+1)/2; k = (sumdigits(t)); d = digits (t); p = prod(i = 1, #d, d[i]); s = k+p; if(ispolygonal(s,3), print1(t, ", ")));

%o (Magma) [n*(n+1) div 2: n in [0..100] | IsSquare(8*k+1) where k is (&+Intseq(n*(n+1) div 2) + &*Intseq(n*(n+1) div 2))];

%Y Cf. A000217, A007953, A007954, A061762, A214629.

%K nonn,base

%O 1,2

%A _K. D. Bajpai_, Aug 09 2015