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!)
A175349 a(n) is the smallest positive integer that, when written in binary, contains the binary representations of both the n-th prime and the n-th composite as (possibly overlapping) substrings. 0
4, 6, 40, 39, 43, 108, 113, 79, 368, 466, 500, 149, 361, 344, 377, 53, 59, 988, 542, 2272, 2121, 1103, 2259, 356, 609, 1253, 3304, 3434, 876, 2929, 4078, 387, 393, 2226, 4787, 1687, 630, 2615, 1336, 5561, 2874, 5820, 382, 4033, 12608, 8391, 13506, 14276, 8931, 14662 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
The 7th prime is 17, which is 10001 in binary. The 7th composite is 14, which is 1110 in binary. The smallest positive integer that, when written in binary, contains these binary representations as substrings is 113, which is 1110001 in binary. a(7) = 113, therefore.
MATHEMATICA
comp[n_] := FixedPoint[n + 1 + PrimePi[#] &, n + 1 + PrimePi[n]]; sub[n_, x_] := MemberQ[Partition[IntegerDigits[n, 2], IntegerLength[x, 2], 1],
IntegerDigits[x, 2]]; a[n_] := Block[{c = comp[n], p = Prime[n], k}, k = Max[p, c]; While[! sub[k, p] || ! sub[k, c], k++]; k]; Array[a, 50] (* Giovanni Resta, Jul 02 2018 *)
CROSSREFS
Sequence in context: A103234 A074061 A125081 * A281223 A023644 A319672
KEYWORD
base,nonn
AUTHOR
Leroy Quet, Apr 19 2010
EXTENSIONS
a(9)-a(50) from Giovanni Resta, Jul 02 2018
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 April 16 12:36 EDT 2024. Contains 371711 sequences. (Running on oeis4.)