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-8 of 8 results.

A211422 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + x*y = 0.

Original entry on oeis.org

1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
Offset: 0

Views

Author

Clark Kimberling, Apr 10 2012

Keywords

Comments

Suppose that S={-n,...,0,...,n} and that f(w,x,y,n) is a function, where w,x,y are in S. The number of ordered triples (w,x,y) satisfying f(w,x,y,n)=0, regarded as a function of n, is a sequence t of nonnegative integers. Sequences such as t/4 may also be integer sequences for all except certain initial values of n. In the following guide, such sequences are indicated in the related sequences column and may be included in the corresponding Mathematica programs.
...
sequence... f(w,x,y,n) ..... related sequences
A211415 ... w^2+x*y-1 ...... t+2, t/4, (t/4-1)/4
A211422 ... w^2+x*y ........ (t-1)/8, A120486
A211423 ... w^2+2x*y ....... (t-1)/4
A211424 ... w^2+3x*y ....... (t-1)/4
A211425 ... w^2+4x*y ....... (t-1)/4
A211426 ... 2w^2+x*y ....... (t-1)/4
A211427 ... 3w^2+x*y ....... (t-1)/4
A211428 ... 2w^2+3x*y ...... (t-1)/4
A211429 ... w^3+x*y ........ (t-1)/4
A211430 ... w^2+x+y ........ (t-1)/2
A211431 ... w^3+(x+y)^2 .... (t-1)/2
A211432 ... w^2-x^2-y^2 .... (t-1)/8
A003215 ... w+x+y .......... (t-1)/2, A045943
A202253 ... w+2x+3y ........ (t-1)/2, A143978
A211433 ... w+2x+4y ........ (t-1)/2
A211434 ... w+2x+5y ........ (t-1)/4
A211435 ... w+4x+5y ........ (t-1)/2
A211436 ... 2w+3x+4y ....... (t-1)/2
A211435 ... 2w+3x+5y ....... (t-1)/2
A211438 ... w+2x+2y ....... (t-1)/2, A118277
A001844 ... w+x+2y ......... (t-1)/4, A000217
A211439 ... w+3x+3y ........ (t-1)/2
A211440 ... 2w+3x+3y ....... (t-1)/2
A028896 ... w+x+y-1 ........ t/6, A000217
A211441 ... w+x+y-2 ........ t/3, A028387
A182074 ... w^2+x*y-n ...... t/4, A028387
A000384 ... w+x+y-n
A000217 ... w+x+y-2n
A211437 ... w*x*y-n ........ t/4, A007425
A211480 ... w+2x+3y-1
A211481 ... w+2x+3y-n
A211482 ... w*x+w*y+x*y-w*x*y
A211483 ... (n+w)^2-x-y
A182112 ... (n+w)^2-x-y-w
...
For the following sequences, S={1,...,n}, rather than
{-n,...,0,...n}. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A132188 ... w^2-x*y
A211506 ... w^2-x*y-n
A211507 ... w^2-x*y+n
A211508 ... w^2+x*y-n
A211509 ... w^2+x*y-2n
A211510 ... w^2-x*y+2n
A211511 ... w^2-2x*y ....... t/2
A211512 ... w^2-3x*y ....... t/2
A211513 ... 2w^2-x*y ....... t/2
A211514 ... 3w^2-x*y ....... t/2
A211515 ... w^3-x*y
A211516 ... w^2-x-y
A211517 ... w^3-(x+y)^2
A063468 ... w^2-x^2-y^2 .... t/2
A000217 ... w+x-y
A001399 ... w-2x-3y
A211519 ... w-2x+3y
A008810 ... w+2x-3y
A001399 ... w-2x-3y
A008642 ... w-2x-4y
A211520 ... w-2x+4y
A211521 ... w+2x-4y
A000115 ... w-2x-5y
A211522 ... w-2x+5y
A211523 ... w+2x-5y
A211524 ... w-3x-5y
A211533 ... w-3x+5y
A211523 ... w+3x-5y
A211535 ... w-4x-5y
A211536 ... w-4x+5y
A008812 ... w+4x-5y
A055998 ... w+x+y-2n
A074148 ... 2w+x+y-2n
A211538 ... 2w+2x+y-2n
A211539 ... 2w+2x-y-2n
A211540 ... 2w-3x-4y
A211541 ... 2w-3x+4y
A211542 ... 2w+3x-4y
A211543 ... 2w-3x-5y
A211544 ... 2w-3x+5y
A008812 ... 2w+3x-5y
A008805 ... w-2x-2y (repeated triangular numbers)
A001318 ... w-2x+2y
A000982 ... w+x-2y
A211534 ... w-3x-3y
A211546 ... w-3x+3y (triply repeated triangular numbers)
A211547 ... 2w-3x-3y (triply repeated squares)
A082667 ... 2w-3x+3y
A055998 ... w-x-y+2
A001399 ... w-2x-3y+1
A108579 ... w-2x-3y+n
...
Next, S={-n,...-1,1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated inequality. If f(w,x,y,n) is linear in w,x,y,n, then the sequence is a linear recurrence sequence.
A211545 ... w+x+y>0; recurrence degree: 4
A211612 ... w+x+y>=0
A211613 ... w+x+y>1
A211614 ... w+x+y>2
A211615 ... |w+x+y|<=1
A211616 ... |w+x+y|<=2
A211617 ... 2w+x+y>0; recurrence degree: 5
A211618 ... 2w+x+y>1
A211619 ... 2w+x+y>2
A211620 ... |2w+x+y|<=1
A211621 ... w+2x+3y>0
A211622 ... w+2x+3y>1
A211623 ... |w+2x+3y|<=1
A211624 ... w+2x+2y>0; recurrence degree: 6
A211625 ... w+3x+3y>0; recurrence degree: 8
A211626 ... w+4x+4y>0; recurrence degree: 10
A211627 ... w+5x+5y>0; recurrence degree: 12
A211628 ... 3w+x+y>0; recurrence degree: 6
A211629 ... 4w+x+y>0; recurrence degree: 7
A211630 ... 5w+x+y>0; recurrence degree: 8
A211631 ... w^2>x^2+y^2; all terms divisible by 8
A211632 ... 2w^2>x^2+y^2; all terms divisible by 8
A211633 ... w^2>2x^2+2y^2; all terms divisible by 8
...
Next, S={1,...,n}, and the sequence counts the cases (w,x,y) satisfying the indicated relation.
A211634 ... w^2<=x^2+y^2
A211635 ... w^2A211790
A211636 ... w^2>=x^2+y^2
A211637 ... w^2>x^2+y^2
A211638 ... w^2+x^2+y^2
A211639 ... w^2+x^2+y^2<=n
A211640 ... w^2+x^2+y^2>n
A211641 ... w^2+x^2+y^2>=n
A211642 ... w^2+x^2+y^2<2n
A211643 ... w^2+x^2+y^2<=2n
A211644 ... w^2+x^2+y^2>2n
A211645 ... w^2+x^2+y^2>=2n
A211646 ... w^2+x^2+y^2<3n
A211647 ... w^2+x^2+y^2<=3n
A063691 ... w^2+x^2+y^2=n
A211649 ... w^2+x^2+y^2=2n
A211648 ... w^2+x^2+y^2=3n
A211650 ... w^3A211790
A211651 ... w^3>x^3+y^3; see Comments at A211790
A211652 ... w^4A211790
A211653 ... w^4>x^4+y^4; see Comments at A211790

Examples

			a(1) counts these 9 triples: (-1,-1,1), (-1, 1,-1), (0, -1, 0), (0, 0, -1), (0,0,0), (0,0,1), (0,1,0), (1,-1,1), (1,1,-1).
		

Crossrefs

Cf. A120486.

Programs

  • Mathematica
    t[n_] := t[n] = Flatten[Table[w^2 + x*y, {w, -n, n}, {x, -n, n}, {y, -n, n}]]
    c[n_] := Count[t[n], 0]
    t = Table[c[n], {n, 0, 70}] (* A211422 *)
    (t - 1)/8                   (* A120486 *)

A042965 Nonnegative integers not congruent to 2 mod 4.

Original entry on oeis.org

0, 1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 27, 28, 29, 31, 32, 33, 35, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 69, 71, 72, 73, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 88, 89, 91, 92
Offset: 1

Keywords

Comments

Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, (A, B) = 1, A <= B); sequence (starting at 3) gives values of AUB, sorted and duplicates removed. Values of AUBUC give same sequence. - David W. Wilson
These are the nonnegative integers that can be written as a difference of two squares, i.e., n = x^2 - y^2 for integers x,y. - Sharon Sela (sharonsela(AT)hotmail.com), Jan 25 2002. Equivalently, nonnegative numbers represented by the quadratic form x^2-y^2 of discriminant 4. The primes in this sequence are all the odd primes. - N. J. A. Sloane, May 30 2014
Numbers n such that Kronecker(4,n) == mu(gcd(4,n)). - Jon Perry, Sep 17 2002
Count, sieving out numbers of the form 2*(2*n+1) (A016825, "nombres pair-impairs"). A generalized Chebyshev transform of the Jacobsthal numbers: apply the transform g(x) -> (1/(1+x^2)) g(x/(1+x^2)) to the g.f. of A001045(n+2). Partial sums of 1,2,1,1,2,1,.... - Paul Barry, Apr 26 2005
For n>1, equals union of A020883 and A020884. - Lekraj Beedassy, Sep 28 2004
The sequence 1,1,3,4,5,... is the image of A001045(n+1) under the mapping g(x) -> g(x/(1+x^2)). - Paul Barry, Jan 16 2005
With offset 0 starting (1, 3, 4,...) = INVERT transform of A009531 starting (1, 2, -1, -4, 1, 6,...) with offset 0.
Apparently these are the regular numbers modulo 4 [Haukkanan & Toth]. - R. J. Mathar, Oct 07 2011
Numbers of the form x*y in nonnegative integers x,y with x+y even. - Michael Somos, May 18 2013
Convolution of A106510 with A000027. - L. Edson Jeffery, Jan 24 2015
Numbers that are the sum of zero or more consecutive odd positive numbers. - Gionata Neri, Sep 01 2015
Numbers that are congruent to {0, 1, 3} mod 4. - Wesley Ivan Hurt, Jun 10 2016
Nonnegative integers of the form (2+(3*m-2)/4^j)/3, j,m >= 0. - L. Edson Jeffery, Jan 02 2017
This is { x^2 - y^2; x >= y >= 0 }; with the restriction x > y one gets the same set without zero; with the restriction x > 0 (i.e., differences of two nonzero squares) one gets the set without 1. An odd number 2n-1 = n^2 - (n-1)^2, a number 4n = (n+1)^2 - (n-1)^2. - M. F. Hasler, May 08 2018

Examples

			G.f. = x^2 + 3*x^3 + 4*x^4 + 5*x^5 + 7*x^6 + 8*x^7 + 9*x^8 + 11*x^9 + 12*x^10 + ...
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section D9.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 83.

Crossrefs

Essentially the complement of A016825.
See A267958 for these numbers multiplied by 4.

Programs

  • Haskell
    a042965 =  (`div` 3) . (subtract 3) . (* 4)
    a042965_list = 0 : 1 : 3 : map (+ 4) a042965_list
    -- Reinhard Zumkeller, Nov 09 2012
    
  • Magma
    [n: n in [0..100] | not n mod 4 in [2]]; // Vincenzo Librandi, Sep 03 2015
    
  • Maple
    a_list := proc(len) local rec; rec := proc(n) option remember;
    ifelse(n <= 4, [0, 1, 3, 4][n], rec(n-1) + rec(n-3) - rec(n-4)) end:
    seq(rec(n), n=1..len) end: a_list(76); # Peter Luschny, Aug 06 2022
  • Mathematica
    nn=100; Complement[Range[0,nn], Range[2,nn,4]] (* Harvey P. Dale, May 21 2011 *)
    f[n_]:=Floor[(4*n-3)/3]; Array[f,70] (* Robert G. Wilson v, Jun 26 2012 *)
    LinearRecurrence[{1, 0, 1, -1}, {0, 1, 3, 4}, 70] (* L. Edson Jeffery, Jan 21 2015 *)
    Select[Range[0, 100], ! MemberQ[{2}, Mod[#, 4]] &] (* Vincenzo Librandi, Sep 03 2015 *)
  • PARI
    a(n)=(4*n-3)\3 \\ Charles R Greathouse IV, Jul 25 2011
    
  • Python
    def A042965(n): return (n<<2)//3-1 # Chai Wah Wu, Feb 10 2025

Formula

Recurrence: a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = n - 1 + (3n-3-sqrt(3)*(1-2*cos(2*Pi*(n-1)/3))*sin(2*Pi*(n-1)/3))/9. Partial sums of the period-3 sequence 0, 1, 1, 2, 1, 1, 2, 1, 1, 2, ... (A101825). - Ralf Stephan, May 19 2013
G.f.: A(x) = x^2*(1+x)^2/((1-x)^2*(1+x+x^2)); a(n)=Sum{k=0..floor(n/2)}, binomial(n-k-1, k)*A001045(n-2*k), n>0. - Paul Barry, Jan 16 2005, R. J. Mathar, Dec 09 2009
a(n) = floor((4*n-3)/3). - Gary Detlefs, May 14 2011
A214546(a(n)) != 0. - Reinhard Zumkeller, Jul 20 2012
From Michael Somos, May 18 2013: (Start)
Euler transform of length 3 sequence [3, -2, 1].
a(2-n) = -a(n). (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = (12*n-12+3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 4k-1, a(3k-1) = 4k-3, a(3k-2) = 4k-4. (End)
a(n) = round((4*n-4)/3). - Mats Granvik, Sep 24 2016
The g.f. A(x) satisfies (A(x)/x)^2 + A(x)/x = x*B(x)^2, where B(x) is the o.g.f. of A042968. - Peter Bala, Apr 12 2017
Sum_{n>=2} (-1)^n/a(n) = log(sqrt(2)+2)/sqrt(2) - (sqrt(2)-1)*log(2)/4. - Amiram Eldar, Dec 05 2021
From Peter Bala, Aug 03 2022: (Start)
a(n) = a(floor(n/2)) + a(1 + ceiling(n/2)) for n >= 2, with a(2) = 1 and a(3) = 3.
a(2*n) = a(n) + a(n+1); a(2*n+1) = a(n) + a(n+2). Cf. A047222 and A006165. (End)
E.g.f.: (9 + 12*exp(x)*(x - 1) + exp(-x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Apr 05 2023

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Peter Pein and Ralf Stephan, Jun 17 2007
Typos fixed in Gary Detlefs's formula and in PARI program by Reinhard Zumkeller, Nov 09 2012

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

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 35, 45, 57, 70, 84, 100, 117, 135, 155, 176, 198, 222, 247, 273, 301, 330, 360, 392, 425, 459, 495, 532, 570, 610, 651, 693, 737, 782, 828, 876, 925, 975, 1027, 1080, 1134, 1190, 1247, 1305, 1365, 1426, 1488, 1552, 1617, 1683, 1751, 1820, 1890
Offset: 0

Keywords

Comments

From Paul Curtz, Oct 07 2018: (Start)
Terms that are on the x-axis of the following spiral (without 0):
28--29--29--30--31--31--32
|
27 13--14--15--15--16--17
| | |
27 13 4---5---5---6 17
| | | | |
26 12 3 0---1 7 18
| | | | | |
25 11 3---2---1 7 19
| | | |
25 11--10---9---9---8 19
| |
24--23--23--22--21--21--20 (End)
Diagonal 1, 4, 8, 13, 20, 28, ... (without 0) is A143978. - Bruno Berselli, Oct 08 2018

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A004773 (first differences), A092498 (partial sums).

Programs

  • Haskell
    a000969 = flip div 3 . a014105 . (+ 1)  -- Reinhard Zumkeller, Jun 23 2015
    
  • Magma
    [Floor(Binomial(2*n+3,2)/3): n in [0..60]]; // G. C. Greubel, Apr 18 2023
    
  • Maple
    A000969:=-(1+z+2*z**2)/(z**2+z+1)/(z-1)**3; # Simon Plouffe in his 1992 dissertation
  • Mathematica
    f[x_, y_]:= Floor[Abs[y/x -x/y]]; Table[f[3, 2n^2+n+2], {n,53}] (* Robert G. Wilson v, Aug 11 2010 *)
    CoefficientList[Series[(1+x+2*x^2)/((1-x)^2*(1-x^3)), {x, 0, 50}], x] (* Stefano Spezia, Oct 08 2018 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,-2,1,-1,2]^n*[1;3;7;12;18])[1,1] \\ Charles R Greathouse IV, May 10 2016
    
  • SageMath
    [(binomial(2*n+3,2)//3) for n in range(61)] # G. C. Greubel, Apr 18 2023

Formula

a(n) = floor( (2*n+3)*(n+1)/3 ). Or, a(n) = (2*n+3)*(n+1)/3 but subtract 1/3 if n == 1 mod 3. - N. J. A. Sloane, May 05 2010
a(2^k-2) = A139250(2^k-1), k >= 1. - Omar E. Pol, Feb 13 2010
a(n) = Sum_{i=0..n} floor(4*i/3). - Enrique Pérez Herrero, Apr 21 2012
a(n) = +2*a(n-1) -1*a(n-2) +1*a(n-3) -2*a(n-4) +1*a(n-5). - Joerg Arndt, Apr 22 2012
a(n) = A014105(n+1) = A258708(n+3,n). - Reinhard Zumkeller, Jun 23 2015
Sum_{n>=0} 1/a(n) = 6 - Pi/sqrt(3) - 10*log(2)/3. - Amiram Eldar, Oct 01 2022
E.g.f.: (exp(x)*(8 + 21*x + 6*x^2) + exp(-x/2)*(cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Apr 05 2023

A229154 The clubs patterns appearing in n X n coins, with rotation allowed.

Original entry on oeis.org

1, 2, 5, 8, 12, 16, 21, 27, 33, 40, 48, 56, 65, 75, 85, 96, 108, 120, 133, 147, 161, 176, 192, 208, 225, 243, 261, 280, 300, 320, 341, 363, 385, 408, 432, 456, 481, 507, 533, 560, 588, 616, 645, 675, 705, 736, 768, 800, 833, 867, 901, 936, 972, 1008, 1045
Offset: 2

Author

Kival Ngaokrajang, Sep 15 2013

Keywords

Comments

On the Japanese TV show "Tsuki no Koibito", a girl told her boyfriend that she saw a heart in 4 coins. Actually there are a total of 6 distinct patterns appearing in 2 X 2 coins in which each pattern consists of a part of the perimeter of each coin and forms a continuous area.
a(n) is the number of clubs patterns appearing in n X n coins with rotation allowed. It is also A000212, except for the fourth term. The number of inverse patterns (stars or voids between clubs) is A143978 (except for the first term).

Crossrefs

Cf. A000212, A143978, A074148 (Heart patterns), A227906, A229093 (Clubs pattern, fixed Orientation).

Programs

  • Mathematica
    CoefficientList[Series[-(x^6 - 2 x^5 + x^4 - x^3 + 2 x^2 + 1)/((x - 1)^3 (x^2 + x + 1)), {x, 0, 60}], x] (* Vincenzo Librandi, Oct 08 2013 *)
  • PARI
    Vec(-x^2*(x^6-2*x^5+x^4-x^3+2*x^2+1)/((x-1)^3*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Oct 08 2013

Formula

a(n) = floor(n^2/3), a(3) = 2.
From Colin Barker, Oct 08 2013: (Start)
a(n) = n^2/3 + (2/9)*cos((2*Pi*n)/3) - 2/9.
G.f.: -x^2*(x^6-2*x^5+x^4-x^3+2*x^2+1) / ((x-1)^3*(x^2+x+1)). (End)

Extensions

More terms from Colin Barker, Oct 08 2013

A281026 a(n) = floor(3*n*(n+1)/4).

Original entry on oeis.org

0, 1, 4, 9, 15, 22, 31, 42, 54, 67, 82, 99, 117, 136, 157, 180, 204, 229, 256, 285, 315, 346, 379, 414, 450, 487, 526, 567, 609, 652, 697, 744, 792, 841, 892, 945, 999, 1054, 1111, 1170, 1230, 1291, 1354, 1419, 1485, 1552, 1621, 1692, 1764, 1837, 1912, 1989, 2067, 2146
Offset: 0

Author

Bruno Berselli, Jan 13 2017

Keywords

Crossrefs

Subsequence of A214068.
Partial sums of A047273.
Cf. A011865, A045943, A274757 (subsequence).
Cf. sequences with formula floor(k*n*(n+1)/4): A011848 (k=1), A000217 (k=2), this sequence (k=3), A002378 (k=4).
Cf. sequences with formula floor(k*n*(n+1)/(k+1)): A000217 (k=1), A143978 (k=2), this sequence (k=3), A281151 (k=4), A194275 (k=5).

Programs

  • Magma
    [3*n*(n+1) div 4: n in [0..60]];
  • Maple
    A281026:=n->floor(3*n*(n+1)/4): seq(A281026(n), n=0..100); # Wesley Ivan Hurt, Jan 13 2017
  • Mathematica
    Table[Floor[3 n (n + 1)/4], {n, 0, 60}]
    LinearRecurrence[{3,-4,4,-3,1},{0,1,4,9,15},60] (* Harvey P. Dale, Jun 04 2023 *)
  • Maxima
    makelist(floor(3*n*(n+1)/4), n, 0, 60);
    
  • PARI
    vector(60, n, n--; floor(3*n*(n+1)/4))
    
  • Python
    [int(3*n*(n+1)/4) for n in range(60)]
    
  • Sage
    [floor(3*n*(n+1)/4) for n in range(60)]
    

Formula

O.g.f.: x*(1 + x + x^2)/((1 + x^2)*(1 - x)^3).
E.g.f.: -(1 - 6*x - 3*x^2)*exp(x)/4 - (1 + i)*(i - exp(2*i*x))*exp(-i*x)/8, where i=sqrt(-1).
a(n) = a(-n-1) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) = a(n-4) + 6*n - 9.
a(n) = 3*n*(n+1)/4 + (i^(n*(n+1)) - 1)/4. Therefore:
a(4*k+r) = 12*k^2 + 3*(2*r+1)*k + r^2, where 0 <= r <= 3.
a(n) = n^2 - floor((n-1)*(n-2)/4).
a(n) = A011865(3*n+2).

A202253 Number of zero-sum -n..n arrays of 3 elements with adjacent element differences also in -n..n.

Original entry on oeis.org

3, 9, 17, 27, 41, 57, 75, 97, 121, 147, 177, 209, 243, 281, 321, 363, 409, 457, 507, 561, 617, 675, 737, 801, 867, 937, 1009, 1083, 1161, 1241, 1323, 1409, 1497, 1587, 1681, 1777, 1875, 1977, 2081, 2187, 2297, 2409, 2523, 2641, 2761, 2883, 3009, 3137, 3267
Offset: 1

Author

R. H. Hardin, Dec 14 2011

Keywords

Comments

Row 3 of A202252.
It appears that A202253 is also the number of ordered triples (w,x,y) with all terms in {-n,...,n} such that w+2x+3y=0; see the Mathematica and Example sections. - Clark Kimberling, Apr 10 2012

Examples

			Some solutions for n=10:
   7   9   6   4  -2   3  -3  -8   3   8   0  -6   1  -6  -3  -5
   0   0  -3   0   6   2   2   0   0  -2  -3   1   1   2   4   5
  -7  -9  -3  -4  -4  -5   1   8  -3  -6   3   5  -2   4  -1   0
The a(2)=9 solutions (w,x,y) of w+2x+3y=0, as described in the Comments section, are as follows: (-2,-2,2), (-2,1,0), (-1,-1,1), (-1,2,-1), (0,0,0), (1,-2,1), (1,1,-1), (2,-1,0), (2,2,-2). - _Clark Kimberling_, Apr 10 2012
		

Crossrefs

Cf. A202252.

Programs

  • Mathematica
    t[n_]:=t[n]=Flatten[Table[w+2x+3y,{w,-n,n},
    {x,-n,n},{y,-n,n}]]
    c[n_]:=Count[t[n],0]
    t=Table[c[n],{n,1,50}] (* A143978 ? *)
    (t-1)/2 (* A143978 *)
    (* Clark Kimberling, Apr 10 2012 *)

Formula

Empirical: a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
Conjecture: a(n) = 1+2*floor((2*n^2+2*n)/3). - Clark Kimberling, Apr 12 2012
Empirical g.f.: x*(3 + 3*x + 2*x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Mar 03 2018

A281151 a(n) = floor(4*n*(n+1)/5).

Original entry on oeis.org

0, 1, 4, 9, 16, 24, 33, 44, 57, 72, 88, 105, 124, 145, 168, 192, 217, 244, 273, 304, 336, 369, 404, 441, 480, 520, 561, 604, 649, 696, 744, 793, 844, 897, 952, 1008, 1065, 1124, 1185, 1248, 1312, 1377, 1444, 1513, 1584, 1656, 1729, 1804, 1881, 1960, 2040, 2121, 2204, 2289
Offset: 0

Author

Bruno Berselli, Jan 16 2017

Keywords

Crossrefs

Subsequence of A047462.
Partial sums of A047486.
Cf. A184005: n^2 - floor((n-2)^2/4).
Cf. sequences with formula floor(k*n*(n+1)/(k+1)): A000217 (k=1), A143978 (k=2), A281026 (k=3), this sequence (k=4), A194275 (k=5).

Programs

  • Magma
    [4*n*(n+1) div 5: n in [0..60]];
  • Mathematica
    Table[Floor[4 n (n + 1)/5], {n, 0, 60}]
  • Maxima
    makelist(floor(4*n*(n+1)/5), n, 0, 60);
    
  • PARI
    vector(60, n, n--; floor(4*n*(n+1)/5))
    
  • Python
    [int(4*n*(n+1)/5) for n in range(60)]
    
  • Sage
    [floor(4*n*(n+1)/5) for n in range(60)]
    

Formula

O.g.f.: x*(1 + x^2)*(1 + x)^2/((1 - x)^3*(1 + x + x^2 + x^3 + x^4)).
a(n) = a(-n-1) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7) = a(n-5) + 8*(n-2).
a(5*k+r) = 20*k^2 + 4*(2*r+1)*k + r^2, where 0 <= r <= 4. Example: for r=3, a(5*k+3) = (2*k+1)*(10*k+9), which gives: 9, 57, 145, 273, 441, 649 etc. Also, a(n) belongs to A047462, in fact: for r = 0 or 4, a(n) == 0 (mod 8); for r = 1 or 3, a(n) == 1 (mod 8); for r = 2, a(n) == 4 (mod 8).
a(n) = a(-n) + A047462(n).
a(n) = n^2 - floor((n-2)^2/5).

A320259 Terms that are on the y-axis of the square spiral built with 2*k, 2*k+1, 2*k+1 for k >= 0.

Original entry on oeis.org

0, 2, 5, 9, 15, 22, 30, 40, 51, 63, 77, 92, 108, 126, 145, 165, 187, 210, 234, 260, 287, 315, 345, 376, 408, 442, 477, 513, 551, 590, 630, 672, 715, 759, 805, 852, 900, 950, 1001, 1053, 1107, 1162, 1218, 1276, 1335
Offset: 0

Author

Paul Curtz, Oct 08 2018

Keywords

Comments

a(n) mod 9 is of period 27.
The spiral:
28--29--29--30--31--31--32
|
27 13--14--15--15--16--17
| | |
27 13 4---5---5---6 17
| | | | |
26 12 3 0---1 7 18
| | | | | |
25 11 3---2---1 7 19
| | | |
25 11--10---9---9---8 19
| |
24--23--23--22--21--21--20

Examples

			G.f. = 2*x + 5*x^2 + 9*x^3 + 15*x^4 + 22*x^5 + 30*x^6 + ... - _Michael Somos_, Nov 13 2018
		

Crossrefs

Cf. A000969, A004396, A004523, A004767, A004772 (first differences), A211480, A002264, A143978.

Programs

  • GAP
    a:=[0,2,5,9,15];; for n in [6..50] do a[n]:=2*a[n-1]-a[n-2]+a[n-3]-2*a[n-4]+a[n-5]; od; a; # Muniru A Asiru, Oct 08 2018
  • Maple
    seq(coeff(series(x^2*(2+x+x^2)/((1-x)^3*(1+x+x^2)),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Oct 08 2018
  • Mathematica
    LinearRecurrence[{2,-1,1,-2,1}, {0, 2, 5, 9, 15}, 50] (* or *)
    CoefficientList[Series[x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 09 2018 *)
    a[ n_] := Quotient[(n + 1) (2 n + 1), 3]; (* Michael Somos, Nov 13 2018 *)
  • PARI
    concat(0, Vec(x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)) + O(x^60))) \\ Colin Barker, Oct 08 2018
    
  • PARI
    {a(n) = (n + 1) * (2*n + 1) \ 3}; /* Michael Somos, Nov 13 2018 */
    

Formula

a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5), a(0)=0, a(1)=2, a(2)=5, a(3)=9, a(4)=15.
a(n) = a(n-1) + A004772(n+1), a(0)=0, n>0.
a(n+15) = a(n-15) + 10*A004767(n).
a(-n-1) = ({0} U A000969(n)) = 0, 1, 3, 7, ... = b(n), the full x-axis terms.
a(-n-1) + a(n) = 0, 3, 8, 16, ... = A211480(n+1).
a(n) = b(n) + A004523(n+1).
G.f.: x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Oct 08 2018
a(n) = A143978(n) + A002264(n+2).
a(n) = A000969(-2-n) for all n in Z. - Michael Somos, Nov 13 2018
Showing 1-8 of 8 results.