login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A038102 Numbers k such that k is a substring of its base-2 representation. 12
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1100, 1101, 10000, 10001, 10011, 10100, 10101, 10111, 11000, 11001, 11100, 11101, 100000, 100001, 101000, 101010, 101100, 101101, 101111, 110000, 110001, 110101, 111100, 111101, 1000000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

COMMENTS

The number of terms < 10^k: 1, 2, 4, 8, 12, 22, 34, 48, 61, 78, 90, 114, 140, 191, 233, 283, 337, 383, 429, 486, 542, 636, 718, 789, 852, 925, 1003, 1082, 1167. - Robert G. Wilson v, Jun 30 2014

LINKS

Robert G. Wilson v, Table of n, a(n) for n = 1..1167 (first 1000 terms from Giovanni Resta)

Robert G. Wilson v, Interpret a(n) as a base 2 number and convert it to a decimal number, n, a(n) for n = 1..1167

EXAMPLE

101000_10 = 1100010{101000}1000_2.

MATHEMATICA

Select[FromDigits /@ IntegerDigits[Range[2^15]-1, 2], StringPosition[StringJoin @@ (ToString /@ IntegerDigits[#, 2]), ToString@#] != {} &] (* terms < 10^15, Giovanni Resta, Apr 30 2013 *)

f[n_] := Block[{a = FromDigits@ IntegerDigits[n, 2]}, If[ StringPosition[ ToString@ FromDigits@ IntegerDigits[ a, 2], ToString@ a] != {}, a, 0]]; k = 0; lst = {}; While[k < 65, AppendTo[lst, f@k]; lst = Union@ lst; k++]; lst (* Robert G. Wilson v, Jun 29 2014 *)

PROG

(PARI) {for(vv=0, 200, bvv=binary(vv);

mm=length(bvv); texp=0; btod=0;

forstep(i=mm, 1, -1, btod=btod+bvv[i]*10^texp; texp++);

bigb=binary(btod); lbb=length(bigb); swsq=1;

for(k=0, lbb - mm , for(j=1, mm, if(bvv[j]!=bigb[j+k], swsq=0));

if(swsq==1, print1(btod, ", "); break, swsq=1)))}

\\\ Douglas Latimer, Apr 29 2013

CROSSREFS

Cf. A038103, A038104, A038105, A038106, A228050, A228051, A228052, A227549.

Sequence in context: A136809 A136813 A225237 * A181891 A115846 A066334

Adjacent sequences:  A038099 A038100 A038101 * A038103 A038104 A038105

KEYWORD

nonn,base,easy

AUTHOR

Patrick De Geest, Feb 15 1999

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 21 20:16 EDT 2019. Contains 321382 sequences. (Running on oeis4.)