login
A202618
a(n) is the smallest integer that is the sum of n distinct terms of A075058.
0
0, 1, 4, 6, 19, 42, 89, 96, 289, 672, 1441, 2972, 6039, 12172, 24441, 48974, 98043, 196172, 392419, 784922, 1569939, 3139946, 6279987, 12560054, 25120201
OFFSET
0,3
COMMENTS
Any nonnegative integer can be written as a sum of distinct terms of A075058. a(n) is the smallest integer that is the sum of n distinct terms of A075058 in the same way that A066352 gives a Pillai sequence for the sequence comprising 1 followed by all the primes.
LINKS
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
Find the smallest m such that binary(A201997(m)) x {1,1,1,...} = n, where x is the inner product, {1,1,1,1,...} is an infinite binary vector of 1's and binary(A201997(m)) a binary vector with infinite trailing zeros both in ascending powers of 2. Then a(n) = binary(m) x A075058, where x is the inner product and the binary vector is in ascending powers of 2 with infinite trailing zeros.
EXAMPLE
For n=5, the binary vector at A201997(54) is the smallest binary vector containing 5 1's and when applied to A075058 selects the integer 42. Consequently because 42=23+13+3+2+1 and 1,2,3,13,23 are all terms of the complete sequence A075058, a(5)=42.
MATHEMATICA
prevprime[n_Integer] := (j=n; If[n==1, 1, While[!PrimeQ[j], j--]; j]); aprime[n_Integer] := (aprime[n]=prevprime[Sum[aprime[m], {m, 0, n - 1}]+1]); gentable[n_Integer] := (m=n; ptable={0}; While[m!=0, (i=0; While[aprime[i]<=m && ptable[[i+1]]!=1, (AppendTo[ptable, 0]; i++)]; ptable[[i]] = 1; m=m-aprime[i - 1])]; ptable); decimal[n_Integer] := (gentable[n]; Sum[2^(k-1)*ptable[[k]], {k, 1, Length[ptable]}]); ones[n_Integer] :=(gentable[n]; Sum[ptable[[k]], {k, 1, Length[ptable]}]); changeones[n_Integer] := (p = 0; While[ones[p] < n, p++]; p); aprime[0]=1; Table[changeones[r], {r, 0, 20}]
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Frank M Jackson, Dec 21 2011
EXTENSIONS
Edited by N. J. A. Sloane, May 20 2023
STATUS
approved