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.

A200947 Sequence A007924 expressed in decimal.

This page as a plain text file.
%I A200947 #29 Jun 12 2023 09:47:22
%S A200947 0,1,2,4,5,8,9,16,17,18,20,32,33,64,65,66,68,128,129,256,257,258,260,
%T A200947 512,513,514,516,517,520,1024,1025,2048,2049,2050,2052,2053,2056,4096,
%U A200947 4097,4098,4100,8192,8193,16384,16385,16386,16388,32768,32769,32770
%N A200947 Sequence A007924 expressed in decimal.
%H A200947 Alois P. Heinz, <a href="/A200947/b200947.txt">Table of n, a(n) for n = 0..10000</a>
%H A200947 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 A200947 a(n) = decimal(A007924(n)).
%F A200947 a(n) mod 2 = A121559(n) for n>=1. - _Alois P. Heinz_, Jun 12 2023
%e A200947 8=7+1, hence A007924(8)=10001, so a(8)=17.
%p A200947 a:= proc(n) option remember; local m, p, r; m:=n; r:=0;
%p A200947       while m>0 do
%p A200947         if m=1 then r:=r+1; break fi;
%p A200947         p:= prevprime(m+1); m:= m-p;
%p A200947         r:= r+2^numtheory[pi](p)
%p A200947       od; r
%p A200947     end:
%p A200947 seq(a(n), n=0..52);  # _Alois P. Heinz_, Jun 12 2023
%t A200947 cprime[n_Integer] := If[n==0, 1, Prime[n]]; gentable[n_Integer] := (m=n; ptable={}; While[m != 0, (i = 0; While[cprime[i] <= m, i++]; j=0; While[j<i, AppendTo[ptable, 0]; j++]; ptable[[i]]=1; m=m-cprime[i-1])]; ptable); decimal[n_Integer] := (gentable[n]; Sum[2^(k - 1)*ptable[[k]], {k, 1, Length[ptable]}]); Table[decimal[n], {n, 0, 100}]
%Y A200947 Cf. A003714, A007895, A007924, A027941, A066352, A121559, A345297.
%K A200947 nonn
%O A200947 0,3
%A A200947 _Frank M Jackson_, Nov 24 2011
%E A200947 Edited by _N. J. A. Sloane_, May 20 2023