A260191 Numbers m such that there exists no square whose base-m digit sum is binomial(m,2).
3, 5, 13, 17, 21, 29, 37, 45, 49, 53, 61, 65, 69, 77, 81, 85, 93, 101, 109, 113, 117, 125, 133, 141, 145, 149, 157, 165, 173, 177, 181, 189, 193, 197, 205, 209, 213, 221, 229, 237, 241, 245, 253, 257, 261, 269, 273, 277, 285, 293, 301, 305, 309, 317, 321, 325
Offset: 1
Examples
No square has a base-3 digit sum of exactly binomial(3,2)=3, so 3 is in the sequence. Binomial(5,2) = 10 == 2 (mod 4), but no square has a base-5 digit sum == 2 (mod 4), so there cannot be a square whose base-5 digit sum is 10; thus, 5 is in the sequence.
Programs
-
Python
from itertools import count, islice def A260191_gen(startvalue=3): # generator of terms >= startvalue c = max(startvalue,3) if c<=3: yield 3 for n in count(c+(c&1^1),2): if (~(m:=n-1>>1) & m-1).bit_length()&1: yield n A260191_list = list(islice(A260191_gen(),20)) # Chai Wah Wu, Feb 26 2024
Comments