%I #27 Jan 11 2024 08:51:02
%S 3,4,3,4,7,8,11,12,11,12,15,16,19,20,19,20,23,24,27,28,27,28,31,32,35,
%T 36,35,36,39,40,43,44,43,44,47,48,51,52,51,52,55,56,59,60,59,60,63,64,
%U 67,68,67,68,71,72,75,76,75,76,79,80,83,84,83,84,87,88,91
%N Size of the symmetric difference of {1,2,3}, {2,4,6}, ..., {n,2n,3n}.
%C a(n) is also the terms of (x+x^2+x^3) + (x^2+x^4+x^6) + ... + (x^n+x^2n+x^3n) in GF(2)[x].
%H P. Y. Huang, W. F. Ke, and G. F. Pilz, <a href="https://doi.org/10.1090/S0002-9939-09-10189-2">The cardinality of some symmetric differences</a>, Proc. Amer. Math. Soc., 138 (2010), 787-797.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,1,-1).
%F G.f.: x*(x^5+3*x^4+x^3-x^2+x+3)/(x^7-x^6-x+1). - _Alois P. Heinz_, May 17 2023
%F 6*a(n) = 1 -(-1)^n +8*n +8*A103368(n-1). - _R. J. Mathar_, Jan 11 2024
%t delta[l_, m_] := Complement[Join[l, m], Intersection[l, m]];
%t Nabl[s_, n_] := (d = {}; Do[d = delta[d, s*j], {j, Range[n]}]; d);
%t Table[Length[Nabl[Range[1, 3], n]], {n, 100}]
%o (PARI) a(n) = {my(m=0);for(k = 0,n-1,m = bitxor(m, 2^k+2^(2*k+1)+2^(3*k+2))); hammingweight(m)} \\ _Thomas Scheuerle_, May 17 2023
%Y Cf. A361471.
%K nonn,easy
%O 1,1
%A _Guenter Pilz_, May 17 2023