login
Distinct values in A119842, in order of appearance.
3

%I #10 Mar 03 2016 06:04:28

%S 1,0,2,6,14,22,252,5,92,17526,324,2916,422,9278038,411126,23694308,

%T 2074,8716,1186593143406,47570,11395487424,918166,10754,

%U 789632365568454684,343234,1164751580868,42,917581820575340,1914786011328142,58202,17423496

%N Distinct values in A119842, in order of appearance.

%H Alois P. Heinz, <a href="/A119846/b119846.txt">Table of n, a(n) for n = 1..39</a>

%t b[s_, t_] := b[s, t] = If[Length[s] < 1, 1, Sum[If[Mod[PrimeOmega[x], 2] == 1 - t && Length[Select[s, Mod[#, x] == 0 &]] == 1, b[s~Complement~{x}, 1 - t], 0], {x, s}]]; a[n_] := a[n] = Module[{l, m}, l = Sort[ FactorInteger[n], #1[[2]] > #2[[2]] &]; m = Product[Prime[i]^l[[i]][[2]], {i, 1, Length[l]}]; b[Divisors[m][[2 ;; -2]], Mod[PrimeOmega[m], 2]]]; A119846 = Reap[For[k = 1, k < 6000, k++, If[FreeQ[Array[a, k - 1], a[k]], Print[k, " ", a[k]]; Sow[a[k]]]]][[2, 1]] (* _Jean-François Alcover_, Mar 03 2016, after _Alois P. Heinz_ *)

%Y a(n) = A119842(A119845(n)).

%K nonn

%O 1,3

%A _Antti Karttunen_, Jun 04 2006

%E a(16)-a(31) from _Alois P. Heinz_, Feb 26 2016