|
|
A356537
|
|
Numbers k whose binary expansion is a substring of the binary expansion of binomial(k,2).
|
|
0
|
|
|
3, 5, 9, 11, 17, 33, 44, 50, 58, 65, 129, 257, 396, 452, 513, 581, 864, 971, 1025, 1139, 1843, 1881, 1914, 2049, 2541, 2676, 2929, 3130, 4097, 4596, 5254, 6621, 7010, 7111, 8193, 10771, 11140, 12655, 16385, 17090, 19135, 19371, 19580, 20985, 27117, 27845, 32769, 35272, 44278, 46779, 56069
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
All numbers of the form 2^m+1, m>=1, are in the sequence. There are 152 terms below 100 million.
|
|
LINKS
|
|
|
EXAMPLE
|
9 is a term as 9 = 1001_2 and binomial(9,2) = 9!/(2!7!) = 36 = 100100_2 and "100100" contains "1001" as a substring.
|
|
MATHEMATICA
|
kmax=56100; a={}; For[k=1, k<=kmax, k++, If[StringContainsQ[ToString[FromDigits[IntegerDigits[Binomial[k, 2], 2]]], ToString[FromDigits[IntegerDigits[k, 2]]]], AppendTo[a, k]]]; a (* Stefano Spezia, Aug 11 2022 *)
|
|
PROG
|
(PARI) str(k) = Str(fromdigits(binary(k)));
isok(k) = #strsplit(str(binomial(k, 2)), str(k)) > 1; \\ Michel Marcus, Aug 11 2022
(Python)
from math import comb
def ok(n): return n > 0 and str(bin(n)[2:]) in str(bin(comb(n, 2))[2:])
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|