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!)
A139122 Primes whose binary representation shows the distribution of prime numbers up to some prime minus 1, using "0" for primes and "1" for nonprime numbers. 5
2, 37, 599, 153437, 628479869 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Primes in A139102.
a(6) > 10^14632 if it exists (no further primes in first 5000 terms of A139102). - Michael S. Branicky, Jan 25 2022
LINKS
MATHEMATICA
Select[Table[ sum = 0; For[i = 1, i <= Prime[n] - 1 , i++, sum = sum*2; If[! PrimeQ[i], sum++]]; sum, {n, 1, 1000}], PrimeQ[#] &] (* Robert Price, Apr 03 2019 *)
Module[{nn=500, p, x}, p=Table[If[PrimeQ[n], 0, 1], {n, nn}]; x=SequencePosition[p, {1, 0}][[All, 1]]; Join[{2}, Select[Table[FromDigits[Take[p, k], 2], {k, x}], PrimeQ]]] (* Harvey P. Dale, Jun 15 2022 *)
PROG
(PARI) f(n) = fromdigits(vector(prime(n)-1, k, !isprime(k)), 2); \\ A139102
lista(nn) = for (n=1, nn, if (isprime(p=f(n)), print1(p, ", ")));
(Python) # uses agen() in A139102
from sympy import isprime
print(list(islice(filter(isprime, agen()), 5))) # Michael S. Branicky, Jan 25 2022
CROSSREFS
Sequence in context: A300926 A337306 A216539 * A123216 A307318 A058245
KEYWORD
nonn,base,more
AUTHOR
Omar E. Pol, Apr 11 2008
EXTENSIONS
a(5) from Robert Price, Apr 03 2019
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 23 02:41 EDT 2024. Contains 371906 sequences. (Running on oeis4.)