login
A360298
Irregular triangle (an infinite binary tree) read by rows. The tree has root node 1 in row n = 1. For n > 1, each node with value m in row n-1 has a left child with value m / n if n divides m, and a right child with value m * n.
3
1, 2, 6, 24, 120, 20, 720, 140, 5040, 1120, 630, 40320, 10080, 70, 5670, 4480, 362880, 1008, 100800, 7, 700, 567, 56700, 448, 44800, 36288, 3628800, 11088, 1108800, 77, 7700, 6237, 623700, 4928, 492800, 399168, 39916800, 924, 133056, 92400, 13305600, 924, 92400, 74844, 51975, 7484400, 59136, 5913600, 33264, 4790016, 3326400, 479001600
OFFSET
1,2
COMMENTS
This sequence is a variant of A360173; here we use divisions and multiplications, there subtractions and additions.
The n-th row has A360299(n) terms, starts with A008336(n+1) and ends with A000142(n).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..11270 (rows for n = 1..26 flattened)
FORMULA
T(n, 1) = A008336(n+1).
T(n, A360299(n)) = A000142(n).
T(p, k) = p * T(p-1, k) for any prime number p.
EXAMPLE
The tree begins:
n n-th row
-- --------
1 1___
|
2 2___
|
3 6___
|
4 24___
|
5 _____________120_____________
| |
6 20___ 720___
| |
7 140___ _____5040_____
| | |
8 1120__ __630__ __40320__
| | | | |
9 10080 70 5670 4480 362880
PROG
(PARI) row(n) = { my (r = [1]); for (h = 2, n, r=concat(apply(v -> if (v%h==0, [v/h, v*h], [v*h]), r))); return (r) }
(Python)
from functools import cache
@cache
def row(n):
if n == 1: return [1]
out = []
for r in row(n-1): out += ([r//n] if r%n == 0 else []) + [r*n]
return out
print([an for r in range(1, 13) for an in row(r)]) # Michael S. Branicky, Feb 02 2023
CROSSREFS
Cf. A000142, A008336, A360173, A360299 (row lengths), A360300.
Sequence in context: A065422 A260850 A008336 * A033643 A050211 A248766
KEYWORD
nonn,look,tabf,easy
AUTHOR
Rémy Sigrist, Feb 02 2023
STATUS
approved