登录
OEIS由OEIS基金会的许多慷慨捐赠者.

 

标志
提示
(来自的问候整数序列在线百科全书!)
A181482号 前n个整数的和,每三个整数取负数。 4

%I#92 2024年3月15日10:12:19

%S 1,3,0,4,9,3,10,18,9,19,30,18,31,45,30,46,63,45,64,84,63,85108,84,

%电话:10913510813616513516619816519923419823527323427315,

%电话:27331636031536140836040945084605134595145070513571630

%N前N个整数的和,每三个整数取负数。

%C前10^k项的部分和为76,57256,55722556,5557225556,5555722255556,。。。,即回文5{k} 2个{k-1}5{k} 加上1+2*10^(2*k-1)_R.J.Cano,2013年3月10日,由M.F.Hasler编辑,2013年5月25日

%H Vincenzo Librandi,n的表,n=1..1000的a(n)</a>

%H Wolfram Alpha,<a href=“http://www.wolframalpha.com/input/?i=Sum%5亿*%28-1%29%5E%28%28n%2B1%29Mod3%29%2Cn%3D1..k%5D“>WA查询</a>

%H<a href=“/index/Rec#order_07”>为具有常数系数的线性递归索引条目</a>,签名(1,0,2,-2,0,-1,1)。

%F来自R.J.Mathar_,2010年10月23日:(开始)

%F a(n)=a(n-1)+2*a(n-3)-2*a(n-4)-a(n-6)+a(n-7)。

%传真:-x*(1+2*x+2*x^3+x^4-3*x^2)/(1+x+x^2,^2*(x-1)^3)。

%F a(n)=2*A061347(n+1)/9+4/9+n*(n+1。(结束)

%F a(n)=总和((i+1)*A131561(i),i=0..n-1)=A000217(n)-6*A000217。[_Bruno Berselli_,2010年12月10日]

%F a(0)=0,a(n)=a(n-1)+(-1)^(n+1)mod 3)*n-乔恩·佩里,2013年2月17日

%F a(n)=n*(n+1)/2-3*楼层(n/3)*(楼层(n/3+1)。-_R.J.Cano_,2013年3月1日[与Berselli公式相同。-编辑]

%F a(3k)=3k(k-1)/2.-_Jon Perry_,2013年3月1日

%F a(0)=0,a(n)=a(n-1)+(1-((n+1)mod 3 mod 2)*2)*n.-_Jon Perry,2013年3月3日

%e a(7)=1+2-3+4+5-6+7=10。

%t a[n_]:=总和[如果[Mod[j,3]==0,-j,j],{j,1,n}];表[a[i],{i,1,50,1}](*_Jon Perry_*)

%t三[n]:=n(n+1)/2;f[n_]:=tri@n-6 tri@楼层[n/3];数组[f,63](*_Robert G.Wilson v_,2010年10月24日*)

%t系数列表[系列[-(1+2*x+2*x^3+x^4-3*x^2)/((1+x+x^2,^2*(x-1)^3),{x,0,30}],x](*_文森佐图书馆,2013年2月17日*)

%t表[Sum[k*(-1)^Boole[Mod[k,3]==0],{k,n}],{n,60}](*_Alonso del Arte_,2013年2月24日*)

%t使用[{nn=20},累加[Times@@@Partition[Riffle[Range[3nn],{1,1,-1}],2]](*_哈维P.戴尔,2015年2月9日*)

%o(JavaScript)c=0;对于(i=1;i<100;i++){c+=Math.pow(-1,(i+1)%3)*i;document.write(c,“,”);}//_Jon Perry_,2013年2月17日

%o(JavaScript)c=0;对于(i=1;i<100;i++){c+=(1-(i+1)%3%2*2)*i;document.write(c+“,”);}//_Jon Perry_,2013年3月3日

%o(岩浆)I:=[1,3,0,4,9,3,10];[n le 7选择I[n]else Self(n-1)+2*Self_文森佐·利班迪(Vincenzo Librandi),2013年2月17日

%o(PARI)a(n)=总和(k=1,n,k*((-1)^(k%3==0)))\\ R.J.Cano_,2013年2月26日

%o(PARI)a(n)={my(y=n\3);n*(n+1)\2-3*y*(y+1)}\\R.J.Cano_,2013年2月28日

%o(哈斯克尔)

%o a181482 n=a181482_list!!(n-1)

%o a181482_list=scanl1(+)$zipWith(*)[1..]$循环[1,1,-1]

%o---Reinhard Zumkeller_,2014年11月23日

%Y参考A213203,A000217。

%K nonn,简单

%O 1,2号机组

%A _乔恩·佩里(Jon Perry),2010年10月23日

%E更多术语由R.J.Mathar_添加,2010年10月23日

查找|欢迎光临|维基|注册|音乐|地块2|演示|索引|浏览|更多|网络摄像头
贡献新序列。或评论|格式|样式表|变换|超级搜索|最近
OEIS社区|维护人OEIS基金会。

许可协议、使用条款、隐私政策。.

上次修改时间:美国东部时间2024年4月24日00:30。包含371917个序列。(在oeis4上运行。)