OFFSET
1,2
COMMENTS
Starting at n = 2^x (x > 2) you get: 3 entries of 2^floor(log_2(x)-2)+2, then 2 entries of each subsequent integer until you reach the halfway point between 2^x and 2^(x+1), then 1 entry of each subsequent integer until you reach 2^(x+1)-1. Proved (see link). - David Consiglio, Jr., Jan 08 2015
LINKS
David Consiglio, Jr., Table of n, a(n) for n = 1..1024
David Consiglio, Jr., Python that quickly provides weights given the proof by Schoenfield
David Consiglio, Jr., Proof for sequence generation - Schoenfield and Consiglio
FORMULA
After the 8th term:
If 2^x <= n <= (2^x)+2 then a(n) = 2 ^ floor(base2log(x)-2)+2 (see A052548)
If (2^x)+2 < n and n+1 < (2^x + 2^x+1)/2 then a(n) and a(n+1) = a(n-1)+1
If (2^x+2^x+1)/2 <= n then a(n) = a(n-1)+1. - David Consiglio, Jr., Jan 08 2015
EXAMPLE
a(20)=7 because every number from 1 to 20 can be obtained from {1,2,4,6,7}.
CROSSREFS
KEYWORD
nonn
AUTHOR
Sen-Peng Eu, Apr 27 2001
EXTENSIONS
a(32)-a(1024) from David Consiglio, Jr., Jan 08 2015
STATUS
approved