OFFSET
1,2
COMMENTS
2 and 3 are the only primes in the sequence.
Each node N of the tree is divisible only by its ancestors.
All the nodes in a subtree T of T0 are divisible by T's root value.
Given two nodes in the tree, N and M, the common ancestor in the tree is GCD(N,M) (greatest common divisor of N and M).
LINKS
Davide Aversa, Table of n, a(n) for n = 1..1000
FORMULA
Recursive formula: a(1) = 1, a(n) = prime(n-1)* a(floor(n/2)).
The formula derives from the definition and the parent's index formula of a generic binary tree.
EXAMPLE
For n=5, a(5) = prime(4)*a(floor(5/2)) = prime(4)*a(2) = prime(4)*prime(1)*a(floor(2/2)) = prime(4)*prime(1)*a(1) = 7*2*1 = 14.
The tree begins:
1
2 3
10 14 33 39
170 190 322 406 1023 1221 1599 1677
PROG
(Python) # Recursive version
from sympy import prime
def a(n):
if n < 3: return n
return prime(n - 1) * a(n // 2)
print([a(n) for n in range(1, 19)])
(PARI) a(n) = if (n==1, 1, prime(n-1)* a(n\2)) \\ Michel Marcus, Feb 16 2016
(Magma) [n le 1 select 1 else NthPrime(n-1)* Self(Floor(n/2)): n in [1..60]]; // Vincenzo Librandi, Feb 17 2016
CROSSREFS
KEYWORD
nonn,easy,tabf
AUTHOR
Davide Aversa, Feb 15 2016
STATUS
approved