|
|
A351782
|
|
a(n) = n-2 if n is a multiple of 4, a(n) = n-1 otherwise.
|
|
1
|
|
|
0, 1, 2, 2, 4, 5, 6, 6, 8, 9, 10, 10, 12, 13, 14, 14, 16, 17, 18, 18, 20, 21, 22, 22, 24, 25, 26, 26, 28, 29, 30, 30, 32, 33, 34, 34, 36, 37, 38, 38, 40, 41, 42, 42, 44, 45, 46, 46, 48, 49, 50, 50, 52, 53, 54, 54, 56, 57, 58, 58, 60, 61, 62, 62, 64, 65, 66, 66, 68, 69
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
a(n) is the rank of the walk matrix of the Dynkin graph Dn, a tree obtained from the path of order n-1 by adding a pendant edge at the second vertex. see Wang et al.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n - 2 + sign(n mod 4).
|
|
MATHEMATICA
|
a[n_] := If[Divisible[n, 4], n - 2, n - 1]; Array[a, 70] (* Amiram Eldar, Mar 03 2022 *)
|
|
PROG
|
(PARI) a(n) = if (n%4, n-1, n-2);
(Python)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|