%I #35 Jun 12 2022 12:00:55
%S 1,3,8,22,66,222,862,3838,19542,111894,712282,4987672,38102844,
%T 315339898,2810523166,26838510154,273374835624,2958608945772,
%U 33903161435148,410085034127000,5221364826476796,69804505809732988
%N Boustrophedon transform of 1 & primes: 1,2,3,5,7,...
%H Reinhard Zumkeller, <a href="/A000732/b000732.txt">Table of n, a(n) for n = 0..400</a>
%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/SeidelTransform">An old operation on sequences: the Seidel transform</a>.
%H J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A (1996) 44-54 (<a href="http://neilsloane.com/doc/bous.txt">Abstract</a>, <a href="http://neilsloane.com/doc/bous.pdf">pdf</a>, <a href="http://neilsloane.com/doc/bous.ps">ps</a>).
%H N. J. A. Sloane, <a href="/transforms.txt">Transforms</a>.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Boustrophedon_transform">Boustrophedon transform</a>.
%H <a href="/index/Bo#boustrophedon">Index entries for sequences related to boustrophedon transform</a>
%F a(n) = Sum_{k=0..n} A109449(n,k)*A008578(k+1). - _Reinhard Zumkeller_, Nov 04 2013
%F E.g.f.: (sec(x) + tan(x))*(1 + Sum_{k>=1} prime(k)*x^k/k!). - _Ilya Gutkovskiy_, Apr 23 2019
%t t[n_, 0] := If[n==0, 1, Prime[n]]; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, 30, 0] (* _Jean-François Alcover_, Feb 12 2016 *)
%o (Haskell)
%o a000732 n = sum $ zipWith (*) (a109449_row n) a008578_list
%o (Python)
%o from itertools import accumulate, count, islice
%o from sympy import prime
%o def A000732_gen(): # generator of terms
%o yield 1
%o blist = (1,)
%o for i in count(1):
%o yield (blist := tuple(accumulate(reversed(blist),initial=prime(i))))[-1]
%o A000732_list = list(islice(A000732_gen(),40)) # _Chai Wah Wu_, Jun 12 2022
%Y Cf. A000747, A230953, A230954, A230955.
%K nonn,easy
%O 0,2
%A _N. J. A. Sloane_ and _Simon Plouffe_
|