login
Least number of vertices in a stepwise-irregular tree with at least one vertex of degree n.
1

%I #37 Feb 04 2026 14:00:16

%S 1,2,3,7,21,81,391,2283,15657,123301,1096011,10850511,118369213,

%T 1410566457,18228858831,253901962291,3791602636881,60428667025293,

%U 1023732711957907,18370314775689111,348069122065688421,6943978985210484001,145492893023457760023

%N Least number of vertices in a stepwise-irregular tree with at least one vertex of degree n.

%H Ivan Gutman, <a href="https://doi.org/10.1016/j.amc.2017.12.045">Stepwise irregular graphs</a>, Applied Mathematics and Computation 325 (2018), 234-238.

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Stepwise_irregular_graph">Stepwise irregular graph</a>.

%F a(n) = 1 + n * Sum_{k=1..n} Product_{i=2..k} (n-i).

%F a(n) = 1 + n * Sum_{k=0..n-2} (n-2)!/k! for n>=2.

%F a(n) = 1 + n * A000522(n-2) for n>=2. - _Alois P. Heinz_, Jan 28 2026

%p a:= proc(n) option remember; `if`(n<2, n+1,

%p ((n-2)*(2*n+1)*a(n-1)-(2*n-1)*(n-3)*a(n-2))/(2*n-3))

%p end:

%p seq(a(n), n=0..22); # _Alois P. Heinz_, Jan 28 2026

%o (Python)

%o from math import factorial

%o def a(n):

%o if n >= 0 and n <= 2: return n + 1

%o scale_num = factorial(n - 2)

%o sum_val = 0

%o for i in range(n - 1):

%o sum_val += scale_num // factorial(i)

%o return 1 + n * sum_val

%Y Cf. A000522.

%K nonn,easy

%O 0,2

%A _Kyle Wood_, Jan 28 2026