|
|
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
(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, 17A 44-54 1996 (Abstract, pdf, ps).
|
|
FORMULA
|
|
|
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]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|