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 26 results. Next

A014682 The Collatz or 3x+1 function: a(n) = n/2 if n is even, otherwise (3n+1)/2.

Original entry on oeis.org

0, 2, 1, 5, 2, 8, 3, 11, 4, 14, 5, 17, 6, 20, 7, 23, 8, 26, 9, 29, 10, 32, 11, 35, 12, 38, 13, 41, 14, 44, 15, 47, 16, 50, 17, 53, 18, 56, 19, 59, 20, 62, 21, 65, 22, 68, 23, 71, 24, 74, 25, 77, 26, 80, 27, 83, 28, 86, 29, 89, 30, 92, 31, 95, 32, 98, 33, 101, 34, 104
Offset: 0

Views

Author

Keywords

Comments

This is the function usually denoted by T(n) in the literature on the 3x+1 problem. See A006370 for further references and links.
Intertwining of sequence A016789 '2,5,8,11,... ("add 3")' and the nonnegative integers.
a(n) = log_2(A076936(n)). - Amarnath Murthy, Oct 19 2002
The average value of a(0), ..., a(n-1) is A004526(n). - Amarnath Murthy, Oct 19 2002
Partial sums are A093353. - Paul Barry, Mar 31 2008
Absolute first differences are essentially in A014681 and A103889. - R. J. Mathar, Apr 05 2008
Only terms of A016789 occur twice, at positions given by sequences A005408 (odd numbers) and A016957 (6n+4): (1,4), (3,10), (5,16), (7,22), ... - Antti Karttunen, Jul 28 2017
a(n) represents the unique congruence class modulo 2n+1 that is represented an odd number of times in any 2n+1 consecutive oblong numbers (A002378). This property relates to Jim Singh's 2018 formula, as n^2 + n is a relevant oblong number. - Peter Munn, Jan 29 2022

Examples

			a(3) = -3*(-1) - 2*1 - 1*(-1) - 0*1 + 1*(-1) + 2*1 + 3*(-1) + 4*1 + 5*(-1) + 6*1 = 5. - _Bruno Berselli_, Dec 14 2015
		

References

  • J. C. Lagarias, ed., The Ultimate Challenge: The 3x+1 Problem, Amer. Math. Soc., 2010.

Crossrefs

Programs

  • Haskell
    a014682 n = if r > 0 then div (3 * n + 1) 2 else n'
                where (n', r) = divMod n 2
    -- Reinhard Zumkeller, Oct 03 2014
    
  • Magma
    [IsOdd(n) select (3*n+1)/2 else n/2: n in [0..52]]; // Vincenzo Librandi, Sep 28 2018
  • Maple
    T:=proc(n) if n mod 2 = 0 then n/2 else (3*n+1)/2; fi; end; # N. J. A. Sloane, Jan 31 2011
    A076936 := proc(n) option remember ; local apr,ifr,me,i,a ; if n <=2 then n^2 ; else apr := mul(A076936(i),i=1..n-1) ; ifr := ifactors(apr)[2] ; me := -1 ; for i from 1 to nops(ifr) do me := max(me, op(2,op(i,ifr))) ; od ; me := me+ n-(me mod n) ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1,op(i,ifr))^(me-op(2,op(i,ifr))) ; od ; if a = A076936(n-1) then me := me+n ; a := 1 ; for i from 1 to nops(ifr) do a := a*op(1,op(i,ifr))^(me-op(2,op(i,ifr))) ; od ; fi ; RETURN(a) ; fi ; end: A014682 := proc(n) log[2](A076936(n)) ; end: for n from 1 to 85 do printf("%d, ",A014682(n)) ; od ; # R. J. Mathar, Mar 20 2007
  • Mathematica
    Collatz[n_?OddQ] := (3n + 1)/2; Collatz[n_?EvenQ] := n/2; Table[Collatz[n], {n, 0, 79}] (* Alonso del Arte, Apr 21 2011 *)
    LinearRecurrence[{0, 2, 0, -1}, {0, 2, 1, 5}, 70] (* Jean-François Alcover, Sep 23 2017 *)
    Table[If[OddQ[n], (3 n + 1) / 2, n / 2], {n, 0, 60}] (* Vincenzo Librandi, Sep 28 2018 *)
  • PARI
    a(n)=if(n%2,3*n+1,n)/2 \\ Charles R Greathouse IV, Sep 02 2015
    
  • PARI
    a(n)=if(n<2,2*n,(n^2-n-1)%(2*n+1)) \\ Jim Singh, Sep 28 2018
    
  • Python
    def a(n): return n//2 if n%2==0 else (3*n + 1)//2
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 29 2017
    

Formula

From Paul Barry, Mar 31 2008: (Start)
G.f.: x*(2 + x + x^2)/(1-x^2)^2.
a(n) = (4*n+1)/4 - (2*n+1)*(-1)^n/4. (End)
a(n) = -a(n-1) + a(n-2) + a(n-3) + 4. - John W. Layman
For n > 1 this is the image of n under the modified "3x+1" map (cf. A006370): n -> n/2 if n is even, n -> (3*n+1)/2 if n is odd. - Benoit Cloitre, May 12 2002
O.g.f.: x*(2+x+x^2)/((-1+x)^2*(1+x)^2). - R. J. Mathar, Apr 05 2008
a(n) = 5/4 + (1/2)*((-1)^n)*n + (3/4)*(-1)^n + n. - Alexander R. Povolotsky, Apr 05 2008
a(n) = Sum_{i=-n..2*n} i*(-1)^i. - Bruno Berselli, Dec 14 2015
a(n) = Sum_{k=0..n-1} Sum_{i=0..k} C(i,k) + (-1)^k. - Wesley Ivan Hurt, Sep 20 2017
a(n) = (n^2-n-1) mod (2*n+1) for n > 1. - Jim Singh, Sep 26 2018
The above formula can be rewritten to show a pattern: a(n) = (n*(n+1)) mod (n+(n+1)). - Peter Munn, Jan 29 2022
Binary: a(n) = (n shift left (n AND 1)) - (n shift right 1) = A109043(n) - A004526(n). - Rudi B. Stranden, Jun 15 2021
From Rudi B. Stranden, Mar 21 2022: (Start)
a(n) = A064455(n+1) - 1, relating the number ON cells in row n of cellular automaton rule 54.
a(n) = 2*n - A071045(n).
(End)
E.g.f.: (1 + x)*sinh(x)/2 + 3*x*cosh(x)/2 = ((4*x+1)*e^x + (2*x-1)*e^(-x))/4. - Rénald Simonetto, Oct 20 2022
a(n) = n*(n mod 2) + ceiling(n/2) = A193356(n) + A008619(n+1). - Jonathan Shadrach Gilbert, Mar 12 2023
a(n) = 2*a(n-2) - a(n-4) for n > 3. - Chai Wah Wu, Apr 17 2024

Extensions

Edited by N. J. A. Sloane, Apr 26 2008, at the suggestion of Artur Jasinski
Edited by N. J. A. Sloane, Jan 31 2011

A079326 a(n) = the largest number m such that if m monominoes are removed from an n X n square then an L-tromino must remain.

Original entry on oeis.org

1, 2, 7, 9, 17, 20, 31, 35, 49, 54, 71, 77, 97, 104, 127, 135, 161, 170, 199, 209, 241, 252, 287, 299, 337, 350, 391, 405, 449, 464, 511, 527, 577, 594, 647, 665, 721, 740, 799, 819, 881, 902, 967, 989, 1057, 1080, 1151, 1175, 1249, 1274, 1351, 1377, 1457
Offset: 2

Views

Author

Mambetov Timur (timur_teufel(AT)mail.ru), Feb 13 2003

Keywords

Examples

			a(3)=2 because if a middle row of 3 monominoes are removed from the 3 X 3, no L remains.
		

Crossrefs

Frobenius number for k successive numbers: A028387 (k=2), this sequence (k=3), A138984 (k=4), A138985 (k=5), A138986 (k=6), A138987 (k=7), A138988 (k=8).

Programs

  • Mathematica
    Table[FrobeniusNumber[{a, a + 1, a + 2}], {a, 2, 54}] (* Zak Seidov, Jan 08 2015 *)

Formula

a(n) = (n^2)/2 - 1 (n even), (n^2-n)/2 - 1 (n odd).
a(n) = A204557(n-1) / (n-1). - Reinhard Zumkeller, Jan 18 2012
From Bruno Berselli, Jan 18 2011: (Start)
G.f.: x^2*(1+x+3*x^2-x^4)/((1+x)^2*(1-x)^3).
a(n) = n*(2*n+(-1)^n-1)/4 - 1.
a(n) = A105638(-n+2). (End)

Extensions

Edited by Don Reble, May 28 2007

A226141 Sum of the squared parts of the partitions of n into exactly two parts.

Original entry on oeis.org

0, 2, 5, 18, 30, 64, 91, 156, 204, 310, 385, 542, 650, 868, 1015, 1304, 1496, 1866, 2109, 2570, 2870, 3432, 3795, 4468, 4900, 5694, 6201, 7126, 7714, 8780, 9455, 10672, 11440, 12818, 13685, 15234, 16206, 17936, 19019, 20940, 22140, 24262, 25585, 27918, 29370, 31924, 33511
Offset: 1

Views

Author

Wesley Ivan Hurt, May 27 2013

Keywords

Examples

			a(5) = 30; 5 has exactly 2 partitions into two parts, (4,1) and (3,2). Squaring the parts and adding, we get: 1^2 + 2^2 + 3^2 + 4^2 = 30.
		

Crossrefs

Sum of k-th powers of the parts in the partitions of n into two parts for k=0..10: A052928 (k=0), A093353 (k=1), this sequence (k=2), A294270 (k=3), A294271 (k=4), A294272 (k=5), A294273 (k=6), A294274 (k=7), A294275 (k=8), A294276 (k=9), A294279 (k=10).

Programs

  • Magma
    [n*(8*n^2 - 9*n + 4)/24 + (-1)^n*n^2/8 : n in [1..80]]; // Wesley Ivan Hurt, Jun 22 2024
  • Maple
    a:=n->sum(i^2 + (n-i)^2, i=1..floor(n/2)); seq((a(k), k=1..40);
  • Mathematica
    Array[Sum[i^2 + (# - i)^2, {i, Floor[#/2]}] &, 39] (* Michael De Vlieger, Jan 23 2018 *)
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{0,2,5,18,30,64,91},50] (* Harvey P. Dale, Jul 23 2019 *)

Formula

a(n) = Sum_{i=1..floor(n/2)} (i^2 + (n-i)^2).
a(n) = n*(8*n^2 - 9*n + 4)/24 + (-1)^n*n^2/8. - Giovanni Resta, May 29 2013
G.f.: x^2*(2+3*x+7*x^2+3*x^3+x^4) / ( (1+x)^3*(x-1)^4 ). - R. J. Mathar, Jun 07 2013
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7). - Wesley Ivan Hurt, Jun 22 2024
a(n) = A000330(n) - A308422(n). - Wesley Ivan Hurt, Jul 16 2025

A235988 Sum of the partition parts of 3n into 3 parts.

Original entry on oeis.org

3, 18, 63, 144, 285, 486, 777, 1152, 1647, 2250, 3003, 3888, 4953, 6174, 7605, 9216, 11067, 13122, 15447, 18000, 20853, 23958, 27393, 31104, 35175, 39546, 44307, 49392, 54897, 60750, 67053, 73728, 80883, 88434, 96495, 104976, 113997, 123462, 133497, 144000
Offset: 1

Views

Author

Wesley Ivan Hurt, Jan 17 2014

Keywords

Examples

			a(2) = 18; 3(2) = 6 has 3 partitions into 3 parts: (4, 1, 1), (3, 2, 1), and (2, 2, 2). The sum of the parts is 18.
Figure 1: The partitions of 3n into 3 parts for n = 1, 2, 3, ...
                                               13 + 1 + 1
                                               12 + 2 + 1
                                               11 + 3 + 1
                                               10 + 4 + 1
                                                9 + 5 + 1
                                                8 + 6 + 1
                                                7 + 7 + 1
                                   10 + 1 + 1  11 + 2 + 2
                                    9 + 2 + 1  10 + 3 + 2
                                    8 + 3 + 1   9 + 4 + 2
                                    7 + 4 + 1   8 + 5 + 2
                                    6 + 5 + 1   7 + 6 + 2
                        7 + 1 + 1   8 + 2 + 2   9 + 3 + 3
                        6 + 2 + 1   7 + 3 + 2   8 + 4 + 3
                        5 + 3 + 1   6 + 4 + 2   7 + 5 + 3
                        4 + 4 + 1   5 + 5 + 2   6 + 6 + 3
            4 + 1 + 1   5 + 2 + 2   6 + 3 + 3   7 + 4 + 4
            3 + 2 + 1   4 + 3 + 2   5 + 4 + 3   6 + 5 + 4
1 + 1 + 1   2 + 2 + 2   3 + 3 + 3   4 + 4 + 4   5 + 5 + 5
   3(1)        3(2)        3(3)        3(4)        3(5)     ..    3n
------------------------------------------------------------------------
    3           18          63         144         285      ..   a(n)
- _Wesley Ivan Hurt_, Sep 07 2019
		

Crossrefs

Programs

  • Magma
    [3*n^3-3*n*Floor(n^2/4): n in [1..100]]; // Wesley Ivan Hurt, Nov 01 2015
    
  • Magma
    [3*n*(1-(-1)^n+6*n^2)/8: n in [1..40]]; // Vincenzo Librandi, Nov 18 2015
  • Maple
    A235988:=n->3*n^3 - 3*n*floor(n^2/4); seq(A235988(n), n=1..100);
  • Mathematica
    Table[3 n^3 - 3 n*Floor[n^2/4], {n, 100}] (* or *) CoefficientList[ Series[3*x*(x^4 + 4*x^3 + 8*x^2 + 4*x + 1)/((x - 1)^4*(x + 1)^2), {x, 0, 30}], x]
    LinearRecurrence[{2,1,-4,1,2,-1},{3,18,63,144,285,486},40] (* Harvey P. Dale, May 17 2018 *)
  • PARI
    a(n)=3*n^3 - n^2\4*3*n \\ Charles R Greathouse IV, Oct 07 2015
    
  • PARI
    x='x+O('x^50); Vec(3*x*(x^4+4*x^3+8*x^2+4*x+1)/((x-1)^4*(x+1)^2)) \\ Altug Alkan, Nov 01 2015
    

Formula

a(n) = 3*n^3 - 3*n*floor(n^2/4).
a(n) = 3n * A077043(n).
a(n) = a(n-1) + 3*A077043(n-1) + A001651(n) + A093353(3n-2).
From Colin Barker, Jan 18 2014: (Start)
a(n) = (3*n*(1-(-1)^n+6*n^2))/8.
G.f.: 3*x*(x^4+4*x^3+8*x^2+4*x+1) / ((x-1)^4*(x+1)^2). (End)
a(n) = 2*a(n-1) + a(n-2) - 4*a(n-3) + a(n-4) + 2*a(n-5) - a(n-6) for n > 6. - Wesley Ivan Hurt, Nov 15 2015
E.g.f.: 3*x*((4 + 9*x + 3*x^2)*cosh(x) + 3*(1 + 3*x + x^2)*sinh(x))/4. - Stefano Spezia, Feb 09 2023

Extensions

a(165) in b-file corrected by Andrew Howroyd, Feb 21 2018

A294270 Sum of the cubes of the parts in the partitions of n into two parts.

Original entry on oeis.org

0, 2, 9, 44, 100, 252, 441, 848, 1296, 2150, 3025, 4572, 6084, 8624, 11025, 14912, 18496, 24138, 29241, 37100, 44100, 54692, 64009, 77904, 90000, 107822, 123201, 145628, 164836, 192600, 216225, 250112, 278784, 319634, 354025, 402732, 443556, 501068, 549081
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 26 2017

Keywords

Comments

a(n) is a square when n is odd. In fact: a(2*k+1) = (2*k^2 + k)^2; a(2*k) = k^2*(4*k^2 - 3*k + 1), where (2*k)^2 > 4*k^2 - 3*k + 1 > (2*k - 1)^2 for k>0. - Bruno Berselli, Nov 20 2017

Crossrefs

Sum of k-th powers of the parts in the partitions of n into two parts for k=0..10: A052928 (k=0), A093353 (k=1), A226141 (k=2), this sequence (k=3), A294271 (k=4), A294272 (k=5), A294273 (k=6), A294274 (k=7), A294275 (k=8), A294276 (k=9), A294279 (k=10).

Programs

  • Magma
    [0] cat &cat[[k^2*(4*k^2-3*k+1),k^2*(2*k+1)^2]: k in [1..20]]; // Bruno Berselli, Nov 22 2017
  • Mathematica
    Table[Sum[i^3 + (n - i)^3, {i, Floor[n/2]}], {n, 80}]
  • PARI
    concat(0, Vec(x^2*(2 + 7*x + 27*x^2 + 28*x^3 + 24*x^4 + 7*x^5 + x^6) / ((1 - x)^5*(1 + x)^4) + O(x^40))) \\ Colin Barker, Nov 20 2017
    

Formula

a(n) = Sum_{i=1..floor(n/2)} i^3 + (n-i)^3.
From Colin Barker, Nov 20 2017: (Start)
G.f.: x^2*(2 + 7*x + 27*x^2 + 28*x^3 + 24*x^4 + 7*x^5 + x^6) / ((1 - x)^5*(1 + x)^4).
a(n) = n^2*(4*n^2 - 7*n + 4 + n*(-1)^n)/16.
a(n) = a(n-1) + 4*a(n-2) - 4*a(n-3) - 6*a(n-4) + 6*a(n-5) + 4*a(n-6) - 4*a(n-7) - a(n-8) + a(n-9) for n>9. (End)

A331702 Number of distinct intersections among all circles that can be constructed on vertices of an n-sided regular polygon, using only a compass.

Original entry on oeis.org

0, 2, 6, 40, 55, 145, 238, 584, 612, 1350, 1804, 2401, 3523, 5180, 6150, 9312, 11101, 13645, 17746, 22300, 25998, 33462, 39514, 43993, 55225, 66976, 74088, 88956, 102109, 111841, 133672, 155808, 170940, 198798, 220150, 243937, 275983, 313728, 338208, 382480, 419143, 448561, 507658
Offset: 1

Views

Author

Matej Veselovac, Jan 25 2020

Keywords

Comments

Sequence counts intersections among all distinct circles such that: A circle is defined by a pair of distinct points of a regular n-sided polygon. First point is the center of the circle, while the distance between the points defines the radius of the circle.
It seems one additional intersection exists at the center of the polygon if and only if n is a multiple of 6. From this and n symmetries of the n-sided regular polygon, it would follow that n divides either a(n) or a(n)-1, depending on whether n is a multiple of 6.
A093353(n-1) gives the number of unique circles whose intersections a(n) counts.
From Scott R. Shannon, Dec 15 2022 (Start)
The values for n which lead to all vertices, other than those defining the n-sided regular polygon, being simple start 2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, ... . These are all prime values except for the prime squares 4 and 25 which also appear. It is likely all primes appear although what other values lead to only simple vertices is unknown. (End)

Examples

			a(1)=0, we need at least two points to define a radius and a center.
a(2)=2, 2 circles constructed on segment endpoints intersect at 2 points.
a(3)=6, 3 circles on vertices of a triangle intersect at 6 distinct points.
a(4)=40, 8 circles can be constructed on vertices of a square and intersect at 40 distinct points.
a(5)=55, 10 circles can be constructed on vertices of a pentagon and intersect at 55 distinct points.
		

Crossrefs

Cf. A093353, A359046 (regions), A359047 (edges), A359061 (k-gons), A358746.

Programs

  • GeoGebra
    n = Slider(2, 10, 1);
    C = Unique(RemoveUndefined(Flatten(Sequence(Sequence(Circle(Point({cos((2v Pi) / n), sin((2v Pi) / n)}), 2sin((c Pi) / n)), c, 1, floor(n / 2)), v, 1, n))));
    I = Unique(RemoveUndefined(Flatten(Sequence(Sequence(Intersect(Element(C, i), Element(C, j)), j, 1, Length(C)), i, 1, Length(C)))));
    a_n = Length(I);

Extensions

a(24)-a(30) from Giovanni Resta, Mar 27 2020
a(31)-a(43) from Scott R. Shannon, Dec 14 2022

A227906 Coins left after packing heart patterns (fixed orientation) into n X n coins.

Original entry on oeis.org

2, 4, 4, 9, 6, 13, 8, 17, 10, 21, 12, 25, 14, 29, 16, 33, 18, 37, 20, 41, 22, 45, 24, 49, 26, 53, 28, 57, 30, 61, 32, 65, 34, 69, 36, 73, 38, 77, 40, 81, 42, 85, 44, 89, 46, 93, 48, 97, 50, 101, 52, 105, 54, 109, 56, 113, 58, 117, 60, 121
Offset: 2

Views

Author

Kival Ngaokrajang, Oct 19 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 coins left after packing fixed orientation heart patterns (type 4c2s1: 4-curve cover 2 coins and symmetry) into n X n coins. The total number of hearts is A093005 and the number of voids left is A093353. See illustration in links.

Crossrefs

Cf. A008795, A230370 (3-curves), A074148, A229093, A229154 (4-curves), A001399, A230267, A230276 (5-curves), A229593, A228949, A229598 (6-curves).

Programs

  • Mathematica
    With[{nn=60},Join[{2,4},Riffle[Range[4,nn,2],Range[9,2nn+1,4]]]] (* Harvey P. Dale, Feb 11 2015 *)
  • PARI
    Vec(-x^2*(x^5-x^3-4*x-2)/((x-1)^2*(x+1)^2) + O(x^100)) \\ Colin Barker, Oct 30 2013

Formula

From Colin Barker, Oct 30 2013: (Start)
a(n) = (-1 + (-1)^n - (-3 + (-1)^n)*n)/2 for n>3.
a(n) = n for n>3 and even.
a(n) = 2*n-1 for n > 3 and odd.
a(n) = 2*a(n-2) - a(n-4) for n>7.
G.f.: -x^2*(x^5-x^3-4*x-2) / ((x-1)^2*(x+1)^2).(End)

A294271 Sum of the fourth powers of the parts in the partitions of n into two parts.

Original entry on oeis.org

0, 2, 17, 114, 354, 1060, 2275, 4932, 8772, 15958, 25333, 41270, 60710, 91672, 127687, 182408, 243848, 333930, 432345, 572666, 722666, 931788, 1151403, 1451980, 1763020, 2182206, 2610621, 3180478, 3756718, 4514624, 5273999, 6263056, 7246096, 8515538, 9768353
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 26 2017

Keywords

Crossrefs

Sum of k-th powers of the parts in the partitions of n into two parts for k=0..10: A052928 (k=0), A093353 (k=1), A226141 (k=2), A294270 (k=3), this sequence (k=4), A294272 (k=5), A294273 (k=6), A294274 (k=7), A294275 (k=8), A294276 (k=9), A294279 (k=10).

Programs

  • Magma
    [(n*(-16 + 160*n^2 + 15*(-15 + (-1)^n)*n^3 + 96*n^4))/480 : n in [1..50]]; // Wesley Ivan Hurt, Jul 12 2025
  • Mathematica
    Table[Sum[i^4 + (n - i)^4, {i, Floor[n/2]}], {n, 60}]
    Table[Total[Flatten[IntegerPartitions[n,{2}]]^4],{n,40}] (* Harvey P. Dale, Mar 01 2019 *)
  • PARI
    concat(0, Vec(x^2*(2 + 15*x + 87*x^2 + 165*x^3 + 241*x^4 + 165*x^5 + 77*x^6 + 15*x^7 + x^8) / ((1 - x)^6*(1 + x)^5) + O(x^40))) \\ Colin Barker, Nov 20 2017
    
  • PARI
    a(n) = sum(i=1, n\2, i^4 + (n-i)^4); \\ Michel Marcus, Nov 20 2017
    

Formula

a(n) = Sum_{i=1..floor(n/2)} i^4 + (n-i)^4.
From Colin Barker, Nov 20 2017: (Start)
G.f.: x^2*(2 + 15*x + 87*x^2 + 165*x^3 + 241*x^4 + 165*x^5 + 77*x^6 + 15*x^7 + x^8) / ((1 - x)^6*(1 + x)^5).
a(n) = (1/480)*(n*(-16 + 160*n^2 + 15*(-15 + (-1)^n)*n^3 + 96*n^4)).
a(n) = a(n-1) + 5*a(n-2) - 5*a(n-3) - 10*a(n-4) + 10*a(n-5) + 10*a(n-6) - 10*a(n-7) - 5*a(n-8) + 5*a(n-9) + a(n-10) - a(n-11) for n>11.
(End)

A294272 Sum of the fifth powers of the parts in the partitions of n into two parts.

Original entry on oeis.org

0, 2, 33, 308, 1300, 4668, 12201, 30032, 61776, 123950, 220825, 389652, 630708, 1018808, 1539825, 2331968, 3347776, 4826682, 6657201, 9233300, 12333300, 16578452, 21571033, 28256208, 35970000, 46106918, 57617001, 72503732, 89176276, 110446800, 133987425
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 26 2017

Keywords

Crossrefs

Sum of k-th powers of the parts in the partitions of n into two parts for k=0..10: A052928 (k=0), A093353 (k=1), A226141 (k=2), A294270 (k=3), A294271 (k=4), this sequence (k=5), A294273 (k=6), A294274 (k=7), A294275 (k=8), A294276 (k=9), A294279 (k=10).

Programs

  • Magma
    [(n^2*(-16 + 80*n^2 + 3*(-31 + (-1)^n)*n^3 + 32*n^4))/192 : n in [1..50]]; // Wesley Ivan Hurt, Jul 12 2025
  • Mathematica
    Table[Sum[i^5 + (n - i)^5, {i, Floor[n/2]}], {n, 50}]
    Table[Total[Flatten[IntegerPartitions[n,{2}]]^5],{n,35}] (* or *) LinearRecurrence[{1,6,-6,-15,15,20,-20,-15,15,6,-6,-1,1},{0,2,33,308,1300,4668,12201,30032,61776,123950,220825,389652,630708},40] (* Harvey P. Dale, Jun 07 2025 *)
  • PARI
    concat(0, Vec(x^2*(2 + 31*x + 263*x^2 + 806*x^3 + 1748*x^4 + 2046*x^5 + 1708*x^6 + 806*x^7 + 238*x^8 + 31*x^9 + x^10) / ((1 - x)^7*(1 + x)^6) + O(x^40))) \\ Colin Barker, Nov 20 2017
    

Formula

a(n) = Sum_{i=1..floor(n/2)} i^5 + (n-i)^5.
From Colin Barker, Nov 20 2017: (Start)
G.f.: x^2*(2 + 31*x + 263*x^2 + 806*x^3 + 1748*x^4 + 2046*x^5 + 1708*x^6 + 806*x^7 + 238*x^8 + 31*x^9 + x^10) / ((1 - x)^7*(1 + x)^6).
a(n) = (1/192)*(n^2*(-16 + 80*n^2 + 3*(-31 + (-1)^n)*n^3 + 32*n^4)).
a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - 15*a(n-4) + 15*a(n-5) + 20*a(n-6) - 20*a(n-7) - 15*a(n-8) + 15*a(n-9) + 6*a(n-10) - 6*a(n-11) - a(n-12) + a(n-13) for n>13.
(End)

A294273 Sum of the sixth powers of the parts in the partitions of n into two parts.

Original entry on oeis.org

0, 2, 65, 858, 4890, 21244, 67171, 188916, 446964, 994030, 1978405, 3796622, 6735950, 11680408, 19092295, 30745064, 47260136, 71929146, 105409929, 153455810, 216455810, 303993492, 415601835, 566623708, 754740700, 1003708134, 1307797101, 1702747126
Offset: 1

Views

Author

Wesley Ivan Hurt, Oct 26 2017

Keywords

Crossrefs

Sum of k-th powers of the parts in the partitions of n into two parts for k=0..10: A052928 (k=0), A093353 (k=1), A226141 (k=2), A294270 (k=3), A294271 (k=4), A294272 (k=5), this sequence (k=6), A294274 (k=7), A294275 (k=8), A294276 (k=9), A294279 (k=10).

Programs

  • Magma
    [(n/42 - n^3/6 + n^5/2 + 1/128*(-63 + (-1)^n)*n^6 + n^7/7) : n in [1..50]]; // Wesley Ivan Hurt, Jul 12 2025
  • Mathematica
    Table[Sum[i^6 + (n - i)^6, {i, Floor[n/2]}], {n, 50}]
  • PARI
    concat(0, Vec(x^2*(2 + 63*x + 779*x^2 + 3591*x^3 + 10845*x^4 + 19026*x^5 + 23850*x^6 + 19026*x^7 + 10600*x^8 + 3591*x^9 + 723*x^10 + 63*x^11 + x^12) / ((1 - x)^8*(1 + x)^7) + O(x^40))) \\ Colin Barker, Nov 20 2017
    

Formula

a(n) = Sum_{i=1..floor(n/2)} i^6 + (n-i)^6.
From Colin Barker, Nov 20 2017: (Start)
G.f.: x^2*(2 + 63*x + 779*x^2 + 3591*x^3 + 10845*x^4 + 19026*x^5 + 23850*x^6 + 19026*x^7 + 10600*x^8 + 3591*x^9 + 723*x^10 + 63*x^11 + x^12) / ((1 - x)^8*(1 + x)^7).
a(n) = (n/42 - n^3/6 + n^5/2 + 1/128*(-63 + (-1)^n)*n^6 + n^7/7).
a(n) = a(n-1) + 7*a(n-2) - 7*a(n-3) - 21*a(n-4) + 21*a(n-5) + 35*a(n-6) - 35*a(n-7) - 35*a(n-8) + 35*a(n-9) + 21*a(n-10) - 21*a(n-11) - 7*a(n-12) + 7*a(n-13) + a(n-14) - a(n-15) for n>15.
(End)
Showing 1-10 of 26 results. Next