OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..203 (all terms up to and including the one millionth triangular number)
EXAMPLE
4095 is a term: 4 + 5 = 9 = 0 + 9.
MAPLE
a:=proc(n) local nn: nn:=convert(n*(n+1)/2, base, 10): if sum(nn[j], j=2..nops(nn)-1)=nn[1]+nn[nops(nn)] then n*(n+1)/2 else fi end: seq(a(n), n=1..1300); # Emeric Deutsch, Aug 06 2005
MATHEMATICA
Do[d = IntegerDigits[n*(n+1)/2]; l = Length[d]; s = d[[1]] + d[[l]]; If[Plus @@ d == 2*s, Print[n*(n+1)/2]], {n, 1, 10^3}] (* Ryan Propper, Aug 06 2005 *)
edidQ[n_]:=Module[{idn=IntegerDigits[n]}, Total[idn[[1]]+idn[[-1]]]== Total[ Most[ Rest[idn]]]]; Select[Accumulate[Range[2000]], edidQ]//Quiet (* Harvey P. Dale, Nov 23 2022 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Sep 29 2003
EXTENSIONS
Offset changed by Andrew Howroyd, Sep 21 2024
STATUS
approved