login
a(n) = floor(2^n*Pi).
10

%I #21 Sep 08 2022 08:45:05

%S 1,3,6,12,25,50,100,201,402,804,1608,3216,6433,12867,25735,51471,

%T 102943,205887,411774,823549,1647099,3294198,6588397,13176794,

%U 26353589,52707178,105414357,210828714,421657428,843314856,1686629713

%N a(n) = floor(2^n*Pi).

%C In other words, take the binary expansion of Pi, drop the decimal point and interpret the first n+2 bits as an integer.

%C Dubickas proves that infinitely many terms of this sequence are divisible by 2 or 3 (and hence infinitely many composites). - _Charles R Greathouse IV_, Feb 04 2016

%H G. C. Greubel, <a href="/A068425/b068425.txt">Table of n, a(n) for n = -1..3300</a>

%H Artūras Dubickas, <a href="http://dx.doi.org/10.1007/s00605-008-0042-6">Prime and composite integers close to powers of a number</a>, Monatsh. Math. 158:3 (2009), pp. 271-284.

%e The binary expansion of Pi (A004601) begins 1, 1. 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, ... so we get 1, 3, 6, 12, 25, 50, ...

%t Table[Floor[2^n*Pi], {n, -1, 100}] (* _G. C. Greubel_, Mar 23 2018 *)

%o (PARI) a(n)=floor(Pi<<n) \\ _Charles R Greathouse IV_, Feb 04 2016

%o (Magma) R:= RealField(); [Floor(2^n*Pi(R)): n in [-1..100]]; // _G. C. Greubel_, Mar 23 2018

%Y Cf. A004601, A117721 (primes).

%K easy,nonn

%O -1,2

%A _Benoit Cloitre_, Mar 09 2002

%E Revised by _N. J. A. Sloane_ (and offset changed), Jul 23 2006