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!)
A163400 Number of bits in binary expansion of n-th nonprime. 3
1, 1, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Here n-th nonprime=A141468(n).
For n > 2, a(n) = A029837(n) or A029837(n)+1.
LINKS
EXAMPLE
a(1)=1(0=nonprime(1) written in base 2 and 10); a(2)=1(1=nonprime(2) written in base 2 and 10); a(3)=3(100=nonprime(3) written in base 2 where 4=nonprime(3) written in base 10).
MAPLE
A141468 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if not isprime(a) then return a; fi; od: fi; end: A070939 := proc(n) max(1, ilog2(n)+1) ; end: A163400 := proc(n) A070939(A141468(n)) ; end: seq(A163400(n), n=1..120) ; # R. J. Mathar, Oct 10 2009
MATHEMATICA
Prepend[Flatten@ Array[If[PrimeQ[ # ], {}, IntegerLength[ #, 2]] &, 100000], 1] (* Jasper Mulder (jasper.mulder(AT)planet.nl), Jun 03 2010 *)
CROSSREFS
Sequence in context: A298199 A282623 A090589 * A090972 A318241 A181742
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
Edited by Charles R Greathouse IV, Mar 22 2010
STATUS
approved

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 24 13:07 EDT 2024. Contains 371945 sequences. (Running on oeis4.)