login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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:])
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Aug 11 2022
CROSSREFS
Sequence in context: A120811 A340287 A123069 * A270836 A100456 A059819
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Aug 11 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 13:50 EDT 2024. Contains 375469 sequences. (Running on oeis4.)