A014601 Numbers congruent to 0 or 3 mod 4.
0, 3, 4, 7, 8, 11, 12, 15, 16, 19, 20, 23, 24, 27, 28, 31, 32, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 67, 68, 71, 72, 75, 76, 79, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 108, 111, 112, 115, 116, 119, 120, 123, 124
Offset: 0
Examples
G.f. = 3*x + 4*x^2 + 7*x^3 + 8*x^4 + 11*x^5 + 12*x^6 + 15*x^7 + 16*x^8 + ...
References
- H. Cohen, Course in Computational Alg. No. Theory, Springer, 1993, pp. 514-5.
- A. Scholz and B. Schoeneberg, Einführung in die Zahlentheorie, 5. Aufl., de Gruyter, Berlin, New York, 1973, p. 108.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- S. F. Barger, Solution to problem 10454: Amenable Numbers, Amer. Math. Monthly, Vol. 105, No. 4 (April 1998), p. 368.
- Steven R. Finch, Class number theory [Cached copy, with permission of the author]
- Heiko Harborth, Solution of Steinhaus's problem with plus and minus signs, Journal of Combinatorial Theory, Series A, Volume 12, Issue 2 (March 1972), Pages 253-259.
- Mickaël Launay, Les routes de Numland, L’énigme maths du "Monde" n°2. In French.
- Michael Penn, The most beautiful arrangement of numbers, YouTube video, 2024.
- Rick L. Shepherd, Binary quadratic forms and genus theory, Master of Arts Thesis, University of North Carolina at Greensboro, 2013.
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Haskell
a014601 n = a014601_list !! n a014601_list = [x | x <- [0..], mod x 4 `elem` [0, 3]] -- Reinhard Zumkeller, Jun 05 2012
-
Magma
[n: n in [0..200]|n mod 4 in {0,3}]; // Vincenzo Librandi, Dec 24 2010
-
Maple
A014601:=n->3*n-2*floor(n/2); seq(A014601(k), k=0..100); # Wesley Ivan Hurt, Nov 08 2013
-
Mathematica
aa = {}; Do[Do[Do[d = b^2 - 4 a c; If[d <= 0, AppendTo[aa, -d]], {a, 0, 50}], {b, 0, 50}], {c, 0, 50}]; Union[aa] (* Artur Jasinski, Apr 28 2008 *) Select[Range[0, 124], Or[Mod[#, 4] == 0, Mod[#, 4] == 3] &] (* Ant King, Nov 18 2010 *) CoefficientList[Series[2 x/(1 - x)^2 + (1/(1 - x) + 1/(1 + x)) x/2, {x, 0, 100}], x] (* Vincenzo Librandi, May 18 2014 *) a[ n_] := 2 n + Mod[n, 2]; (* Michael Somos, Jul 24 2015 *)
-
PARI
{a(n) = 2*n + n%2}; /* Michael Somos, Dec 27 2010 */
Formula
a(n) = (n + 1)*2 + 1 - n mod 2. - Reinhard Zumkeller, Apr 21 2003
a(n) = Sum_{k=1..n} (2 - (-1)^k). - William A. Tedeschi, Mar 20 2008
From R. J. Mathar, Sep 25 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 2.
G.f.: x*(3+x)/((1+x)*(x-1)^2). (End)
a(n) = 2*n + (n mod 2). - Paolo Valzasina (p.valzasina(AT)gmail.com), Nov 24 2009
a(n) = (4*n - (-1)^n + 1)/2. - Bruno Berselli, Oct 06 2010
a(n) = 4*n - a(n-1) - 1 (with a(0) = 0). - Vincenzo Librandi, Dec 24 2010
a(n) = -A042948(-n) for all n in Z. - Michael Somos, Dec 27 2010
G.f.: 2*x / (1 - x)^2 + (1 / (1 - x) + 1 / (1 + x)) * x/2. - Michael Somos, Dec 27 2010
a(n) = Sum_{k>=0} A030308(n,k)*b(k) with b(0) = 3 and b(k) = 2^(k+1) for k > 0. - Philippe Deléham, Oct 17 2011
a(n) = ceiling((4/3)*ceiling(3*n/2)). - Clark Kimberling, Jul 04 2012
a(n) = 3n - 2*floor(n/2). - Wesley Ivan Hurt, Nov 08 2013
a(n) = A042948(n+1) - 1 for all n in Z. - Michael Somos, Jul 24 2015
a(n) + a(n+1) = A004767(n) for all n in Z. - Michael Somos, Jul 24 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*log(2)/4 - Pi/8. - Amiram Eldar, Dec 05 2021
E.g.f.: ((4*x + 1)*exp(x) - exp(-x))/2. - David Lovler, Aug 04 2022
Comments