login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A268878
Breadth-first traversal of a binary tree in which the value at the n-th node is equal to ParentNode()*prime(n-1).
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
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(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
Sequence in context: A129315 A171126 A299205 * A194544 A348475 A075770
KEYWORD
nonn,easy,tabf
AUTHOR
Davide Aversa, Feb 15 2016
STATUS
approved