|
|
A000747
|
|
Boustrophedon transform of primes.
|
|
8
|
|
|
2, 5, 13, 35, 103, 345, 1325, 5911, 30067, 172237, 1096319, 7677155, 58648421, 485377457, 4326008691, 41310343279, 420783672791, 4553946567241, 52184383350787, 631210595896453, 8036822912123765, 107444407853010597, 1504827158220643895, 22034062627659931905
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
LINKS
|
J. Millar, N. J. A. Sloane, and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory Ser. A, 76(1) (1996), 44-54 (Abstract, pdf, ps).
|
|
FORMULA
|
E.g.f.: (sec(x) + tan(x)) * Sum_{k>=0} prime(k+1)*x^k/k!. - Ilya Gutkovskiy, Jun 26 2018
|
|
MATHEMATICA
|
t[n_, 0] := Prime[n+1]; 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 *)
|
|
PROG
|
(Haskell)
a000747 n = sum $ zipWith (*) (a109449_row n) a000040_list
(Python)
from itertools import islice, count, accumulate
from sympy import prime
def A000747_gen(): # generator of terms
blist = tuple()
for i in count(1):
yield (blist := tuple(accumulate(reversed(blist), initial=prime(i))))[-1]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|