

A268878


Breadthfirst traversal of a binary tree in which the value at the nth node is equal to ParentNode()*prime(n1).


1



1, 2, 3, 10, 14, 33, 39, 170, 190, 322, 406, 1023, 1221, 1599, 1677, 7990, 9010, 11210, 11590, 21574, 22862, 29638, 32074, 84909, 91047, 118437, 123321, 164697, 171093, 182793, 189501, 1014730, 1046690, 1234370, 1252390, 1670290, 1692710, 1819630, 1889170
(list;
graph;
refs;
listen;
history;
text;
internal format)



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



FORMULA

Recursive formula: a(1) = 1, a(n) = prime(n1)* 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(n1)* a(n\2)) \\ Michel Marcus, Feb 16 2016
(Magma) [n le 1 select 1 else NthPrime(n1)* Self(Floor(n/2)): n in [1..60]]; // Vincenzo Librandi, Feb 17 2016


CROSSREFS



KEYWORD

nonn,easy,tabf


AUTHOR



STATUS

approved



