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-10 of 13 results. Next

A069905 Number of partitions of n into 3 positive parts.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 14, 16, 19, 21, 24, 27, 30, 33, 37, 40, 44, 48, 52, 56, 61, 65, 70, 75, 80, 85, 91, 96, 102, 108, 114, 120, 127, 133, 140, 147, 154, 161, 169, 176, 184, 192, 200, 208, 217, 225, 234, 243, 252, 261, 271, 280, 290, 300, 310, 320, 331, 341
Offset: 0

Views

Author

N. J. A. Sloane, May 04 2002

Keywords

Comments

Number of binary bracelets of n beads, 3 of them 0. For n >= 3, a(n-3) is the number of binary bracelets of n beads, 3 of them 0, with 00 prohibited. - Washington Bomfim, Aug 27 2008
Also number of partitions of n-3 into parts 1, 2, and 3. - Joerg Arndt, Sep 05 2013
Number of incongruent triangles with integer sides that have perimeter 2n-3 (see the Jordan et al. link). - Freddy Barrera, Aug 18 2018
Number of ordered triples (x,y,z) of nonnegative integers such that x+y+z=n and xDennis P. Walsh, Apr 19 2019
Number of incongruent triangles formed from any 3 vertices of a regular n-gon. - Frank M Jackson, Sep 11 2022
Also a(n-3) for n > 2, otherwise 0 is the number of incongruent scalene triangles formed from the vertices of a regular n-gon. - Frank M Jackson, Nov 27 2022

Examples

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

References

  • Ross Honsberger, Mathematical Gems III, Math. Assoc. Amer., 1985, p. 39.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.4, p. 410.
  • Donald E. Knuth, The Art of Computer Programming, vol. 4,fascicle 3, Generating All Combinations and Partitions, Section 7.2.1.4., p. 56, exercise 31.

Crossrefs

Another version of A001399, which is the main entry for this sequence.
Cf. A005044, A008284, A008615, A026810 (4 positive parts).

Programs

  • GAP
    List([0..70],n->NrPartitions(n,3)); # Muniru A Asiru, May 17 2018
    
  • Haskell
    a069905 n = a069905_list !! n
    a069905_list = scanl (+) 0 a008615_list
    -- Reinhard Zumkeller, Apr 28 2014
    
  • Magma
    [(n^2+6) div 12: n in [0..70]]; // Vincenzo Librandi, Oct 14 2015
    
  • Maple
    A069905 := n->round(n^2/12): seq(A069905(n), n=0..70);
  • Mathematica
    a[ n_]:= Round[ n^2 / 12] (* Michael Somos, Sep 04 2013 *)
    CoefficientList[Series[x^3/((1-x)(1-x^2)(1-x^3)), {x, 0, 70}], x] (* Vincenzo Librandi, Oct 14 2015 *)
    Drop[LinearRecurrence[{1,1,0,-1,-1,1}, Append[Table[0,{5}],1],70],2] (* Robert A. Russell, May 17 2018 *)
  • PARI
    a(n) = floor((n^2+6)/12);  \\ Washington Bomfim, Jul 03 2012
    
  • PARI
    my(x='x+O('x^70)); concat([0, 0, 0], Vec(x^3/((1-x)*(1-x^2)*(1-x^3)))) \\ Altug Alkan, Oct 14 2015
    
  • SageMath
    [round(n^2/12) for n in range(70)] # G. C. Greubel, Apr 03 2019

Formula

G.f.: x^3/((1-x)*(1-x^2)*(1-x^3)) = x^3/((1-x)^3*(1+x+x^2)*(1+x)).
a(n) = round(n^2/12).
a(n) = floor((n^2+6)/12). - Washington Bomfim, Jul 03 2012
a(-n) = a(n). - Michael Somos, Sep 04 2013
a(n) = a(n-1) + A008615(n-1) for n > 0. - Reinhard Zumkeller, Apr 28 2014
Let n = 6k + m. Then a(n) = n^2/12 + a(m) - m^2/12. Also, a(n) = 3*k^2 + m*k + a(m). Example: a(35) = a(6*5 + 5) = 35^2/12 + a(5) - 5^2/12 = 102 = 3*5^2 + 5*5 + a(5). - Gregory L. Simay, Oct 13 2015
a(n) = a(n-1) +a(n-2) -a(n-4) -a(n-5) +a(n-6), n>5. - Wesley Ivan Hurt, Oct 16 2015
a(n) = A008284(n,3). - Robert A. Russell, May 13 2018
a(n) = A005044(2*n) = A005044(2*n - 3). - Freddy Barrera, Aug 18 2018
a(n) = floor((n^2+k)/12) for all integers k such that 3 <= k <= 7. - Giacomo Guglieri, Apr 03 2019
From Wesley Ivan Hurt, Apr 19 2019: (Start)
a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} 1.
a(n) = Sum_{i=1..floor(n/3)} floor((n-i)/2) - i + 1. (End)
Sum_{n>=3} 1/a(n) = 15/4 + Pi^2/18 - Pi/(2*sqrt(3)) + tanh(Pi/(2*sqrt(3))) * Pi/sqrt(3). - Amiram Eldar, Sep 27 2022
E.g.f.: (8*exp(-x/2)*cos(sqrt(3)*x/2) + (3*x^2 + 3*x - 8)*cosh(x) + (3*x^2 + 3*x + 1)*sinh(x))/36. - Stefano Spezia, Apr 05 2023
From Ridouane Oudra, Dec 12 2024: (Start)
a(n) = (n^2 + 2*gcd(n,3) - 3*gcd(n,2))/12.
a(n) = (A198442(n) + A079978(n))/3.
a(n) = A000212(n) - A002620(n).
a(n) = A008133(n+1) - A307018(n+1). (End)
a(n) = (A309511(n) + A309513(n))/3. - Ray Chandler, Mar 13 2025

A030451 a(2*n) = n, a(2*n+1) = n+2.

Original entry on oeis.org

0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 11, 10, 12, 11, 13, 12, 14, 13, 15, 14, 16, 15, 17, 16, 18, 17, 19, 18, 20, 19, 21, 20, 22, 21, 23, 22, 24, 23, 25, 24, 26, 25, 27, 26, 28, 27, 29, 28, 30, 29, 31, 30, 32, 31, 33, 32, 34, 33, 35, 34, 36, 35, 37, 36, 38, 37
Offset: 0

Views

Author

Daniel Smith (2true(AT)gte.net)

Keywords

Comments

Previous name was: Once started, this mixes the natural numbers and the natural numbers shifted by 1.
Smallest number of integer-sided squares needed to tile a 2 X n rectangle. a(5) = 4:
..._...
| | |_|
|_|___||. - _Alois P. Heinz, Jun 12 2013

Crossrefs

Cf. A168361 (first differences), A198442 (partial sums).
Row m=2 of A113881, A219158.
Essentially the same as A028242.

Programs

  • Maple
    a:= n-> iquo(n, 2, 'r') +[0, 2][r+1]:
    seq(a(n), n=0..80);  # Alois P. Heinz, Jun 12 2013
  • Mathematica
    Riffle[# + 1, #] &@ Range[0, 37] (* or *)
    Table[3/4 - (-1)^n 3/4 + n/2, {n, 0, 72}] (* or *)
    CoefficientList[Series[(2 x - x^2)/((1 - x) (1 - x^2)), {x, 0, 72}], x] (* Michael De Vlieger, Apr 25 2016 *)
  • PARI
    a(n)=n\2+2*(n%2)

Formula

a(n) = 3/4 -(-1)^n*3/4 +n/2.
G.f.: (2*x-x^2)/((1-x)*(1-x^2)).
a(2n) = n, a(2n+1) = n+2.
a(n+2) = a(n)+1.
a(n) = -a(-3-n).
a(n) = A110570(n,2) for n>1. - Reinhard Zumkeller, Jul 28 2005
a(n) = (n+1)-a(n-1) with n>0, a(0)=0. - Vincenzo Librandi, Nov 18 2010
a(n) = Sum_{k=1..n} (-1)^(n+k)*(k+1). - Arkadiusz Wesolowski, Nov 23 2012
a(n+1) = (a(0) + a(1) + ... + a(n))/a(n) for n>0. This formula with different initial conditions produces A008619. - Ivan Neretin, Apr 25 2016
E.g.f.: (x*exp(x) + 3*sinh(x))/2. - Ilya Gutkovskiy, Apr 25 2016
Sum_{n>=1} (-1)^n/a(n) = 1. - Amiram Eldar, Oct 04 2022

Extensions

New name (using existing formula) from Joerg Arndt, Apr 26 2016

A214297 a(0)=-1, a(1)=0, a(2)=-3; thereafter a(n+2) - 2*a(n+1) + a(n) has period 4: repeat -4, 8, -4, 2.

Original entry on oeis.org

-1, 0, -3, 2, 3, 6, 5, 12, 15, 20, 21, 30, 35, 42, 45, 56, 63, 72, 77, 90, 99, 110, 117, 132, 143, 156, 165, 182, 195, 210, 221, 240, 255, 272, 285, 306, 323, 342, 357, 380, 399, 420, 437, 462, 483, 506, 525, 552, 575, 600, 621, 650, 675, 702, 725, 756, 783, 812, 837, 870, 899, 930, 957, 992, 1023, 1056, 1085, 1122, 1155, 1190
Offset: 0

Views

Author

Paul Curtz, Jul 11 2012

Keywords

Comments

Let a(n)/A000290(n) = [-1/0, 0/1, -3/4, 2/9, 3/16, 6/25, 5/36, 12/49, 15/64, 20/81, 21/100, 30/121, ...] = a(n)/b(n) (say).
Then b(n)-4*a(n)=4, 1, 16, 1 (period of length 4).
Permutation from a(n) to A061037(n): 1, 3, 2, 7, 5, 11, 4, 15, 9, 19, 6, ... = shifted A145979 + 1.
A061037(n) - a(n) = 0, 3, -3, -3, 0, -15, 3, -33, 0 -57, 15, -87, 0, -123, ...
First 3 rows:
-1 0 -3 2 3 6 5 12 15 20 21 30 35
1 -3 5 1 3 -1 7 3 5 1 9 5 7
-4 8 -4 2 -4 8 -4 2 -4 8 -4 2 -4.
Note that the terms of a(n) increase from 12. Compare to increasing terms permutation of A061037(n): -3,-1,0,2,3,5,6,12,15, .... and A129647.
c(n) = 0, -1, 0, -1, 2, 1, 2, 1, 4, 3, 4, 3, 6, 5, 6, 5, ... (cf. A134967)
d(n) = -1, 1, 1, 3, 1, 3, 3, 5, 3, 5, 5, 7, 5, 7, 7, 9, ..., hence:
a(n) = c(n+1) * d(n+1).

Programs

  • Magma
    [(2*n^2-11-9*(-1)^n+6*((-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4)))/8: n in [0..100]]; // G. C. Greubel, Sep 19 2018
  • Maple
    A214297 := proc(n)
        option remember;
        if n <=5 then
            op(n+1,[-1,0,-3,2,3,6]) ;
        else
            2*procname(n-1)-procname(n-2)+procname(n-4)-2*procname(n-5)+procname(n-6) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Table[(2 n^2 - 11 - 9 (-1)^n + 6 ((-1)^((2 n + 1 - (-1)^n)/4) + (-1)^((2 n - 1 + (-1)^n)/4)))/8, {n, 0, 69}] (* or *)
    CoefficientList[Series[-(1 - 2 x + 4 x^2 - 8 x^3 + 3 x^4)/((1 - x)^2*(1 - x^4)), {x, 0, 69}], x] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    vector(100, n, n--; (2*n^2-11-9*(-1)^n+6*((-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4)))/8) \\ G. C. Greubel, Sep 19 2018
    

Formula

a(k+4) - a(k) = 2*k + 4.
a(k+2) - a(k-2) = 2*k.
a(k+6) - a(k-6) = 6*k.
a(k+10) - a(k-10) = 10*k.
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12).
a(2*k) = -1, -3, followed by 3, 5, 15, 21, 35, 45, ... (A142717);
a(2*k+1) = k*(k+1) (see A002378).
A198442(n) = -1,0,0,2,3,6,8,12, minus 3 at A198442(4*n+2).
G.f. -( 1-2*x+4*x^2-8*x^3+3*x^4 )/( (1-x)^2*(1-x^4) ). - R. J. Mathar, Jul 17 2012; edited by N. J. A. Sloane, Jul 22 2012
From R. J. Mathar, Jun 28 2013: (Start)
a(4*k) = A000466(k);
a(4*k+1) = A002943(k);
a(4*k+2) = A078371(k-1) for k>0;
a(4*k+3) = A002939(k+1). (End)
a(n) = (2*n^2-11-9*(-1)^n+6*((-1)^((2*n+1-(-1)^n)/4)+(-1)^((2*n-1+(-1)^n)/4)))/8. - Luce ETIENNE, Oct 27 2016

Extensions

Edited by N. J. A. Sloane, Jul 22 2012

A226023 A142705 (numerators of 1/4-1/(4n^2)) sorted to natural order.

Original entry on oeis.org

0, 2, 3, 6, 12, 15, 20, 30, 35, 42, 56, 63, 72, 90, 99, 110, 132, 143, 156, 182, 195, 210, 240, 255, 272, 306, 323, 342, 380, 399, 420, 462, 483, 506, 552, 575, 600, 650, 675, 702, 756, 783, 812, 870, 899
Offset: 0

Views

Author

Paul Curtz, May 23 2013

Keywords

Comments

A198442(n) without indices 4*n+2.
a(n)/A130823(n+1) = 0, 2,3,2, 4,5,4, 6,7,6, 8,9,8, ... (equal to A133310+1, after 0; see also A008611).
-1, 0, 2, 3, is divisible by 1 (for a(-1)=-1),
3, 6, 12, 15, 3,
15, 20, 30, 35 5,
35, 42, 56, 63 7,
63, 72, 90, 99 9,
99, 110, 132, 143, 11, etc.
First column: A000466(n),
second column: A002943(n),
third column: A002939(n+1),
fourth column: A000466(n+1).
a(n) is also the numerator of 1/4-1/(4*n+2)^2: 0/1, 2/9, 3/16, 6/25, 12/49, 15/64, 20/81, 30/121, 35/144, 42/169, 56/225,...
The n-th denominator is equal to 4*a(n) + A146325(n+2).
Note that the differences of a(n-1): 1, 2, 1, 3, 6, 3, 5, 10, 5, 7, 14, 7, 9, 18, 9, 11, 22,... (from A043547 by pairs and 2*n+1) has the same recurrence.
(Of course every sequence which obeys a linear recurrence with constant coefficients has first differences that obey the same linear recurrence. - R. J. Mathar, Jun 14 2013)

Crossrefs

Trisections: A002939, A000466, A002943.

Programs

  • Maple
    A226023 := proc(n)
        option remember;
        if n <=6 then
            op(n+1,[0,2,3,6,12,15,20]) ;
        else
            procname(n-1)+2*procname(n-3)-2*procname(n-4)-procname(n-6)+procname(n-7) ;
        end if;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    A226023[n_]:=Floor[(2n+1)/3]Floor[(2n+5)/3];
    Array[A226023,100,0] (* Paolo Xausa, Dec 05 2023 *)

Formula

a(n) = floor( (2*n + 1)/3 ) * floor( (2*n + 5)/3 ) = A004396(n) * A004396(n+2).
Recurrences: a(n) = 3*a(n-3) -3*a(n-6) +a(n-9) = a(n-1) +2*a(n-3) -2*a(n-4) -a(n-6) +a(n-7).
a(n+15) - a(n) = 10*A042968(n+8).
a(n+1) - a(n-2) = 2*A042968(n) with a(-2)=0, a(-1)=-1.
G.f.: x*(2+x+3*x^2+2*x^3+x^4-x^5)/((1-x)^3 * (1+x+x^2)^2). [Ralf Stephan, May 24 2013]

A289296 a(n) = (n - 1)*(2*floor(n/2) + 1).

Original entry on oeis.org

-1, 0, 3, 6, 15, 20, 35, 42, 63, 72, 99, 110, 143, 156, 195, 210, 255, 272, 323, 342, 399, 420, 483, 506, 575, 600, 675, 702, 783, 812, 899, 930, 1023, 1056, 1155, 1190, 1295, 1332, 1443, 1482, 1599, 1640, 1763, 1806, 1935, 1980, 2115, 2162, 2303, 2352, 2499, 2550, 2703, 2756, 2915
Offset: 0

Views

Author

Keywords

Comments

Summing a(n) by pairs, one gets -1, 9, 35, 77, 135, ... = A033566.
A198442(k) is a member of this sequence if k == 0 or 1 (mod 4). - Bruno Berselli, Jul 04 2017

Crossrefs

Subsequence of A214297.

Programs

  • Mathematica
    Table[(n - 1) (2 Floor[n/2] + 1), {n, 0, 60}] (* or *) LinearRecurrence[{1, 2, -2, -1, 1}, {-1, 0, 3, 6, 15}, 61]
  • PARI
    a(n)=(n\2*2+1)*(n-1) \\ Charles R Greathouse IV, Jul 02 2017
    
  • PARI
    Vec(-(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2) + O(x^60)) \\ Colin Barker, Jul 02 2017
    
  • Python
    def A289296(n): return (n-1)*(n|1) # Chai Wah Wu, Jan 18 2023

Formula

a(n) = A023443(n) * A109613(n).
a(n) = n^2-1 if n is even and n^2-n if n is odd.
n^2 - a(n) = A093178(n).
From Colin Barker, Jul 02 2017: (Start)
G.f.: -(1 - x - 5*x^2 - x^3 - 2*x^4) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4. (End)

A184676 a(n) = n + floor((n/2-1/(4*n))^2); complement of A183867.

Original entry on oeis.org

1, 2, 5, 7, 11, 14, 19, 23, 29, 34, 41, 47, 55, 62, 71, 79, 89, 98, 109, 119, 131, 142, 155, 167, 181, 194, 209, 223, 239, 254, 271, 287, 305, 322, 341, 359, 379, 398, 419, 439, 461, 482, 505, 527, 551, 574, 599, 623, 649, 674, 701, 727, 755, 782, 811, 839
Offset: 1

Views

Author

Clark Kimberling, Jan 19 2011

Keywords

Comments

a(n) is also the number of trees with n vertices with diameter (n-3). - Erich Friedman, Apr 06 2017

Crossrefs

Programs

  • Magma
    [n+Floor((n/2-1/(4*n))^2): n in [1..60]]; // Vincenzo Librandi, Dec 09 2015
  • Maple
    seq(n+floor((n/2-1/(4*n))^2), n=1..56); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    a[n_]:=n+Floor[(n/2-1/(4n))^2];
    b[n_]:=n+Floor[n^(1/2)+(n+1/2)^(1/2)];
    Table[a[n],{n,1,120}]   (* A184676 *)
    Table[b[n],{n,1,120}]   (* A183867 *)
    FindLinearRecurrence[Table[a[n],{n,1,120}]]
    LinearRecurrence[{2,0,-2,1},{1,2,5,7},56] (* Ray Chandler, Aug 02 2015 *)
    Table[n + Floor[(n/2 - 1/(4 n))^2], {n, 60}] (* Vincenzo Librandi, Dec 09 2015 *)
    Table[Ceiling[n/2] (2 + Ceiling[n/2] - Mod[n, 2]) - 1, {n, 1, 56}] (* Fred Daniel Kline, Jun 24 2016 *)
  • PARI
    a(n) = n+floor((n/2-1/(4*n))^2); \\ Michel Marcus, Dec 09 2015
    

Formula

a(n) = n+floor((n/2-1/(4*n))^2).
a(n) = A198442(n+2)-1. - Fred Daniel Kline, Jun 24 2016
G.f.: x*(1 + x^2 - x^3)/((1 - x)^3*(1 + x)). - Ilya Gutkovskiy, Jun 24 2016

A255876 a(n) = (4*n^2 + 4*n - 3 - 3*(-1)^n)/2.

Original entry on oeis.org

4, 9, 24, 37, 60, 81, 112, 141, 180, 217, 264, 309, 364, 417, 480, 541, 612, 681, 760, 837, 924, 1009, 1104, 1197, 1300, 1401, 1512, 1621, 1740, 1857, 1984, 2109, 2244, 2377, 2520, 2661, 2812, 2961, 3120, 3277, 3444, 3609, 3784, 3957, 4140, 4321, 4512, 4701
Offset: 1

Views

Author

Wesley Ivan Hurt, Mar 08 2015

Keywords

Comments

Take an n X n square grid and add unit squares along each side except for the corners --> do this repeatedly along each side with the same restriction until no squares can be added. a(n) gives the number of vertices in each figure (see example and cf. A255840).

Examples

			                                                                 _
                                                               _|_|_
                            _              _ _               _|_|_|_|_
                          _|_|_          _|_|_|_           _|_|_|_|_|_|_
              _ _       _|_|_|_|_      _|_|_|_|_|_       _|_|_|_|_|_|_|_|_
    _        |_|_|     |_|_|_|_|_|    |_|_|_|_|_|_|     |_|_|_|_|_|_|_|_|_|
   |_|       |_|_|       |_|_|_|      |_|_|_|_|_|_|       |_|_|_|_|_|_|_|
                           |_|          |_|_|_|_|           |_|_|_|_|_|
                                          |_|_|               |_|_|_|
                                                                |_|
   n=1        n=2          n=3             n=4                  n=5
		

Crossrefs

Cf. A000290 (squares), A085046, A198442, A255840.

Programs

  • Magma
    [(4*n^2 + 4*n - 3 - 3*(-1)^n)/2 : n in [1..50]];
    
  • Maple
    A255876:=n->(4*n^2 + 4*n - 3 - 3*(-1)^n)/2: seq(A255876(n), n=1..50);
  • Mathematica
    CoefficientList[Series[(3 x^3 - 6 x^2 - x - 4)/((x + 1) (x - 1)^3), {x, 0, 50}], x]
    LinearRecurrence[{2,0,-2,1},{4,9,24,37},60] (* Harvey P. Dale, Dec 26 2024 *)
  • PARI
    vector(100,n,(4*n^2 + 4*n - 3 - 3*(-1)^n)/2) \\ Derek Orr, Mar 09 2015

Formula

G.f.: x*(3*x^3 - 6*x^2 - x - 4)/((x + 1)*(x - 1)^3).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
a(n) = A000290(n+1) + 4*A198442(n).

A218147 Degree of minimal polynomial satisfied by exp(8*Pi*phi_2(1/n,1/n)), where phi_2 is defined in the Comments.

Original entry on oeis.org

2, 2, 4, 4, 12, 8, 18, 8, 30, 16, 36, 24, 32, 32, 64, 36, 90, 32, 96, 60, 132, 64, 100, 72, 162, 96, 196, 64, 240, 128, 240, 128, 192, 144, 324, 180, 288, 128, 400, 192, 462, 240, 288, 264, 552, 256, 588, 200, 512, 288, 676, 324, 480, 384, 720, 392, 870, 256
Offset: 3

Views

Author

Jason Kimberley, Oct 21 2012 and Apr 04 2016

Keywords

Comments

Crandall defines phi_2(r_1,r_2) = (1/Pi^2) Sum_{positive & negative odd m_1, m_2} cos(Pi m_1 r_1) cos(Pi m_2 r_2) / (m_1^2+m_2^2).
Lemma: 4a(n) < n^2. Proof: 4a(2) = 2 < 2^2; 4a(4k+1) = 16k^2 < (4k+1)^2; 4a(4k+3) = (4k+2)(4k+4) = (4k+3)^2-1; 4a(p^2 k) = 4p^2 a(pk) < p^2(pk)^2 = (p^2 k)^2; 4 a(jk) = 4 a(j) 4 a(k) < (jk)^2.
Corollary: a(n) <= A198442(n).

References

  • R. Crandall, The Poisson equation and "natural" Madelung constants, preprint 2012 (see section 2 of BBCZ below).

Crossrefs

Programs

Formula

a(n) = A079458(n) / 4, for n > 2. - Jason Kimberley, Nov 14 2015
Watson Ladd has proved that the sequence satisfies the following recurrence relations, which were conjectured by Jason Kimberley:
a(1) = 1/4, a(2) = 1/2, for notational convenience;
a(4k+1) = (2k)*(2k) for prime 4k+1;
a(4k+3) = (2k+1)*(2k+2) for prime 4k+3;
a(p^2 k) = p^2 * a(p*k) for prime p;
a(jk) = 4*a(j)*a(k) for j coprime to k.

Extensions

Entry revised by N. J. A. Sloane, May 15 2016, to take into account the fact that the conjectured formula for this sequence has now been established by Watson Ladd.

A265611 a(n) = a(n-1) + floor((n-1)/2) - (-1)^n + 2 for n>=2, a(0)=1, a(1)=3.

Original entry on oeis.org

1, 3, 4, 8, 10, 15, 18, 24, 28, 35, 40, 48, 54, 63, 70, 80, 88, 99, 108, 120, 130, 143, 154, 168, 180, 195, 208, 224, 238, 255, 270, 288, 304, 323, 340, 360, 378, 399, 418, 440, 460, 483, 504, 528, 550, 575, 598, 624, 648, 675, 700, 728, 754, 783, 810, 840
Offset: 0

Views

Author

Peter Luschny, Dec 17 2015

Keywords

Crossrefs

Cf. A084964 and A097065, after the first 3: a(n+1) - a(n) for n>0.
Cf. A055998, after 3: a(n+1) + a(n) for n>0.
Cf. A063929: a(2*n+1) gives the second column of the triangle; for n>0, a(2*n) gives the third column.

Programs

  • Magma
    [1] cat [(2*n*(n+6)-5*(-1)^n+5)/8: n in [1..60]]; // Bruno Berselli, Dec 18 2015
  • Maple
    A265611 := proc(n) iquo(n+1,2); %*(%+irem(n+1,2)+2)+0^n end:
    seq(A265611(n), n=0..55);
  • Mathematica
    Join[{1}, Table[(2 n (n + 6) - 5 (-1)^n + 5)/8, {n, 1, 60}]] (* Bruno Berselli, Dec 18 2015 *)
  • PARI
    Vec((x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1) + O(x^1000)) \\ Altug Alkan, Dec 18 2015
    
  • Sage
    # The initial values x, y = 0, 1 give the quarter-squares A002620.
    def A265611():
        x, y = 1, 2
        while True:
           yield x
           x, y = x + y, x//y + 1
    a = A265611(); print([next(a) for i in range(60)])
    

Formula

O.g.f.: (x^4-2*x^3+2*x^2-x-1)/(x^4-2*x^3+2*x-1).
E.g.f.: 1-(5/8)*exp(-x)+(1/8)*(5+14*x+2*x^2)*exp(x).
a(2*n) = n*(n+3) + 0^n = A028552(n) + 0^n. [Here 0^0 = 1, otherwise 0^s = 0. - N. J. A. Sloane, Aug 26 2022]
a(2*n+1) = (n+1)*(n+3) = A005563(n+1).
a(n+1) - a(n) = floor(n/2) + 2 + (-1)^n - 0^n.
a(n) = a(-n-6) = (2*n*(n+6) - 5*(-1)^n + 5)/8 for n>0, a(0)=1. [Bruno Berselli, Dec 18 2015]
For n>0, a(n) = n + 1 + Sum_{i=1..n+1} floor(i/2) + (-1)^i = n + floor((n+1)^2/4) + (1 - (-1)^n)/2. - Enrique Pérez Herrero, Dec 18 2015
Sum_{n>=0} 1/a(n) = 85/36. - Enrique Pérez Herrero, Dec 18 2015
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>5. - R. H. Hardin, Dec 21 2015, proved by Susanne Wienand for the algorithm sent to the seqfan mailing list and used in the Sage script below.
a(n) = A002620(n+1) + A052928(n+1) for n>=1. (Note A198442(n) = A002620(n+2) - A052928(n+2) for n>=1.) - Peter Luschny, Dec 22 2015
a(n) = (floor((n+3)/2)-1)*(ceiling((n+3)/2)+1) for n>0. - Wesley Ivan Hurt, Mar 30 2017

A214630 a(n) is the reduced numerator of 1/4 - 1/A109043(n)^2 = (1 - 1/A026741(n)^2)/4.

Original entry on oeis.org

-1, 0, 0, 2, 3, 6, 2, 12, 15, 20, 6, 30, 35, 42, 12, 56, 63, 72, 20, 90, 99, 110, 30, 132, 143, 156, 42, 182, 195, 210, 56, 240, 255, 272, 72, 306, 323, 342, 90, 380, 399, 420, 110, 462, 483, 506, 132, 552, 575, 600, 156
Offset: 0

Views

Author

Paul Curtz, Jul 23 2012

Keywords

Comments

The unreduced fractions are -1/0, 0/4, 0/1, 8/36, 3/16, 24/100, 2/9, 48/196, 15/64, 80/324, 6/25, ... = c(n)/A061038(n), say.
Note that c(n)=A061037(n) + (period of length 2: repeat 0, 3).
c(n) is a permutation of A198442(n). The corresponding ranks are (the 0's have been swapped for convenience) 0,2,1,6,4,10,... = A145979(n-2).
Define the following sequences, satisfying the recurrence a(n) = 2*a(n-4) - a(n-8),
e(n) = -1, 0, 0, 2, 1, 4, 1, 6, 3, 8, 2, 10, 5, ... (after -1, a permutation of A004526(n) or mix A026741(n-1), 2*n),
f(n) = 1, 2, 1, 4, 3, 6, 2, 8, 5, 10, 3, 12, 7, ..., (another permutation of A004526(n+2) or mix A026741(n+1), 2*n+2).
f(n) - e(n) = periodic of period length 4: repeat 2, 2, 1, 2.
e(n) + f(n) = 0, 2, 1, 6, 4, 10, ... = A145979(n-2).
Then c(n) = e(n)*f(n).
Note that A061038(n) - 4*c(n) = periodic of period length 4: repeat 4, 4, 1, 4.
After division (by period 2: repeat 1, 4, A010685(n)), the reduced fractions of c(n) are -1/0, 0/1 ?, 0/4 ?, 2/9, 3/16, 6/25, 2/9, 12/49, 15/64, 20/81, 6/25, ... = a(n)/b(n).
Note that a(1+4*n) + a(2+4*n) + a(3+4*n) = 2,20,56,... = A002378(1+3*n) = A194767(3*n).
A061037(n-2) - a(n-2) = 0, -3, 0, -3, 0, 3, 0, 15, 0, 33, 0, 57, ... = Fip(n-2).
Fip(n-2)/3 = 0,-1,0,-1,0,1,0,5,0,11,0,19,0,29, .... Without 0's: A165900(n) (a Fibonacci polynomial); also -A110331(n+1) (Pell numbers).
g(n) = -1, 0, 0, 1, 1, 2, 1, 3, 3, 4, ... = mix A026741(n-1), n.
h(n) = 1, 1, 1, 2, 3, 3, 2, 4, 5, 5, ... = mix A026741(n+1), n+1.
h(n) - g(n) = (period 2: repeat 2, 1, 1, 1 = A177704(n-1)).
k(n) = 1, 1, 0, 2, 3, 3, 1, 4, 5, 5, ... = mix A174239(n), n+1.
l(n) = -1, 0, 1, 1, 1, 2, 2, 3, 3, 4, ... .
k(n) - l(n) = period 4: repeat 2, 1, -1, 1.
2) By the second formula in the definition, we take first 1 - 1/A026741(n)^2.
Hence, using a convention for the first fraction, -1/0, 0/1, 0/1, 8/9, 3/4, 24/25, 8/9, 48/49, 15/16, 80/81, 24/25, ... = (A005563(n-1) - A033996(n))/A168077(n) = q(n)/A168077(n).
For a(n), we divide by 4.
Note that A214297 is the reduced numerator of 1/4 - 1/A061038(n).
Note also that A168077(n) = A026741(n)^2.

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    CoefficientList[Series[(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((1-x)^3*(x+1)^3*(x^2+1)^3), {x, 0, 50}], x] (* G. C. Greubel, Sep 20 2018 *)
    LinearRecurrence[{0,0,0,3,0,0,0,-3,0,0,0,1},{-1,0,0,2,3,6,2,12,15,20,6,30},60] (* Harvey P. Dale, Jul 01 2019 *)
  • PARI
    Vec(-(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1)/((x-1)^3*(x+ 1)^3*(x^2+1)^3) + O(x^100)) \\ Colin Barker, Jan 22 2015
    

Formula

a(4*n) = 4*n^2-1 = (2*n-1)*(2*n+1), a(2*n+1) = a(4*n+2) = n(n+1).
a(n)= A198442(n)/(period of length 4: repeat 1,1,4,1=A010121(n+2)).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12). Is this the shortest possible recurrence? See A214297.
a(n+2) - a(n-2) = 0, 2, 4, 6, 2, 10, 12, 14, 4, ... = 2*A214392(n). a(-2)=a(-1)=0=a(1)=a(2).
a(n+4) - a(n-4) = 0, 4, 2, 12, 16, 20, 6, 28, 32, 36,... = 2*A188167(n). a(-4)=3=a(4), a(-3)=2=a(3).
a(n) = g(n) * h(n).
a(n) = k(n) * l(n).
G.f.: -(2*x^9+3*x^8+6*x^7+2*x^6+6*x^5+6*x^4+2*x^3-1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, Jan 22 2015
From Luce ETIENNE, Apr 08 2017: (Start)
a(n) = (13*n^2-28-3*(n^2+4)*(-1)^n+3*(n^2-4)*((-1)^((2*n-1+(-1)^n)/4)+(-1)^((2*n+1-(-1)^n)/4)))/64.
a(n) = (13*n^2-28-3*(n^2+4)*cos(n*Pi)+6*(n^2-4)*cos(n*Pi/2))/64. (End)

Extensions

Edited by N. J. A. Sloane, Aug 04 2012
Showing 1-10 of 13 results. Next