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.

A168157 Number of 0's in the matrix whose lines are the binary expansion of the first n primes.

This page as a plain text file.
%I A168157 #3 Jul 14 2012 11:32:32
%S A168157 1,1,4,4,9,10,19,21,22,23,23,37,40,42,43,45,46,47,69,72,76,78,81,84,
%T A168157 88,91,93,95,97,100,100,136,141,145,149,152,155,159,162,165,168,171,
%U A168157 172,177,181,184,187,188,191,194,197,198,201,202,263,268,273,277,282,287
%N A168157 Number of 0's in the matrix whose lines are the binary expansion of the first n primes.
%C A168157 The matrix is to be taken of minimal size, i.e., have n lines and the number of columns needed to write the n-th prime in the last line, A035100(n). Otherwise said, there is no zero column except for n=1 (prime(1) = 2 = 10[2] in binary).
%C A168157 The number of zeros in the last line of the matrix is given by A035103(n).
%C A168157 One has a(n)=a(n-1) iff n = A059305(k) for some k, i.e. prime(n) is a Mersenne prime A000668(k) = A000225(A000043(k)).
%C A168157 If prime(n)=2^2^k+1 is a Fermat prime (A019434), n>2, then one has a(n)=a(n-1)+n-1+2^k-1.
%C A168157 More generally, the "big jumps" a(n+1) > a(n)+n happen whenever a column is added, i.e. when prime(n) = A014234(k) <=> prime(n+1) = A104080(k) for some k,n>1.
%F A168157 a(n)=n*A035100(n)-A095375(n).
%e A168157 a(4)=4 is the number of zeros in the matrix [010] /* = 2 in binary */ [011] /* = 3 in binary */ [101] /* = 5 in binary */ [111] /* = 7 in binary */
%o A168157 (PARI) A168157(n)=n*#binary(prime(n))-sum(i=1,n,norml2(binary(prime(i))))
%K A168157 base,nonn
%O A168157 1,3
%A A168157 _M. F. Hasler_, Nov 21 2009