cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A287117 Numbers with no odd prime binary proper prefixes.

This page as a plain text file.
%I A287117 #18 Aug 17 2025 09:55:21
%S A287117 1,2,3,4,5,8,9,16,17,18,19,32,33,36,37,64,65,66,67,72,73,128,129,130,
%T A287117 131,132,133,144,145,256,257,258,259,260,261,264,265,266,267,288,289,
%U A287117 290,291,512,513,516,517,518,519,520,521,522,523,528,529,530,531,532,533,534,535
%N A287117 Numbers with no odd prime binary proper prefixes.
%H A287117 R. J. Mathar, <a href="/A287117/b287117.txt">Table of n, a(n) for n = 1..2881</a>
%H A287117 Dan Brumleve, <a href="https://math.stackexchange.com/questions/2288648/does-the-sum-of-reciprocals-of-all-prime-prefix-free-numbers-converge">Does the sum of reciprocals of all prime-prefix-free numbers converge?</a>, Math StackExchange, May 20 2017.
%e A287117 131, while prime itself, has proper binary prefixes 65, 32, 16, 8, 4, 2, 1, none of which are odd primes.
%t A287117 Select[Range@535, AllTrue[ Floor[#/2 ^ Range@Log2@#], ! (# > 2 && PrimeQ[#]) &] &] (* _Giovanni Resta_, May 20 2017 *)
%o A287117 (Perl)
%o A287117 sub isp {
%o A287117   my $x = shift;
%o A287117   for my $d (2 .. $x - 1) {
%o A287117     return 0 if $x % $d == 0;
%o A287117   }
%o A287117   return 1;
%o A287117 }
%o A287117 sub rots {
%o A287117   my $x = shift;
%o A287117   my @x;
%o A287117   while ($x > 5) {
%o A287117     $x = int($x / 2);
%o A287117     push @x, $x;
%o A287117   }
%o A287117   @x
%o A287117 }
%o A287117 for my $i (1 .. $ARGV[0] // 200) {
%o A287117   my @np = grep isp($_), rots($i);
%o A287117   push @z, $i if @np == 0;
%o A287117 }
%o A287117 print join(", ", @z) . "\n";
%K A287117 nonn,easy,base
%O A287117 1,2
%A A287117 _Dan Brumleve_, May 20 2017