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.

A091935 Smallest number of 1's in binary representations of primes between 2^n and 2^(n+1).

This page as a plain text file.
%I A091935 #13 Mar 30 2020 20:56:42
%S A091935 1,2,3,2,3,3,3,2,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,4,3,3,3,3,3,3,4,3,3,
%T A091935 3,3,3,3,3,4,3,3,4,3,3,3,3,4,3,3,3,3,3,3,3,4,3,4,3,3,3,3,3,4,3,3,3,3,
%U A091935 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,3
%N A091935 Smallest number of 1's in binary representations of primes between 2^n and 2^(n+1).
%C A091935 a(n) = A000120(A091936(n)).
%C A091935 0 never appears, 1 appears only at 1, 2's appear only for Fermat primes (A019434), 4's appear at A092100. I have found no fives <= 250. - _Robert G. Wilson v_
%H A091935 Robert Israel, <a href="/A091935/b091935.txt">Table of n, a(n) for n = 1..2000</a>
%p A091935 f:= proc(n) local i,j,k;
%p A091935   if isprime(2^n+1) then return 2 fi;
%p A091935   for i from 1 to n-1 do if isprime(2^n+1+2^i) then return 3 fi od;
%p A091935   for i from 1 to n-2 do for j from i+1 to n-1 do if isprime(2^n+2^i+2^j+1) then return 4 fi od od;
%p A091935   error ">=5 found"
%p A091935 end proc:
%p A091935 f(1):= 1:
%p A091935 map(f, [$1..200]); # _Robert Israel_, Mar 30 2020
%t A091935 Run the second Mathematica line of A091936, then Join[{1}, Count[ IntegerDigits[ #, 2], 1] & /@ Table[ f[n], {n, 2, 105}]] (* _Robert G. Wilson v_, Feb 19 2004 *)
%Y A091935 Cf. A091937, A092100.
%K A091935 nonn
%O A091935 1,2
%A A091935 _Reinhard Zumkeller_, Feb 14 2004
%E A091935 More terms from _Robert G. Wilson v_, Feb 18 2004