This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A347365 #54 Nov 28 2021 13:23:23 %S A347365 0,3,2,9,4,15,6,21,8,27,10,33,12,39,14,45,16,51,18,57,20,63,22,69,24, %T A347365 75,26,81,28,87,30,93,32,99,34,105,36,111,38,117,40,123,42,129,44,135, %U A347365 46,141,48,147,50,153,52,159,54,165,56,171,58,177,60,183,62,189,64 %N A347365 a(n) = n * (2-(-1)^n), or zero together with first differences of even triangular numbers halved (A074378). %C A347365 This sequence and A165998 form a complementary pair as solutions of alternating sequences a(n) + b(n) = 4*n (A008586), and a(n)*b(n) = 3*n^2 (A033428). %C A347365 This is the particular case of the two integer sequences x(n)=2n and y(n)=n, where more generally, x(n) + y(n) = 2*a(n) and x(n)*y(n) = (a(n) + b(n)) * (a(n) - b(n)) give the two conjugate binomials a(n) = x(n) + (-1)^n*y(n) and b(n) = x(n) - (-1)^n*y(n) as solutions over the integer domain. %C A347365 a(n) is also A005843 and A016945 interleaved. %C A347365 For every integer k: a(n*k) = n*k is multiplicative for nonnegative even integers n and a(n*k) = n*a(k) for nonnegative odd integers n. %C A347365 For every nonnegative odd integer k, the k-th difference of a(k*n)/k = (2n+1)*(-1)^n + 2 = A166519(n), and 1 for all nonnegative even integers. %C A347365 a(6n+1)/3 = 6n+1, and a(6n+5)/3 = 6n+5, related to Collatz Conjecture. %C A347365 Half-periods of a(k) mod n is A026741(n). %H A347365 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A347365 G.f.: x*(3 + 2*x + 3*x^2)/(1 - x^2)^2. %F A347365 E.g.f.: x*(3*cosh(x) + sinh(x)). %F A347365 Dirichlet g.f.: 2^(-s) * (3*2^s - 4) * zeta(s-1) = (3 - 4/2^s) * zeta(s-1) = (3 - 1/2^(s-2)) * zeta(s-1). %F A347365 a(n) = n*(2-(-1)^n) = 3*n / (2+(-1)^n). %F A347365 a(n) = 3*n if n odd, a(n) = n if n even, implies a(a(2n)) = 2n, a(a(2n+1)) = 9*a(2n+1). %F A347365 a(n) = 3*b(n), if n odd and a(n) = b(n)/3, if n even, with b(n) = A165998(n). %F A347365 a(n) = a(a(2k*n)/(2k)) = a((2k+1)*n) / (2k+1), since a(2*k*n) / (2*k) = n. %F A347365 a(n) = 4*n - A165998(n). %F A347365 a(n+1) = a(n) + A086970(n+1)*(-1)^n. %F A347365 a(n) = 2*A014682(n) - A000035(n). %F A347365 a(n) = n*A010684(n). - _Michel Marcus_, Sep 13 2021 %F A347365 For positive integers k and n, a(n) = A(n,1) = n * (A(n,k)/n)^(1/k), where the k-th nesting composition A(n,k) = a(a(...a(a(n))...)) = n * ( a(n) / n )^k, and d.g.f. of A(n,k) = (2^(1-s) + (1-2^(1-s))*3^k) * zeta(s-1). - _Federico Provvedi_, Sep 18 2021 %F A347365 a(n+1) = A165998(n)*(1 + 1/n). - _Federico Provvedi_, Sep 19 2021 %t A347365 Table[n(2-(-1)^n),{n,0,99}] (* or *) %t A347365 LinearRecurrence[{0,2,0,-1}, {0,3,2,9}, 100] (* or *) %t A347365 If[EvenQ@#,#,3#]&/@Range[0,99] (* or *) %t A347365 Drop[Flatten@Transpose[{2#,6#+3}&@Range[0,Quotient[#,2]]],-Boole@EvenQ@#]&@(10^2) %o A347365 (Sage) (x*(3+2*x+3*x^2)/(1-x^2)^2).series(x,65).coefficients(x,sparse=False) # _Stefano Spezia_, Aug 30 2021 %o A347365 (PARI) a(n) = n*(2-(-1)^n); \\ _Michel Marcus_, Sep 13 2021 %Y A347365 Cf. A074378, A165998, A008586, A033428, A237420, A193356, A016921, A016969, A166519, A014682, A005843, A016945, A010684, A008585, A000027, A026741. %K A347365 nonn,easy %O A347365 0,2 %A A347365 _Federico Provvedi_, Aug 29 2021