login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A042948 Numbers congruent to 0 or 1 (mod 4). 74

%I #173 Apr 10 2024 09:50:05

%S 0,1,4,5,8,9,12,13,16,17,20,21,24,25,28,29,32,33,36,37,40,41,44,45,48,

%T 49,52,53,56,57,60,61,64,65,68,69,72,73,76,77,80,81,84,85,88,89,92,93,

%U 96,97,100,101,104,105,108

%N Numbers congruent to 0 or 1 (mod 4).

%C Maximum number of squares attacked by a bishop on an (n + 1) X (n + 1) chessboard. - _Stewart Gordon_, Mar 23 2001

%C Maximum vertex degree of the (n + 1) X (n + 1) bishop graph and black bishop graph. - _Eric W. Weisstein_, Jun 26 2017

%C Also number of squares attacked by a bishop on a toroidal chessboard. - Diego Torres (torresvillarroel(AT)hotmail.com), May 30 2001

%C Numbers n such that {1, 2, 3, ..., n-1, n} is a perfect Skolem set. - _Emeric Deutsch_, Nov 24 2006

%C The number of terms which lie on the principal diagonals of an n X n square spiral. - _William A. Tedeschi_, Mar 02 2008

%C Possible nonnegative discriminants of quadratic equation a*x^2 + b*x + c or discriminants of binary quadratic forms a*x^2 + b*x*y + c^y^2. - _Artur Jasinski_, Apr 28 2008

%C A133872(a(n)) = 1; complement of A042964. - _Reinhard Zumkeller_, Oct 03 2008

%C Partial sums are A035608. - _Jaroslav Krizek_, Dec 18 2009 [corrected by _Werner Schulte_, Dec 04 2023]

%C Nonnegative m for which floor(k*m/4) = k*floor(m/4), where k = 2 or 3. Example: 13 is in the sequence because floor(2*13/4) = 2*floor(13/4), and also floor(3*13/4) = 3*floor(13/4). - _Bruno Berselli_, Dec 09 2015

%C Also number of maximal cliques in the n X n white bishop graph. - _Eric W. Weisstein_, Dec 01 2017

%C The offset should have been 1. - _Jianing Song_, Oct 06 2018

%C Numbers k for which the binomial coefficient C(k,2) is even. - _Tanya Khovanova_, Oct 20 2018

%C Numbers m such that there exists a permutation (x(1), x(2), ..., x(m)) with all absolute differences |x(k) - k| distinct. - _Jukka Kohonen_, Oct 02 2021

%C Numbers m such that there exists a multiset of integers whose size is m, and sum and product are both -m. - _Yifan Xie_, Mar 25 2024

%H James Spahlinger, <a href="/A042948/b042948.txt">Table of n, a(n) for n = 0..10000</a>

%H H. W. Gould, <a href="http://www.fq.math.ca/Papers1/44-4/quartgould04_2006.pdf">The inverse of a finite series and a third-order recurrent sequence</a>, Fibonacci Quart., Vol. 44, No. 4 (2006), pp. 302-315. See p. 311.

%H M. J. Pelling and J. H. Steelman, <a href="https://www.jstor.org/stable/2324855">E3269. Permutations with distinct displacements</a>, (problem by Pelling and solution by Steelman), The American Mathematical Monthly, 96 (1989), 843-844.

%H T. Skolem, <a href="http://www.mscand.dk/article/view/10490">On certain distributions of integers in pairs with given differences</a>, Math. Scand., Vol. 5 (1957), pp. 57-68.

%H Harry Tamvakis and O. P. Lossers, <a href="http://www.jstor.org/stable/2589724">Amenable Numbers: 10454</a>, The American Mathematical Monthly, Vol. 105, No. 4 (Apr., 1998), p. 368.

%H Leo Tavares, <a href="/A042948/a042948.jpg">Illustration: Diamond Crosses</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BishopGraph.html">Bishop Graph</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/BlackBishopGraph.html">Black Bishop Graph</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MaximalClique.html">Maximal Clique</a>.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MaximumVertexDegree.html">Maximum Vertex Degree</a>.

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

%F a(n) = A042963(n+1) - 1. [Corrected by _Jianing Song_, Oct 06 2018]

%F From _Michael Somos_, Jan 12 2000: (Start)

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

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

%F a(n) = 4*n - a(n-1) - 3 with a(0) = 0. - _Vincenzo Librandi_, Nov 17 2010

%F a(n) = Sum_{k>=0} A030308(n,k)*A151821(k+1). - _Philippe Deléham_, Oct 17 2011

%F a(n) = floor((4/3)*floor(3*n/2)). - _Clark Kimberling_, Jul 04 2012

%F a(n) = n + 2*floor(n/2) = 2*n - (n mod 2). - _Bruno Berselli_, Apr 30 2016

%F E.g.f.: 2*exp(x)*x - sinh(x). - _Stefano Spezia_, Sep 09 2019

%F Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + 3*log(2)/4. - _Amiram Eldar_, Dec 05 2021

%F a(n) = A000290(n) - 4*A002620(n-1). - _Leo Tavares_, Oct 04 2022

%p a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+4 od: seq(a[n], n=0..54); # _Zerinvary Lajos_, Mar 16 2008

%t Select[Range[0, 150], Or[Mod[#, 4] == 0, Mod[#, 4] == 1] &] (* _Vincenzo Librandi_, Dec 09 2015 *)

%t Table[(4 n - 5 - (-1)^n)/2, {n, 20}] (* _Eric W. Weisstein_, Dec 01 2017 *)

%t LinearRecurrence[{1, 1, -1}, {1, 4, 5}, {0, 20}] (* _Eric W. Weisstein_, Dec 01 2017 *)

%t CoefficientList[Series[x (1 + 3 x)/((-1 + x)^2 (1 + x)), {x, 0, 20}], x] (* _Eric W. Weisstein_, Dec 01 2017 *)

%t {#, # + 1} & /@ (4 Range[0, 40]) // Flatten (* _Harvey P. Dale_, Jan 15 2024 *)

%o (PARI) a(n)=2*n-n%2;

%o (PARI) concat(0, Vec(x*(1+3*x)/((1+x)*(1-x)^2) + O(x^100))) \\ _Altug Alkan_, Dec 09 2015

%o (Maxima) makelist(-1/2+1/2*(-1)^n+2*n, n, 0, 60); /* _Martin Ettl_, Nov 05 2012 */

%o (Magma) [n: n in [0..150]|n mod 4 in {0, 1}]; // _Vincenzo Librandi_, Dec 09 2015

%Y Cf. A000290, A002620.

%K nonn,easy,changed

%O 0,3

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)