login
Integers m such that nonzero digits of A000217(m) are all the same.
1

%I #33 Apr 09 2022 11:10:25

%S 0,1,2,3,4,10,11,24,36,44,77,100,141,363,1000,1095,10000,100000,

%T 1000000,10000000,100000000,1000000000,10000000000,100000000000,

%U 1000000000000,10000000000000,100000000000000,1000000000000000,10000000000000000

%N Integers m such that nonzero digits of A000217(m) are all the same.

%F Conjecture: a(n) = 10^(n-13) for n >= 17.

%t (Sqrt[8 # + 1] - 1)/2 & /@

%t Sort[Select[

%t Flatten[Outer[Times,

%t Table[FromDigits[IntegerDigits[n, 2]], {n, 2^22 - 1}],

%t Range[9]]], IntegerQ[Sqrt[8 # + 1]] &]]

%o (PARI) isok(m) = #Set(select(x->(x>0), digits(m*(m+1)/2))) <= 1; \\ _Michel Marcus_, Mar 06 2022

%o (Python)

%o from itertools import count, islice

%o from sympy import integer_nthroot

%o def A352148_gen(): # generator of terms

%o yield 0

%o for l in count(0):

%o for d in range(1,10):

%o for m in range(2**l,2**(l+1)):

%o a, b = integer_nthroot(8*d*int(bin(m)[2:])+1,2)

%o if b:

%o yield (a-1)//2

%o A352148_list = list(islice(A352148_gen(),10)) # _Chai Wah Wu_, Apr 08 2022

%Y Cf. A000217, A352057 (resulting triangular numbers).

%K nonn,base,more

%O 1,3

%A _Steven Lu_, Mar 06 2022

%E a(25)-a(27) from _Chai Wah Wu_, Apr 08 2022

%E a(28)-a(29) from _Chai Wah Wu_, Apr 09 2022