cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A075058 Lexicographically earliest infinite sequence of distinct positive numbers with the property that every positive integer is a sum of distinct terms (see algorithm below).

This page as a plain text file.
%I A075058 #33 Jun 07 2023 04:37:00
%S A075058 1,2,3,7,13,23,47,97,193,383,769,1531,3067,6133,12269,24533,49069,
%T A075058 98129,196247,392503,785017,1570007,3140041,6280067,12560147,25120289,
%U A075058 50240587,100481167,200962327,401924639,803849303,1607698583,3215397193,6430794373
%N A075058 Lexicographically earliest infinite sequence of distinct positive numbers with the property that every positive integer is a sum of distinct terms (see algorithm below).
%C A075058 This sequence starts with a(0)=1, subsequent terms a(n) for n > 0 being obtained by selecting the greatest prime <= 1 + Sum_{i=0..n-1} a(i). This ensures that the sequence has the required property because Sum_{i=0..n-1} a(i) >= a(n) - 1, for all n >= 0 and a(0)=1, is a necessary and sufficient condition for it to hold.
%H A075058 Charles R Greathouse IV, <a href="/A075058/b075058.txt">Table of n, a(n) for n = 0..1000</a>
%H A075058 Wikipedia, <a href="http://en.wikipedia.org/wiki/Complete_sequence">"Complete" sequence</a>. [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]
%F A075058 a(n) = (greatest prime) <= 1 + Sum_{i=0..n-1} a(i).
%F A075058 a(n) ~ k*2^n, with k roughly 0.748643. - _Charles R Greathouse IV_, Apr 05 2013
%e A075058 Given that the first 7 terms of the sequence are 1,2,...,23,47 then a(8)=(greatest prime) <= (1+2+...+23,47) + 1 = 97, hence a(8)=97.
%t A075058 prevprime[n_Integer] := (j=n; While[!PrimeQ[j], j--]; j) aprime[0]=1; aprime[n_Integer] := (aprime[n] = prevprime[Sum[aprime[m], {m, 0, n - 1}] + 1]); Table[aprime[p], {p, 0, 50}]
%t A075058 a[0] = 1; a[n_] := a[n] = NextPrime[Sum[a[k], {k, 0, n-1}]+2, -1]; Table[a[n], {n, 0, 33}] (* _Jean-François Alcover_, Sep 30 2013 *)
%o A075058 (PARI) print1(s=1);for(n=1,20,k=precprime(s+1);print1(", "k);s+=k) \\ _Charles R Greathouse IV_, Apr 05 2013
%Y A075058 Cf. A068524, A007924, A066352, A200947.
%K A075058 nonn
%O A075058 0,2
%A A075058 _Amarnath Murthy_, Sep 07 2002
%E A075058 Entry revised by _Frank M Jackson_, Dec 03 2011
%E A075058 Edited by _N. J. A. Sloane_, May 20 2023