OFFSET
0,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 0..8191
Michael De Vlieger, Tree showing levels 0 <= j <= 5
Michael De Vlieger, Tree showing levels 0 <= j <= 7
FORMULA
EXAMPLE
This irregular table can be represented as a binary tree. Each child to the left is obtained by applying A283980 to the parent, and each child to the right is obtained by doubling the parent:
1
|
...................2...................
6 4
30......../ \........12 36......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
210 60 180 24 900 72 216 16
etc.
MATHEMATICA
Block[{a}, a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ@ n, (Times @@ Map[Prime[PrimePi@#1 + 1]^#2 & @@ # &, FactorInteger[#]] - Boole[# == 1])*2^IntegerExponent[#, 2] &[a[n/2]], 2 a[(n - 1)/2]]; Array[a, 57, 0]]
(* or, via Doudna *)
Map[Times @@ Flatten@ MapIndexed[ConstantArray[Prime[First[#2]], #1] &, Table[LengthWhile[#1, # >= j &], {j, #2}] & @@ {#, Max[#]} &@ Sort[Flatten[ConstantArray[PrimePi@#1, #2] & @@@ FactorInteger[#]], Greater]] &, Nest[Append[#1, Prime[1 + BitLength[#2] - DigitCount[#2, 2, 1]]*#1[[#2 - 2^Floor@ Log2@ #2 + 1]]] & @@ {#, Length@ #} &, {1}, 57] ] (* Michael De Vlieger, Mar 05 2021 *)
PROG
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, Dec 24 2019
EXTENSIONS
Name amended by Antti Karttunen, Mar 05 2021
STATUS
approved