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.

A309561 Total sum of prime parts in all compositions of n.

This page as a plain text file.
%I A309561 #15 Jan 06 2021 12:31:32
%S A309561 0,0,2,7,16,44,102,244,554,1247,2772,6111,13334,28916,62302,133557,
%T A309561 285020,605869,1283362,2710008,5706546,11986171,25118500,52529339,
%U A309561 109643310,228455907,475250388,987177924,2047710144,4242128909,8777675002,18142184432,37458037658
%N A309561 Total sum of prime parts in all compositions of n.
%H A309561 Alois P. Heinz, <a href="/A309561/b309561.txt">Table of n, a(n) for n = 0..3312</a>
%F A309561 G.f.: Sum_{k>=1} prime(k)*x^prime(k)*(1-x)^2/(1-2*x)^2.
%F A309561 a(n) ~ c * 2^n * n, where c = 0.27326606442562679135064648817419092073886899135... - _Vaclav Kotesovec_, Aug 18 2019
%e A309561 a(4) = 16: 1111, (2)11, 1(2)1, 11(2), (2)(2), (3)1, 1(3), 4.
%p A309561 a:= proc(n) option remember; add(a(n-j) +j*
%p A309561       `if`(isprime(j), ceil(2^(n-j-1)), 0), j=1..n)
%p A309561     end:
%p A309561 seq(a(n), n=0..33);
%t A309561 a[n_] := a[n] = Sum[a[n-j]+j*If[PrimeQ[j], Ceiling[2^(n-j-1)], 0], {j, 1, n}];
%t A309561 a /@ Range[0, 33] (* _Jean-François Alcover_, Jan 03 2021, after _Alois P. Heinz_ *)
%Y A309561 Cf. A000040, A001787, A073118, A102291, A336579.
%K A309561 nonn
%O A309561 0,3
%A A309561 _Alois P. Heinz_, Aug 07 2019