Original entry on oeis.org
0, 1, 0, 2, 0, 0, 4, 1, 0, 0, 8, 1, 0, 0, 0, 16, 4, 1, 0, 0, 0, 32, 6, 1, 0, 0, 0, 0, 64, 14, 3, 1, 0, 0, 0, 0, 128, 27, 6, 1, 0, 0, 0, 0, 0, 256, 57, 13, 3, 1, 0, 0, 0, 0, 0, 512, 110, 24, 5, 1, 0, 0, 0, 0, 0, 0, 1024, 227, 53, 13, 3, 1, 0, 0, 0, 0, 0, 0, 2048, 447, 101, 23, 5, 1, 0, 0, 0, 0, 0, 0
Offset: 1
Table begins:
0,
1,0,
2,0,0,
4,1,0,0,
8,1,0,0,0,
16,4,1,0,0,0,
32,6,1,0,0,0,0,
A155038
Triangle read by rows: T(n,k) is the number of compositions of n with first part k.
Original entry on oeis.org
1, 1, 1, 2, 1, 1, 4, 2, 1, 1, 8, 4, 2, 1, 1, 16, 8, 4, 2, 1, 1, 32, 16, 8, 4, 2, 1, 1, 64, 32, 16, 8, 4, 2, 1, 1, 128, 64, 32, 16, 8, 4, 2, 1, 1, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1, 1, 2048, 1024, 512
Offset: 1
T(5,2) = 4 because the compositions of 5 with first part 2 are: [2,3], [2,2,1], [2,1,2], and [2,1,1,1]. - _Emeric Deutsch_, Jan 12 2018
Table begins:
1,
1, 1,
2, 1, 1,
4, 2, 1, 1,
8, 4, 2, 1, 1,
16, 8, 4, 2, 1, 1,
32, 16, 8, 4, 2, 1, 1,
64, 32, 16, 8, 4, 2, 1, 1,
Production matrix begins:
1, 1
1, 0, 1
1, 0, 0, 1
1, 0, 0, 0, 1
1, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 0, 1
1, 0, 0, 0, 0, 0, 0, 0, 1
... - _Philippe Deléham_, Oct 04 2014
- Reinhard Zumkeller, Rows n = 1..100 of table, flattened
- Jean-Luc Baril, Javier F. González, and José L. Ramírez, Last symbol distribution in pattern avoiding Catalan words, Univ. Bourgogne (France, 2022).
- Emeric Deutsch, L. Ferrari and S. Rinaldi, Production Matrices and Riordan arrays, arXiv:math/0702638 [math.CO], 2007.
-
a155038 n k = a155038_tabl !! (n-1) !! (k-1)
a155038_row n = a155038_tabl !! (n-1)
a155038_tabl = iterate
(\row -> zipWith (+) (row ++ [0]) (init row ++ [0,1])) [1]
-- Reinhard Zumkeller, Aug 08 2013
-
T := proc(n, k) if k = n then 1 elif k < n then 2^(n-k-1) else 0 end if end proc: for n to 13 do seq(T(n, k), k = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jan 12 2018
G:= (1-2*x+t*x^2)/((1-2*x)*(1-t*x)): Gser := simplify(series(G, x = 0, 15)): for n to 14 do P[n] := coeff(Gser, x, n) end do: for n to 14 do seq(coeff(P[n], t, j), j = 1 .. n) end do; # yields sequence in triangular form - Emeric Deutsch, Jan 19 2018
-
nn = 15; a = 1/(1 - y x); f[list_] := Select[list, # > 0 &];Map[f, CoefficientList[Series[ a/(1 - x/(1 - x)), {x, 0, nn}], {x, y}]] // Flatten (* Geoffrey Critzer, Feb 15 2012 *)
A101173
First differences of sequence defined in A101172. Also, the Mobius transform of that sequence.
Original entry on oeis.org
1, 1, 2, 3, 7, 11, 25, 46, 94, 182, 372, 727, 1471, 2916, 5849, 11657, 23364, 46620, 93348, 186503, 373172, 745998, 1492369, 2983948, 5968679, 11935893, 23873162, 47743475, 95489895, 190973738, 381953528, 763895349, 1527802031, 3055581071, 6111185475
Offset: 1
Mark Hudson (mrmarkhudson(AT)hotmail.com), Dec 03 2004
A307856
a(1) = a(2) = 1; a(n) = Sum_{1 < k < n, k not dividing n} a(k).
Original entry on oeis.org
1, 1, 1, 1, 3, 4, 10, 18, 37, 71, 146, 285, 577, 1143, 2293, 4570, 9160, 18277, 36597, 73118, 146301, 292466, 585079, 1169848, 2340003, 4679431, 9359402, 18717687, 37436529, 74870685, 149743743, 299482896, 598970235, 1197931456, 2395872060, 4791725527, 9583469660, 19166902722
Offset: 1
-
a := proc(n) local j; option remember;
if n < 3 then 1;
else add(`if`(`mod`(n, j) <> 0, a(j), 0), j = 2 .. n - 1);
end if; end proc;
seq(a(n), n = 1..40); # G. C. Greubel, Mar 08 2021
-
a[n_] := a[n] = Sum[Boole[Mod[n, k] != 0] a[k], {k,n-1}]; a[1] = a[2] = 1; Table[a[n], {n, 1, 38}]
terms = 38; A[] = 0; Do[A[x] = x (1 + x) + A[x]/(1 - x) - Sum[A[x^k], {k, 1, terms}] + O[x]^(terms + 1) // Normal, terms + 1]; Rest[CoefficientList[A[x], x]]
a[n_] := a[n] = SeriesCoefficient[x (1 + x + 1/(1 - x) Sum[a[k] x^k (1 - x^(k - 1))/(1 - x^k), {k, 1, n - 1}]), {x, 0, n}]; Table[a[n], {n, 1, 38}]
-
@CachedFunction
def a(n):
if n<3: return 1
else: return sum( a(j) if n%j!=0 else 0 for j in (2..n-1) )
[a(n) for n in (1..40)] # G. C. Greubel, Mar 08 2021
Showing 1-4 of 4 results.
Comments