A349247 Least n-digit number k with only odd digits such that the k-th triangular number also has only odd digits.
1, 13, 177, 1777, 15173, 135173, 3397973, 13535137, 135157537, 1193111377, 11979759377, 119595919137, 1195991117973, 11979931335173, 119777591993777, 1199999593111377, 11977793913551137, 119593573333335733, 1195935733333335733, 11977593393931151137, 119759371717733717537
Offset: 1
Links
- S. S. Gupta, Can You Find (CYF) no. 55, Nov 11 2021.
- A. Zimmermann, Al Zimmermann's Programming Contests: Oddly Triangular, Sep. 7-8, 2022
Crossrefs
Programs
-
PARI
apply( A349247(n)=A347475_next(10^n\9), [1..15]) \\ Edited (moved function body to A347475) by M. F. Hasler, Sep 13 2022
-
Python
from itertools import product def A349247(n): for a in product('13579',repeat=n): if set(str((m:=int(''.join(a)))*(m+1)>>1)) <= {'1', '3', '5', '7', '9'}: return m # Chai Wah Wu, Sep 08 2022
-
Python
A349247 = lambda n: next_A347475(10**n//9) # M. F. Hasler, Sep 10 2022
Formula
a(n) = min { k in A347475 | k >= 10^(n-1) }.
Comments