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.

Showing 1-4 of 4 results.

A002265 Nonnegative integers repeated 4 times.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19
Offset: 0

Views

Author

Keywords

Comments

For n>=1 and i=sqrt(-1) let F(n) the n X n matrix of the Discrete Fourier Transform (DFT) whose element (j,k) equals exp(-2*Pi*i*(j-1)*(k-1)/n)/sqrt(n). The multiplicities of the four eigenvalues 1, i, -1, -i of F(n) are a(n+4), a(n-1), a(n+2), a(n+1), hence a(n+4) + a(n-1) + a(n+2) + a(n+1) = n for n>=1. E.g., the multiplicities of the eigenvalues 1, i, -1, -i of the DFT-matrix F(4) are a(8)=2, a(3)=0, a(6)=1, a(5)=1, summing up to 4. - Franz Vrabec, Jan 21 2005
Complement of A010873, since A010873(n)+4*a(n)=n. - Hieronymus Fischer, Jun 01 2007
For even values of n, a(n) gives the number of partitions of n into exactly two parts with both parts even. - Wesley Ivan Hurt, Feb 06 2013
a(n-4) counts number of partitions of (n) into parts 1 and 4. For example a(11) = 3 with partitions (44111), (41111111), (11111111111). - David Neil McGrath, Dec 04 2014
a(n-4) counts walks (closed) on the graph G(1-vertex; 1-loop, 4-loop) where order of loops is unimportant. - David Neil McGrath, Dec 04 2014
Number of partitions of n into 4 parts whose smallest 3 parts are equal. - Wesley Ivan Hurt, Jan 17 2021

References

  • V. Cizek, Discrete Fourier Transforms and their Applications, Adam Hilger, Bristol 1986, p. 61.

Crossrefs

Zero followed by partial sums of A011765.
Partial sums: A130519. Other related sequences: A004526, A010872, A010873, A010874.
Third row of A180969.

Programs

Formula

a(n) = floor(n/4), n>=0;
G.f.: (x^4)/((1-x)*(1-x^4)).
a(n) = (2*n-(3-(-1)^n-2*(-1)^floor(n/2)))/8; also a(n) = (2*n-(3-(-1)^n-2*sin(Pi/4*(2*n+1+(-1)^n))))/8 = (n-A010873(n))/4. - Hieronymus Fischer, May 29 2007
a(n) = (1/4)*(n-(3-(-1)^n-2*(-1)^((2*n-1+(-1)^n)/4))/2). - Hieronymus Fischer, Jul 04 2007
a(n) = floor((n^4-1)/4*n^3) (n>=1); a(n) = floor((n^4-n^3)/(4*n^3-3*n^2)) (n>=1). - Mohammad K. Azarian, Nov 08 2007 and Aug 01 2009
For n>=4, a(n) = floor( log_4( 4^a(n-1) + 4^a(n-2) + 4^a(n-3) + 4^a(n-4) ) ). - Vladimir Shevelev, Jun 22 2010
a(n) = A180969(2,n). - Adriano Caroli, Nov 26 2010
a(n) = A173562(n)-A000290(n); a(n+2) = A035608(n)-A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n+1) = A140201(n) - A057353(n+1). - Reinhard Zumkeller, Feb 26 2011
a(n) = ceiling((n-3)/4), n >= 0. - Wesley Ivan Hurt, Jun 01 2013
a(n) = (2*n + (-1)^n + 2*sin(Pi*n/2) + 2*cos(Pi*n/2) - 3)/8. - Todd Silvestri, Oct 27 2014
E.g.f.: (x/4 - 3/8)*exp(x) + exp(-x)/8 + (sin(x)+cos(x))/4. - Robert Israel, Oct 30 2014
a(n) = a(n-1) + a(n-4) - a(n-5) with initial values a(3)=0, a(4)=1, a(5)=1, a(6)=1, a(7)=1. - David Neil McGrath, Dec 04 2014
a(n) = A004526(A004526(n)). - Bruno Berselli, Jul 01 2016
From Guenther Schrack, May 03 2019: (Start)
a(n) = (2*n - 3 + (-1)^n + 2*(-1)^(n*(n-1)/2))/8.
a(n) = a(n-4) + 1, a(k)=0 for k=0,1,2,3, for n > 3. (End)

A035608 Expansion of g.f. x*(1 + 3*x)/((1 + x)*(1 - x)^3).

Original entry on oeis.org

0, 1, 5, 10, 18, 27, 39, 52, 68, 85, 105, 126, 150, 175, 203, 232, 264, 297, 333, 370, 410, 451, 495, 540, 588, 637, 689, 742, 798, 855, 915, 976, 1040, 1105, 1173, 1242, 1314, 1387, 1463, 1540, 1620, 1701, 1785, 1870, 1958, 2047, 2139, 2232, 2328, 2425, 2525, 2626
Offset: 0

Views

Author

Keywords

Comments

Maximum value of Voronoi's principal quadratic form of the first type when variables restricted to {-1,0,1}. - Michael Somos, Mar 10 2004
This is the main row of a version of the "square spiral" when read alternatively from left to right (see link). See also A001107, A007742, A033954, A033991. It is easy to see that the only prime in the sequence is 5. - Emilio Apricena (emilioapricena(AT)yahoo.it), Feb 08 2009
From Mitch Phillipson, Manda Riehl, Tristan Williams, Mar 06 2009: (Start)
a(n) gives the number of elements of S_2 \wr C_k that avoid the pattern 12, using the following ordering:
In S_j, a permutation p avoids a pattern q if it has no subsequence that is order-isomorphic to q. For example, p avoids the pattern 132 if it has no subsequence abc with a < c < b. We extend this notion to S_j \wr C_n as follows. Element psi =[ alpha_1^beta_1, ... alpha_j^beta_j ] avoids tau = [ a_1 ... a_m ] (tau in S_m) if psi' = [ alpha_1*beta_1 ... alpha_j*beta_j ] avoids tau in the usual sense. For n=2, there are 5 elements of S_2 \wr C_2 that avoid the pattern 12. They are: [ 2^1,1^1 ], [ 2^2,1^1 ], [ 2^2,1^2 ], [ 2^1,1^2 ], [ 1^2,2^1 ].
For example, if psi = [2^1,1^2], then psi'=[2,2] which avoids tau=[1,2] because no subsequence ab of psi' has a < b. (End)

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 115.

Crossrefs

Partial sums of A042948.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.

Programs

  • Magma
    [n^2 + n - 1 - Floor((n-1)/2): n in [0..25]]; // G. C. Greubel, Oct 29 2017
  • Maple
    A035608:=n->floor((n + 1/4)^2): seq(A035608(n), n=0..100); # Wesley Ivan Hurt, Oct 29 2017
  • Mathematica
    Table[n^2 + Floor[n/2], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, Apr 12 2011 *)
    CoefficientList[Series[x (1 + 3 x)/((1 + x) (1 - x)^3), {x, 0, 60}], x] (* or *) LinearRecurrence[{2, 0, -2, 1}, {0, 1, 5, 10}, 60] (* Harvey P. Dale, Feb 21 2013 *)
  • PARI
    a(n)=n^2+n-1-(n-1)\2
    

Formula

a(n) = n^2 + n - 1 - floor((n-1)/2).
a(n) = A011848(2*n+1).
a(n) = A002378(n) - A004526(n+1). - Reinhard Zumkeller, Jan 27 2010
a(n) = 2*A006578(n) - A002378(n)/2 = A139592(n)/2. - Reinhard Zumkeller, Feb 07 2010
a(n) = A002265(n+2) + A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n) = floor((n + 1/4)^2). - Reinhard Zumkeller, Jan 27 2010
a(n) = (-1)^n*Sum_{i=0..n} (-1)^i*(2*i^2 + 3*i + 1). Omits the leading 0. - William A. Tedeschi, Aug 25 2010
a(n) = n^2 + floor(n/2), from Mathematica section. - Vladimir Joseph Stephan Orlovsky, Apr 12 2011
a(0)=0, a(1)=1, a(2)=5, a(3)=10; for n > 3, a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Feb 21 2013
For n > 1: a(n) = a(n-2) + 4*n - 3; see also row sums of triangle A253146. - Reinhard Zumkeller, Dec 27 2014
a(n) = 3*A002620(n) + A002620(n+1). - R. J. Mathar, Jul 18 2015
From Amiram Eldar, Mar 20 2022: (Start)
Sum_{n>=1} 1/a(n) = 4 - 2*log(2) - Pi/3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 2*Pi/3 - 4*(1-log(2)). (End)
E.g.f.: (x*(2*x + 3)*cosh(x) + (2*x^2 + 3*x - 1)*sinh(x))/2. - Stefano Spezia, Apr 24 2024

A057353 a(n) = floor(3n/4).

Original entry on oeis.org

0, 0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 45, 45, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53, 54
Offset: 0

Views

Author

Keywords

Comments

The cyclic pattern (and numerator of the gf) is computed using Euclid's algorithm for GCD.
For n >= 2, a(n) is the number of different integers that can be written as floor(k^2/n) for k = 1, 2, 3, ..., n-1. Generalization of the 1st problem proposed during the 15th Balkan Mathematical Olympiad in 1998 where the question was asked for n = 1998 with a(1998) = 1498. - Bernard Schott, Apr 22 2022
For n > 1, a(n) is also the Hadwiger number of the (n+1)-cycle complement graph (up to at least n = 16). - Eric W. Weisstein, Mar 10 2025

References

  • N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1994.

Crossrefs

Programs

Formula

G.f.: (1+x+x^2)*x^2/((1-x)*(1-x^4)). - Bruce Corrigan (scentman(AT)myfamily.com), Jul 03 2002
For all m>=0 a(4m)=0 mod 3; a(4m+1)=0 mod 3; a(4m+2)= 1 mod 3; a(4m+3) = 2 mod 3
a(n) = A002378(n) - A173562(n). - Reinhard Zumkeller, Feb 21 2010
a(n+1) = A140201(n) - A002265(n+1). - Reinhard Zumkeller, Jan 26 2011
a(n) = n-1 - A002265(n-1) = ( A007310(n) + A057077(n+1) )/4 for n>0. a(n) = a(n-1)+a(n-4)-a(n-5) for n>4. - Bruno Berselli, Jan 28 2011
a(n) = 1/8*(6*n + 2*cos((Pi*n)/2) + cos(Pi*n) - 2*sin((Pi*n)/2) - 3). - Ilya Gutkovskiy, Sep 18 2015
a(4n) = a(4n+1). - Altug Alkan, Sep 26 2015
Sum_{n>=2} (-1)^n/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Sep 29 2022

A047624 Numbers that are congruent to {0, 1, 3, 5} mod 8.

Original entry on oeis.org

0, 1, 3, 5, 8, 9, 11, 13, 16, 17, 19, 21, 24, 25, 27, 29, 32, 33, 35, 37, 40, 41, 43, 45, 48, 49, 51, 53, 56, 57, 59, 61, 64, 65, 67, 69, 72, 73, 75, 77, 80, 81, 83, 85, 88, 89, 91, 93, 96, 97, 99, 101, 104, 105, 107, 109, 112, 113, 115, 117, 120, 121, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 1, 3, 5]]; // Wesley Ivan Hurt, Jun 01 2016
  • Maple
    A047624:=n->(8*n-11-I^(2*n)+I^(1-n)-I^(1+n))/4: seq(A047624(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Table[(8n-11-I^(2n)+I^(1-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, Jun 01 2016 *)
    LinearRecurrence[{1,0,0,1,-1},{0,1,3,5,8},100] (* G. C. Greubel, Jun 01 2016 *)

Formula

From Reinhard Zumkeller, Feb 21 2010: (Start)
a(n+1) = A173562(n) - A173562(n-1);
a(n+1) - a(n) = A140081(n-1) + 1;
a(n) = A140201(n-1) + A042948(A004526(n-1)). (End)
G.f.: x^2*(1+2*x+2*x^2+3*x^3) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (8*n-11-i^(2*n)+i^(1-n)-i^(1+n))/4 where i=sqrt(-1).
a(2k) = A016813(k-1) for k>0, a(2k-1) = A047470(k). (End)
E.g.f.: (6 + sin(x) + (4*x - 5)*sinh(x) + (4*x - 6)*cosh(x))/2. - Ilya Gutkovskiy, Jun 01 2016
Sum_{n>=2} (-1)^n/a(n) = (3-sqrt(2))*Pi/16 + (8-sqrt(2))*log(2)/16 + sqrt(2)*log(2+sqrt(2))/8. - Amiram Eldar, Dec 20 2021
Showing 1-4 of 4 results.