A261127 Triangular numbers t such that (sum of digits of t) + (product of digits of t) is a triangular number.
0, 3, 10, 105, 120, 136, 190, 210, 300, 406, 703, 780, 820, 1081, 1128, 1431, 1540, 1653, 1770, 1891, 1953, 2080, 2211, 2628, 2701, 2850, 3003, 3160, 3403, 3570, 4560, 4656, 5050, 5460, 7021, 7260, 7503, 8646, 8911, 9453, 10011, 10153, 11026, 12403, 14028, 15400
Offset: 1
Examples
a(6) = 136 = 16 * (16+1) / 2, that is triangular number. (1+3+6) + (1*3*6) = 28, which is 7th triangular number. 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.
Links
- K. D. Bajpai, Table of n, a(n) for n = 1..10000
Programs
-
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))];
-
Maple
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);
-
Mathematica
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
-
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, ", ")));
Comments