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.

A171769 Partial sums of A042964 (numbers congruent to 2 or 3 mod 4).

This page as a plain text file.
%I A171769 #45 Sep 08 2022 08:45:50
%S A171769 2,5,11,18,28,39,53,68,86,105,127,150,176,203,233,264,298,333,371,410,
%T A171769 452,495,541,588,638,689,743,798,856,915,977,1040,1106,1173,1243,1314,
%U A171769 1388,1463,1541,1620,1702,1785,1871,1958,2048,2139,2233,2328,2426,2525
%N A171769 Partial sums of A042964 (numbers congruent to 2 or 3 mod 4).
%C A171769 If we insert an initial 0, and alternate the signs: 0,2,-5,11,-18,28,..., we get a sequence where the average of the first n terms is an integer, with no repeats: specifically A001057(n-1). The sum of the first n terms is (-1)^(n-1)*A093353(n-1). - _Franklin T. Adams-Watters_, May 20 2010
%C A171769 Suppose that n cards have the numbers 1..2n written on them randomly, one number to a side, and are set out on a table randomly. You have the task of maximizing the sum of the visible numbers by flipping cards. If you have no information other than the numbers on the upper faces, and may not flip any particular card more than once, a(n) is the largest sum you can guarantee in the worst case. - _Andrew Woods_, Jun 06 2013
%H A171769 G. C. Greubel, <a href="/A171769/b171769.txt">Table of n, a(n) for n = 1..1000</a>
%H A171769 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).
%F A171769 a(n) = Sum_{i=1..n} A042964(i).
%F A171769 a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - _R. H. Hardin_, Nov 13 2011
%F A171769 a(n) = ceiling((2*n+1)*n/2). - _Andrew Woods_, Jun 06 2013
%F A171769 G.f.: x*(2+x+x^2) / ((1-x)^3*(x+1)). - _Colin Barker_, Jun 04 2014
%F A171769 a(n) = round(n/(1-exp(-1/n))). - _Richard R. Forberg_, Jan 28 2015
%t A171769 a[n_]:=Ceiling[((2n+1)n/2)]; Array[a, 60] (* _Vincenzo Librandi_, Jul 02 2019 *)
%t A171769 LinearRecurrence[{2,0,-2,1}, {2,5,11,18}, 60] (* _G. C. Greubel_, Jul 02 2019 *)
%o A171769 (PARI) Vec(x*(x^2+x+2)/((1-x)^3*(x+1)) + O(x^60)) \\ _Colin Barker_, Jun 04 2014
%o A171769 (Magma) [Ceiling((2*n+1)*n/2): n in [1..60]]; // _Vincenzo Librandi_, Jul 02 2019
%o A171769 (Sage) [ceiling(n*(1+2*n)/2) for n in (1..60)] # _G. C. Greubel_, Jul 02 2019
%o A171769 (GAP) a:=[2,5,11,18];; for n in [5..60] do a[n]:=2*a[n-1]-2*a[n-3] + a[n-4]; od; a; # _G. C. Greubel_, Jul 02 2019
%Y A171769 Cf. A042964, A001057, A093353. - _Franklin T. Adams-Watters_, May 20 2010
%K A171769 nonn,easy
%O A171769 1,1
%A A171769 _Jaroslav Krizek_, Dec 18 2009