OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000
PROG
(Python)
from math import comb, isqrt
from sympy import integer_nthroot
def A088405(n): return (10**((m:=integer_nthroot(6*n, 3)[0])-(a:=n<=comb(m+2, 3)))+10**((k:=isqrt(b:=(c:=n-comb(m-a+2, 3))<<1))-((b<<2)<=(k<<2)*(k+1)+1))+10**(c-1-comb(k+(b>k*(k+1)), 2)))//3 # Chai Wah Wu, Dec 11 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray Chandler, Sep 29 2003
STATUS
approved