login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287638 Odd primes with no other odd primes as prefixes in binary. 1
3, 5, 17, 19, 37, 67, 73, 131, 257, 521, 523, 577, 1033, 1039, 1061, 1063, 1069, 1153, 1163, 2053, 2069, 2081, 2083, 2089, 2113, 2129, 2131, 2137, 2141, 2143, 2333, 4099, 4111, 4129, 4153, 4177, 4229, 4231, 4241, 4243, 4261, 4271, 4273, 4637, 4639, 4643, 4649, 4651, 4657, 4663 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

The sum of the reciprocals converges by the Kraft-McMillan inequality.

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000

Dan Brumleve, Does the sum of reciprocals of all prime-prefix-free numbers converge?, Math StackExchange, May 20 2017.

Wikipedia, Kraft-McMillan inequality

EXAMPLE

4663 is an odd prime with proper binary prefixes 2331, 1165, 582, 291, 145, 72, 36, 18, 9, 4, 2, 1, and none of these are odd primes.

PROG

(perl)

sub isp {

  my $x = shift;

  return 0 if $x < 2;

  for my $d (2 .. $x - 1) {

    return 0 if $x % $d == 0;

  }

  return 1;

}

sub rots {

  my $x = shift;

  my @x;

  while ($x > 5) {

    $x = int($x / 2);

    push @x, $x;

  }

  @x

}

for my $i (1 .. $ARGV[0] // 8000) {

  my @np = grep isp($_), rots($i);

  push @z, $i if isp($i) && $i % 2 && @np == 0;

}

print join(", ", @z) . "\n";

(PARI) is(n)=if(!isprime(n) || n<3, return(0)); while(n>3, if(isprime(n>>=1), return(n==2))); 1 \\ Charles R Greathouse IV, Jun 12 2017

CROSSREFS

Odd prime elements of A287117.

Sequence in context: A045415 A045416 A038891 * A119768 A020592 A295387

Adjacent sequences:  A287635 A287636 A287637 * A287639 A287640 A287641

KEYWORD

nonn,easy,base

AUTHOR

Dan Brumleve, May 28 2017

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 August 7 09:09 EDT 2020. Contains 336274 sequences. (Running on oeis4.)