A290689
Number of transitive rooted trees with n nodes.
Original entry on oeis.org
1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 88, 143, 229, 370, 592, 955, 1527, 2457, 3929, 6304, 10081
Offset: 1
The a(7) = 8 7-node transitive rooted trees are: (o(oooo)), (oo(ooo)), (o(o)((o))), (o(o)(oo)), (ooo(oo)), (oo(o)(o)), (oooo(o)), (oooooo).
-
nn=18;
rtall[n_]:=If[n===1,{{}},Module[{cas},Union[Sort/@Join@@(Tuples[rtall/@#]&/@IntegerPartitions[n-1])]]];
Table[Length[Select[rtall[n],Complement[Union@@#,#]==={}&]],{n,nn}]
A331681
One, two, and all numbers of the form 2^k * prime(j) where k > 0 and j already belongs to the sequence.
Original entry on oeis.org
1, 2, 4, 6, 8, 12, 14, 16, 24, 26, 28, 32, 38, 48, 52, 56, 64, 74, 76, 86, 96, 104, 106, 112, 128, 148, 152, 172, 178, 192, 202, 208, 212, 214, 224, 256, 262, 296, 304, 326, 344, 356, 384, 404, 416, 424, 428, 446, 448, 478, 512, 524, 526, 592, 608, 622, 652
Offset: 1
The sequence of all semi-lone-child-avoiding rooted trees with at most one non-leaf branch under any given vertex, together with their Matula-Goebel numbers, begins:
1: o
2: (o)
4: (oo)
6: (o(o))
8: (ooo)
12: (oo(o))
14: (o(oo))
16: (oooo)
24: (ooo(o))
26: (o(o(o)))
28: (oo(oo))
32: (ooooo)
38: (o(ooo))
48: (oooo(o))
52: (oo(o(o)))
56: (ooo(oo))
64: (oooooo)
74: (o(oo(o)))
76: (oo(ooo))
86: (o(o(oo)))
The enumeration of these trees by nodes is
A324969 (essentially
A000045).
The enumeration of these trees by leaves appears to be
A090129(n + 1).
The (non-semi) lone-child-avoiding version is
A331683.
Matula-Goebel numbers of rooted semi-identity trees are
A306202.
Lone-child-avoiding locally disjoint rooted trees by leaves are
A316697.
The set S of numbers with at most one prime index in S is
A331784.
Matula-Goebel numbers of locally disjoint rooted trees are
A316495.
Cf.
A000081,
A000669,
A001678,
A007097,
A061775,
A196050,
A291636,
A316470,
A316473,
A331679,
A331680,
A331682,
A331687,
A331783,
A331785,
A331873.
-
N:= 1000: # for terms <= N
S:= {1,2}:
with(queue):
Q:= new(1,2):
while not empty(Q) do
r:= dequeue(Q);
p:= ithprime(r);
newS:= {seq(2^i*p,i=1..ilog2(N/p))} minus S;
S:= S union newS;
for s in newS do enqueue(Q,s) od:
od:
sort(convert(S,list)); # Robert Israel, Feb 05 2020
-
uryQ[n_]:=n==1||MatchQ[FactorInteger[n],({{2,},{p,1}}/;uryQ[PrimePi[p]])|{{2,_}}];
Select[Range[100],uryQ]
A374439
Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.
Original entry on oeis.org
1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0
Triangle starts:
[ 0] [1]
[ 1] [1, 2]
[ 2] [1, 2, 1]
[ 3] [1, 2, 2, 2]
[ 4] [1, 2, 3, 4, 1]
[ 5] [1, 2, 4, 6, 3, 2]
[ 6] [1, 2, 5, 8, 6, 6, 1]
[ 7] [1, 2, 6, 10, 10, 12, 4, 2]
[ 8] [1, 2, 7, 12, 15, 20, 10, 8, 1]
[ 9] [1, 2, 8, 14, 21, 30, 20, 20, 5, 2]
[10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
| n | A039834 & A000045 | A000032 | A000129 | A048654 |
| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|
| | Fibonacci | Lucas | Pell | Pell* |
| 0 | -1 | 1 | 1 | 1 |
| 1 | 1 | 3 | 0 | 4 |
| 2 | 0 | 4 | 1 | 9 |
| 3 | 1 | 7 | 2 | 22 |
| 4 | 1 | 11 | 5 | 53 |
| 5 | 2 | 18 | 12 | 128 |
| 6 | 3 | 29 | 29 | 309 |
| 7 | 5 | 47 | 70 | 746 |
| 8 | 8 | 76 | 169 | 1801 |
| 9 | 13 | 123 | 408 | 4348 |
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way):
A022087,
A055389,
A118658,
A052542,
A163271,
A371596,
A324969,
A212804,
A077985,
A069306,
A215928.
-
function T(n,k) // T = A374439
if k lt 0 or k gt n then return 0;
elif k le 1 then return k+1;
else return T(n-1,k) + T(n-2,k-2);
end if;
end function;
[T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
-
A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
# Alternative, using the function qStirling2 from A333143:
T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
seq(seq(T(n, k), k = 0..n), n = 0..10);
-
A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
-
from functools import cache
@cache
def T(n: int, k: int) -> int:
if k > n: return 0
if k < 2: return k + 1
return T(n - 1, k) + T(n - 2, k - 2)
-
from math import comb as binomial
def T(n: int, k: int) -> int:
o = k & 1
return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
-
def P(n, x):
if n < 0: return P(n, x)
return sum(T(n, k)*x**k for k in range(n + 1))
def sgn(x: int) -> int: return (x > 0) - (x < 0)
# Table of interpolated sequences
print("| n | A039834 & A000045 | A000032 | A000129 | A048654 |")
print("| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
print("| | Fibonacci | Lucas | Pell | Pell* |")
f = "| {0:2d} | {1:9d} | {2:4d} | {3:5d} | {4:4d} |"
for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
-
from sage.combinat.q_analogues import q_stirling_number2
def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025
A071679
Least k such that the maximum number of elements among the continued fractions for k/1, k/2, k/3, k/4, ..., k/k equals n.
Original entry on oeis.org
1, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155
Offset: 1
- Seiichi Manyama, Table of n, a(n) for n = 1..4784
- Mohammad K. Azarian, Fibonacci Identities as Binomial Sums, International Journal of Contemporary Mathematical Sciences, Vol. 7, No. 38, 2012, pp. 1871-1876 (See Corollary 1 (x)).
- Index entries for linear recurrences with constant coefficients, signature (1,1).
-
[1] cat [Fibonacci(n+2): n in [2..50]]; // Vincenzo Librandi, Jul 12 2015
-
Join[{1}, LinearRecurrence[{1, 1}, {3, 5}, 50]] (* Vincenzo Librandi, Jul 12 2015 *)
-
a(n)=if(n>1,fibonacci(n+2),1) \\ Charles R Greathouse IV, Jan 17 2012
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 2, 4, 3, 1, 3, 8, 8, 4, 1, 5, 15, 19, 13, 5, 1, 8, 28, 42, 36, 19, 6, 1, 13, 51, 89, 91, 60, 26, 7, 1, 21, 92, 182, 216, 170, 92, 34, 8, 1, 34, 164, 363, 489, 446, 288, 133, 43, 9, 1, 55, 290, 709, 1068, 1105, 826, 455, 184, 53, 10, 1, 89, 509, 1362, 2266, 2619, 2219, 1414, 682, 246, 64, 11, 1
Offset: 0
First six rows:
1;
1, 1;
1, 2, 1;
2, 4, 3, 1;
3, 8, 8, 4, 1;
5, 15, 19, 13, 5, 1;
-
function T(n,k) // T = A193737
if k lt 0 or n lt 0 then return 0;
elif n lt 3 then return Binomial(n,k);
else return T(n - 1, k) + T(n - 1, k - 1) + T(n - 2, k);
end if;
end function;
[T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
-
(* First program *)
z=20;
p[0, x_]:= 1;
p[n_, x_]:= Fibonacci[n+1, x] /; n > 0
q[n_, x_]:= (x + 1)^n;
t[n_, k_]:= Coefficient[p[n, x], x^(n-k)];
t[n_, n_]:= p[n, x] /. x -> 0;
w[n_, x_]:= Sum[t[n, k]*q[n-k+1, x], {k,0,n}]; w[-1, x_] := 1;
g[n_]:= CoefficientList[w[n, x], {x}]
TableForm[Table[Reverse[g[n]], {n, -1, z}]]
Flatten[Table[Reverse[g[n]], {n,-1,z}]] (* A193736 *)
TableForm[Table[g[n], {n,-1,z}]]
Flatten[Table[g[n], {n,-1,z}]] (* A193737 *)
(* Additional programs *)
(* Function RiordanSquare defined in A321620. *)
RiordanSquare[1 + 1/(1 - x - x^2), 11]//Flatten (* Peter Luschny, Feb 27 2021 *)
T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] + T[n-1,k-1] + T[n-2,k]];
Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 24 2023 *)
-
def T(n,k): # T = A193737
if (n<3): return binomial(n,k)
else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k)
flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023
A324968
Matula-Goebel numbers of rooted identity trees whose non-leaf terminal subtrees are all different.
Original entry on oeis.org
1, 2, 3, 5, 6, 10, 11, 13, 22, 26, 29, 31, 41, 58, 62, 79, 82, 101, 109, 127, 158, 179, 202, 218, 254, 271, 293, 358, 401, 421, 542, 547, 586, 599, 709, 802, 842, 929, 1063, 1094, 1198, 1231, 1361, 1418, 1609, 1741, 1858, 1913, 2126, 2411, 2462, 2722, 2749
Offset: 1
The sequence of trees together with the Matula-Goebel numbers begins:
1: o
2: (o)
3: ((o))
5: (((o)))
6: (o(o))
10: (o((o)))
11: ((((o))))
13: ((o(o)))
22: (o(((o))))
26: (o(o(o)))
29: ((o((o))))
31: (((((o)))))
41: (((o(o))))
58: (o(o((o))))
62: (o((((o)))))
79: ((o(((o)))))
82: (o((o(o))))
101: ((o(o(o))))
109: (((o((o)))))
127: ((((((o))))))
Cf.
A000081,
A004111,
A007097,
A196050,
A276625,
A317713,
A324850,
A324923,
A324935,
A324936,
A324969,
A324970,
A324978.
-
mgtree[n_Integer]:=If[n==1,{},mgtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],And[And@@Cases[mgtree[#],q:{}:>UnsameQ@@q,{0,Infinity}],UnsameQ@@Cases[mgtree[#],{},{0,Infinity}]]&]
A324978
Matula-Goebel numbers of rooted trees that are not identity trees but whose non-leaf terminal subtrees are all different.
Original entry on oeis.org
4, 7, 8, 12, 14, 16, 17, 19, 20, 21, 24, 28, 32, 34, 35, 37, 38, 40, 42, 43, 44, 48, 51, 52, 53, 56, 57, 59, 64, 67, 68, 70, 71, 73, 74, 76, 77, 80, 84, 85, 86, 88, 89, 91, 95, 96, 102, 104, 106, 107, 112, 114, 116, 118, 124, 128, 129, 131, 133, 134, 136, 139
Offset: 1
The sequence of trees together with the Matula-Goebel numbers begins:
4: (oo)
7: ((oo))
8: (ooo)
12: (oo(o))
14: (o(oo))
16: (oooo)
17: (((oo)))
19: ((ooo))
20: (oo((o)))
21: ((o)(oo))
24: (ooo(o))
28: (oo(oo))
32: (ooooo)
34: (o((oo)))
35: (((o))(oo))
37: ((oo(o)))
38: (o(ooo))
40: (ooo((o)))
42: (o(o)(oo))
43: ((o(oo)))
Cf.
A000081,
A004111,
A007097,
A196050,
A276625,
A317713,
A324850,
A324923,
A324935,
A324936,
A324968,
A324969,
A324970,
A324971,
A324979.
-
mgtree[n_]:=If[n==1,{},mgtree/@Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
Select[Range[100],And[!And@@Cases[mgtree[#],q:{}:>UnsameQ@@q,{0,Infinity}],UnsameQ@@Cases[mgtree[#],{},{0,Infinity}]]&]
A331993
Number of semi-lone-child-avoiding rooted semi-identity trees with n unlabeled vertices.
Original entry on oeis.org
1, 1, 1, 2, 3, 6, 11, 22, 43, 90, 185, 393, 835, 1802, 3904, 8540, 18756, 41463, 92022, 205179, 459086, 1030917, 2321949, 5245104, 11878750, 26967957, 61359917, 139902251, 319591669, 731385621, 1676573854, 3849288924, 8850674950, 20378544752, 46982414535
Offset: 1
The a(1) = 1 through a(7) = 11 trees:
o (o) (oo) (ooo) (oooo) (ooooo) (oooooo)
(o(o)) (o(oo)) (o(ooo)) (o(oooo))
(oo(o)) (oo(oo)) (oo(ooo))
(ooo(o)) (ooo(oo))
((o)(oo)) (oooo(o))
(o(o(o))) ((o)(ooo))
(o(o)(oo))
(o(o(oo)))
(o(oo(o)))
(oo(o(o)))
((o)(o(o)))
Not requiring any lone-child-avoidance gives
A306200.
Matula-Goebel numbers of these trees are
A331994.
Lone-child-avoiding rooted identity trees are
A000007.
Semi-lone-child-avoiding rooted trees are
A331934.
Semi-lone-child-avoiding rooted identity trees are
A331964.
Lone-child-avoiding rooted semi-identity trees are
A331966.
Cf.
A001678,
A004111,
A300660,
A316694,
A331683,
A331686,
A331783,
A331875,
A331933,
A331963,
A331965.
-
sssb[n_]:=Switch[n,1,{{}},2,{{{}}},_,Join@@Function[c,Select[Union[Sort/@Tuples[sssb/@c]],UnsameQ@@DeleteCases[#,{}]&]]/@Rest[IntegerPartitions[n-1]]];
Table[Length[sssb[n]],{n,10}]
-
WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v,n,(-1)^(n-1)/n))))-1,-#v)}
seq(n)={my(v=[0]); for(n=1, n-1, v=concat(v, 1 + vecsum(WeighT(v)) - v[n])); v[1]=1; v} \\ Andrew Howroyd, Feb 09 2020
A356604
Number of integer compositions of n into odd parts covering an initial interval of odd positive integers.
Original entry on oeis.org
1, 1, 1, 1, 3, 4, 5, 9, 13, 24, 40, 61, 101, 160, 257, 415, 679, 1103, 1774, 2884, 4656, 7517, 12165, 19653, 31753, 51390, 83134, 134412, 217505, 351814, 569081, 920769, 1489587, 2409992, 3899347, 6309059, 10208628, 16518910, 26729830, 43254212, 69994082
Offset: 0
The a(1) = 1 through a(8) = 13 compositions:
(1) (11) (111) (13) (113) (1113) (133) (1133)
(31) (131) (1131) (313) (1313)
(1111) (311) (1311) (331) (1331)
(11111) (3111) (11113) (3113)
(111111) (11131) (3131)
(11311) (3311)
(13111) (111113)
(31111) (111131)
(1111111) (111311)
(113111)
(131111)
(311111)
(11111111)
The a(9) = 24 compositions:
(135) (11133) (1111113) (111111111)
(153) (11313) (1111131)
(315) (11331) (1111311)
(351) (13113) (1113111)
(513) (13131) (1131111)
(531) (13311) (1311111)
(31113) (3111111)
(31131)
(31311)
(33111)
These compositions are ranked by the intersection of
A060142 and
A333217.
This is the odd initial case of
A107428.
This is the odd restriction of
A107429.
The non-initial version is
A356605.
A055932 lists numbers with prime indices covering an initial interval.
-
normQ[m_]:=Or[m=={},Union[m]==Range[Max[m]]];
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],normQ[(#+1)/2]&]],{n,0,15}]
A193736
Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (n+1)-st Fibonacci polynomial and q(n,x) = (x+1)^n.
Original entry on oeis.org
1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 8, 8, 3, 1, 5, 13, 19, 15, 5, 1, 6, 19, 36, 42, 28, 8, 1, 7, 26, 60, 91, 89, 51, 13, 1, 8, 34, 92, 170, 216, 182, 92, 21, 1, 9, 43, 133, 288, 446, 489, 363, 164, 34, 1, 10, 53, 184, 455, 826, 1105, 1068, 709, 290, 55, 1, 11, 64, 246, 682, 1414, 2219, 2619, 2266, 1362, 509, 89
Offset: 0
First six rows:
1;
1, 1;
1, 2, 1;
1, 3, 4, 2;
1, 4, 8, 8, 3;
1, 5, 13, 19, 15, 5;
-
function T(n,k) // T = A193736
if k lt 0 or n lt 0 then return 0;
elif n lt 3 then return Binomial(n,k);
else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-2);
end if;
end function;
[T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
-
(* First program *)
p[0, x_] := 1
p[n_, x_] := Fibonacci[n + 1, x] /; n > 0
q[n_, x_] := (x + 1)^n
t[n_, k_] := Coefficient[p[n, x], x^(n - k)];
t[n_, n_] := p[n, x] /. x -> 0;
w[n_, x_] := Sum[t[n, k]*q[n - k + 1, x], {k, 0, n}]; w[-1, x_] := 1
g[n_] := CoefficientList[w[n, x], {x}]
TableForm[Table[Reverse[g[n]], {n, -1, z}]]
Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193736 *)
TableForm[Table[g[n], {n, -1, z}]]
Flatten[Table[g[n], {n, -1, z}]] (* A193737 *)
(* Second program *)
T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] +T[n-1,k-1] +T[n -2,k-2]];
Table[T[n, k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Oct 24 2023 *)
-
def T(n,k): # T = A193736
if (n<3): return binomial(n,k)
else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k-2)
flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023
Showing 1-10 of 14 results.
Comments