login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(4n) = 1+4n, a(1+4n) = -2-6n, a(2+4n) = 4+6n, a(3+4n) = -3-4n.
1

%I #51 Feb 17 2024 06:28:15

%S 1,-2,4,-3,5,-8,10,-7,9,-14,16,-11,13,-20,22,-15,17,-26,28,-19,21,-32,

%T 34,-23,25,-38,40,-27,29,-44,46,-31,33,-50,52,-35,37,-56,58,-39,41,

%U -62,64,-43,45,-68,70,-47,49,-74,76,-51,53,-80,82,-55,57,-86,88,-59

%N a(4n) = 1+4n, a(1+4n) = -2-6n, a(2+4n) = 4+6n, a(3+4n) = -3-4n.

%C A permutation of A047253, numbers that are not divisible by 6.

%H Bruno Berselli, <a href="/A215898/b215898.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (-1,-1,-1,1,1,1,1).

%F a(n) = 2*a(n-4) - a(n-8).

%F a(2*n) + a(1+2*n) = -A109613(n)*(-1)^n.

%F a(3*n) + a(1+3*n) + a(2+3*n) = 3*a(n).

%F a(4*n) + a(1+4*n) + a(2+4*n) + a(3+4*n) = 0.

%F a(5*n) + a(1+5*n) + a(2+5*n) + a(3+5*n) + a(4+5*n) = 5*a(n).

%F From _Bruno Berselli_, Sep 07 2012: (Start)

%F G.f.: (1-x+3*x^2+3*x^4-x^5+x^6)/((1-x)*(1+x+x^2+x^3)^2).

%F a(n) = 1+(5-i^(n*(n+1)))*((2*n+1)*(-1)^n-1)/8, where i=sqrt(-1).

%F a(2*n) = 1+(5-(-1)^n)*n/2; a(2*n+1) = 1-(5+(-1)^n)*(n+1)/2.

%F a(n) = a(-n-1) = -a(n-1)-a(n-2)-a(n-3)+a(n-4)+a(n-5)+a(n-6)+a(n-7). (End)

%t a[n_ /; Mod[n, 4] == 0] := n+1; a[n_ /; Mod[n, 4] == 1] := -(3n+1)/2; a[n_ /; Mod[n, 4] == 2] := (3n+2)/2; a[n_ /; Mod[n, 4] == 3] := -n; Table[a[n], {n, 0, 70}] (* _Jean-François Alcover_, Sep 03 2012 *)

%t LinearRecurrence[{-1,-1,-1,1,1,1,1},{1,-2,4,-3,5,-8,10},60] (* _Harvey P. Dale_, Mar 24 2023 *)

%o (Magma) m:=60; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-x+3*x^2+3*x^4-x^5+x^6)/((1-x)*(1+x+x^2+x^3)^2))); // _Bruno Berselli_, Sep 06 2012

%o (Maxima) makelist(expand(1+(5-%i^(n*(n+1)))*((2*n+1)*(-1)^n-1)/8), n, 0, 60); /* _Bruno Berselli_, Sep 07 2012 */

%Y Cf. A016813, A016933, A016957, A004767.

%K sign,easy

%O 0,2

%A _Paul Curtz_, Aug 25 2012