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!)
A287117 Numbers with no odd prime binary proper prefixes. 1

%I

%S 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 131,132,133,144,145,256,257,258,259,260,261,264,265,266,267,288,289,

%U 290,291,512,513,516,517,518,519,520,521,522,523,528,529,530,531,532,533,534,535

%N Numbers with no odd prime binary proper prefixes.

%H 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 131, while prime itself, has proper binary prefixes 65, 32, 16, 8, 4, 2, 1, none of which are odd primes.

%t Select[Range@535, AllTrue[ Floor[#/2 ^ Range@Log2@#], ! (# > 2 && PrimeQ[#]) &] &] (* _Giovanni Resta_, May 20 2017 *)

%o (perl)

%o sub isp {

%o my $x = shift;

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

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

%o }

%o return 1;

%o }

%o sub rots {

%o my $x = shift;

%o my @x;

%o while ($x > 5) {

%o $x = int($x / 2);

%o push @x, $x;

%o }

%o @x

%o }

%o for my $i (1 .. $ARGV[0] // 200) {

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

%o push @z, $i if @np == 0;

%o }

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

%K nonn,easy,base

%O 1,2

%A _Dan Brumleve_, May 20 2017

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 October 17 21:17 EDT 2021. Contains 348065 sequences. (Running on oeis4.)