OFFSET
1,1
COMMENTS
Contains (2*10^i - 1)*10^i and (2*10^i - 1)*10^i + 1 for all i >= 1. - Michael S. Branicky, Jan 22 2022
LINKS
David A. Corneth, Table of n, a(n) for n = 1..56 (first 41 terms from Michael S. Branicky)
EXAMPLE
90415 = T(90) + T(415).
MATHEMATICA
lst = {}; t[n_] := n(n + 1)/2; Do[p=10; While[n > p, If[t[Mod[n, p]] + t[Floor[n/p]] == n, AppendTo[lst, n]]; p*= 10], {n, 10^6}]; lst
PROG
(Python)
def T(n): return n*(n+1)//2
def ok(n):
if n < 10: return False
s = str(n)
splits = ((int(s[:i]), int(s[i:])) for i in range(1, len(s)))
return any(n == T(x) + T(y) for x, y in splits)
print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Jan 22 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Giovanni Resta, Jan 21 2006
EXTENSIONS
a(26)-a(28) from Michael S. Branicky, Jan 22 2022
STATUS
approved