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.

Showing 1-1 of 1 results.

A202618 a(n) is the smallest integer that is the sum of n distinct terms of A075058.

Original entry on oeis.org

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

Views

Author

Frank M Jackson, Dec 21 2011

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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}]

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.

Extensions

Edited by N. J. A. Sloane, May 20 2023
Showing 1-1 of 1 results.