A088405 a(n) = A052217(n)/3.
1, 4, 7, 10, 34, 37, 40, 67, 70, 100, 334, 337, 340, 367, 370, 400, 667, 670, 700, 1000, 3334, 3337, 3340, 3367, 3370, 3400, 3667, 3670, 3700, 4000, 6667, 6670, 6700, 7000, 10000, 33334, 33337, 33340, 33367, 33370, 33400, 33667, 33670, 33700, 34000
Offset: 1
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A052217.
Programs
-
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