login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A066854 a(n) = Sum_{k=1..8} 2^(8-k) * c(16n+2k+1), where c(j) is 1 if j is composite, 0 if j is prime. 1

%I #13 Dec 18 2019 00:55:47

%S 18,89,165,179,77,110,146,253,103,155,91,60,159,125,44,246,217,167,

%T 191,75,246,242,221,181,186,239,60,214,233,125,215,91,231,251,123,102,

%U 246,205,167,222,91,62,183,123,189,219,93,174,191,123,231,147,223,165,250

%N a(n) = Sum_{k=1..8} 2^(8-k) * c(16n+2k+1), where c(j) is 1 if j is composite, 0 if j is prime.

%C Related to a computer implementation of the sieve of Eratosthenes: Each positive odd number is represented by a bit: 0 if it is prime, 1 if it is composite. The term a(n) contains the 8 bits corresponding to the odd numbers from 16n+3 to 16n+17.

%H Cino Hilliard, <a href="/A066854/a066854.txt">Program</a>

%e In binary, a(0)=00010010, which means that among the odd numbers 3,5,7,9,11,13,15,17, only 9 and 15 are composite.

%t a[n_] := Sum[2^(8-k)*If[PrimeQ[16n+2k+1], 0, 1], {k, 1, 8}]

%K nonn

%O 0,1

%A _Cino Hilliard_, Jan 21 2002

%E Edited by _Dean Hickerson_, Feb 15 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)