login
A230954
Boustrophedon transform of composite numbers.
7
4, 10, 24, 59, 162, 526, 2016, 8978, 45696, 261760, 1666308, 11668652, 89141580, 737740174, 6575238599, 62788901290, 639562492327, 6921688171153, 79316703841369, 959397056891093, 12215422719238138, 163308172248420391, 2287234651735371577
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, 17A 44-54 1996 (Abstract, pdf, ps).
FORMULA
a(n) = sum(A109449(n,k)*A002808(k+1): k=0..n).
MATHEMATICA
cc = Select[Range[max = 40], CompositeQ]; t[n_, 0] := cc[[n+1]]; t[n_, k_] := t[n, k] = t[n, k-1] + t[n-1, n-k]; a[n_] := t[n, n]; Array[a, cc // Length, 0] (* Jean-François Alcover, Feb 12 2016 *)
PROG
(Haskell)
a230954 n = sum $ zipWith (*) (a109449_row n) a002808_list
(Python)
from itertools import accumulate, count, islice
from sympy import composite
def A230954_gen(): # generator of terms
blist = tuple()
for i in count(1):
yield (blist := tuple(accumulate(reversed(blist), initial=composite(i))))[-1]
A230954_list = list(islice(A230954_gen(), 40)) # Chai Wah Wu, Jun 12 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 03 2013
STATUS
approved