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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A205598 The number n written using a minimizing algorithm in the base where the values of the places are 1 and primes. 0
 0, 1, 10, 11, 101, 110, 111, 1010, 1011, 1101, 1110, 1111, 10110, 10111, 11010, 11011, 11101, 11110, 11111, 101011, 101101, 101110, 101111, 110110, 110111, 111010, 111011, 111101, 111110, 111111, 1011110, 1011111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS Any nonnegative number can be written as a sum of distinct primes + e, where e is 0 or 1 (see A007924, which uses a greedy algorithm for writing n). However in this sequence a(n) is generated by using a minimizing algorithm that gives the smallest binary vector for select members from the sequence Q = (1 union primes) that when summed gives n. Without the minimizing condition there is ambiguity -- for example, 8 = 7+1 = 5+3 = 5+2+1 has three representations. LINKS Table of n, a(n) for n=0..31. Wikipedia, "Complete" sequence. [Wikipedia calls a sequence "complete" (sic) if every positive integer is a sum of distinct terms. This name is extremely misleading and should be avoided. - N. J. A. Sloane, May 20 2023] FORMULA Let Q be the ordered sequence of (1 union primes), then a(n) x Q = n, where x is the inner product and the binary vector a(n) is in ascending powers of 2 with infinite trailing zeros. EXAMPLE 8 = 7+1 = 5+3 = 5+2+1, so a(8) = 1011. MATHEMATICA aprime[n_] := If[n==0, 1, Prime[n]]; seqtable[l_] := (stable=Table[aprime[j], {j, 0, l}]; stable); inttable[p_] := (itable=Reverse[IntegerDigits[p, 2]]; itable); h=1; otable={0}; ttable={}; While[h<100, (inttable[h]; seqtable[Length[itable]-1]; test=itable.stable; If[!MemberQ[ttable, test], AppendTo[otable, h], Null]; AppendTo[ttable, test]; h++)]; IntegerString[otable, 2] CROSSREFS Cf. A007924, A185101, A200947. Sequence in context: A077813 A203075 A104326 * A350312 A368804 A037090 Adjacent sequences: A205595 A205596 A205597 * A205599 A205600 A205601 KEYWORD nonn AUTHOR Frank M Jackson, Feb 08 2012 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.

Last modified April 22 05:00 EDT 2024. Contains 371887 sequences. (Running on oeis4.)
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://oeis.org/A205598", "fetch_time": 1713779347000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2024-18/segments/1712296818105.48/warc/CC-MAIN-20240422082202-20240422112202-00161.warc.gz", "warc_record_offset": 375770256, "warc_record_length": 4581, "token_count": 781, "char_count": 2487, "score": 3.96875, "int_score": 4, "crawl": "CC-MAIN-2024-18", "snapshot_type": "latest", "language": "en", "language_score": 0.7060964703559875, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00011-of-00064.parquet"}