cp's OEIS Frontend

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.

A134449 Sum of even products minus sum of odd products of different pairs of numbers from 1 to n.

This page as a plain text file.
%I A134449 #35 Dec 09 2024 15:54:02
%S A134449 0,2,5,29,39,129,150,374,410,860,915,1707,1785,3059,3164,5084,5220,
%T A134449 7974,8145,11945,12155,17237,17490,24114,24414,32864,33215,43799,
%U A134449 44205,57255,57720,73592,74120,93194,93789,116469,117135,143849,144590,175790
%N A134449 Sum of even products minus sum of odd products of different pairs of numbers from 1 to n.
%H A134449 Colin Barker, <a href="/A134449/b134449.txt">Table of n, a(n) for n = 1..500</a>
%H A134449 <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (1,4,-4,-6,6,4,-4,-1,1).
%F A134449 Empirical g.f.: x^2*(x^5-6*x^4+2*x^3-16*x^2-3*x-2) / ((x-1)^5*(x+1)^4). - _Colin Barker_, Sep 03 2013
%F A134449 Conjectures from _Colin Barker_, Mar 20 2015: (Start)
%F A134449 a(n) = (n^4+4*n^3-2*n^2-4*n)/16 for n even.
%F A134449 a(n) = (n^4-1)/16 for n odd. (End)
%F A134449 The above conjectures are true. - _Sela Fried_, Dec 08 2024
%F A134449 E.g.f.: (x*(1 + 17*x + 6*x^2 + x^3)*cosh(x) - (1 + x - 7*x^2 - 10*x^3 - x^4)*sinh(x))/16. - _Stefano Spezia_, Dec 09 2024
%e A134449 {1,2,3} -> 1*2-1*3+2*3 = 5.
%e A134449 {1,2,3,4} -> 1*2-1*3+1*4+2*3+2*4+3*4 = 29.
%e A134449 {1,2,3,4,5} -> 1*2-1*3+1*4-1*5+2*3+2*4+2*5+3*4-3*5+4*5 = 39.
%p A134449 P:=proc(n) local a,i,j,k,w; for i from 1 by 1 to n do a:=0; for j from 1 by 1 to i do w:=j; k:=i; while k>w do a:=a+w*k*(-1)^(w*k); k:=k-1; od; od; print(a); od; end: P(100);
%t A134449 epop[n_]:=Module[{f=Times@@@Subsets[n,{2}]},Total[Select[f,EvenQ]]-Total[ Select[ f,OddQ]]]; Table[epop[Range[n]],{n,40}] (* _Harvey P. Dale_, Sep 17 2017 *)
%o A134449 (PARI) a(n) = {s = 0; for (i=1, n, for (j=i+1, n, p = i*j; if (p % 2, s -= p, s += p););); s;} \\ _Michel Marcus_, Mar 20 2015
%Y A134449 Cf. A000914, A000915.
%K A134449 nonn,easy
%O A134449 1,2
%A A134449 _Paolo P. Lava_ and _Giorgio Balzarotti_, Jan 31 2008