OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
PROG
(Python)
from math import isqrt
from itertools import count
def dmo(n, t):
if t < n: return False
while n and t:
if n%10 == t%10:
n //= 10
t //= 10
return n == 0
def a(n):
return next(t for t in (i*(i+1)//2 for i in count(isqrt(2*n))) if dmo(n, t))
print([a(n) for n in range(1, 77)]) # Michael S. Branicky, Jan 21 2023
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Mar 07 2003
EXTENSIONS
More terms from Ray Chandler, Oct 11 2003
STATUS
approved