OFFSET
0,2
COMMENTS
LINKS
Michael De Vlieger, Fan style binary tree showing a(n), n = 0..2047, with a color code associated with log(a(n))/log(2) for a(n) <= 4194304. Terms that are either 0 or greater than 4194304 appear blank.
EXAMPLE
a(0) = 1 since s(0) = 1 = t(1).
a(1) = 2 since s(1) = 2 = t(2).
a(2) = 4 since s(2) = 3 = t(4).
a(3) = 5 since s(3) = 5 = t(5).
Table relating this sequence to s and t. The last column shows Y if s(n) is divisible by the prime in the heading, otherwise ".":
n s(n) a(n) 2357
----------------------
0 1 1 .
1 2 2 Y
2 3 4 .Y
3 6 5 YY
4 5 7 ..Y
5 10 8 Y.Y
6 15 17 .YY
7 30 26 YYY
8 7 11 ...Y
9 14 12 Y..Y
10 21 20 .Y.Y
11 42 37 YY.Y
12 35 36 .YYY
13 70 67 Y.YY
14 105 68 .YYY
15 210 205 YYYY
...
MATHEMATICA
nn = 2^14; c[_] := False; m[_] := 1;
i = 1; j = m[1] = m[2] = 2; c[1] = c[2] = True;
f[x_] := f[x] = Times @@ FactorInteger[x][[All, 1]];
s = Association[
Monitor[Reap[
Do[While[c[Set[k, # m[#]]], m[#]++] &[f[i * j]/f[i]];
If[SquareFreeQ[k],
Sow[Total[2^(-1 + PrimePi[FactorInteger[k][[All, 1]]])] -> n] ];
Set[{c[k], i, j}, {True, j, k}], {n, 3, nn}] ][[-1, 1]], n]];
TakeWhile[{1, 2}~Join~Array[If[KeyExistsQ[s, #], Lookup[s, #], 0] &, Floor@ Sqrt[nn], 2], # > 0 &]
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger, Jul 29 2024
STATUS
approved