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.

A201997 a(n) is the decimal value of the binary vector used to select terms of A075058 whose sum is n.

This page as a plain text file.
%I A201997 #29 Jun 22 2023 23:34:43
%S A201997 0,1,2,4,5,6,7,8,9,10,12,13,14,16,17,18,20,21,22,23,24,25,26,32,33,34,
%T A201997 36,37,38,39,40,41,42,44,45,46,48,49,50,52,53,54,55,56,57,58,60,64,65,
%U A201997 66,68,69,70,71,72,73,74,76,77,78,80,81,82,84,85,86,87
%N A201997 a(n) is the decimal value of the binary vector used to select terms of A075058 whose sum is n.
%H A201997 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 A201997 Binary(a(n)) x A075058 = n, where x is the inner product and the binary vector is in ascending powers of 2 with infinite trailing zeros.
%e A201997 For n=22, the binary vector when applied to A075058 is {0,1,0,1,1,0,...}, consequently 2+7+13=22. The decimal value of the binary vector (in ascending powers of 2) is 26, so a(22)=26.
%t A201997 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]}]); aprime[0]=1; Table[decimal[r], {r,0,100}]
%Y A201997 Cf. A007924, A066352, A200947, A075058.
%K A201997 nonn,base,more
%O A201997 0,3
%A A201997 _Frank M Jackson_, Dec 07 2011
%E A201997 Edited by _N. J. A. Sloane_, May 20 2023