|
|
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
|
|
|
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
|
|
|
KEYWORD
|
nonn,easy,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|