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.

Previous Showing 11-15 of 15 results.

A159469 Maximum remainder when (k + 1)^n + (k - 1)^n is divided by k^2 for variable n and k > 2.

Original entry on oeis.org

6, 8, 20, 24, 42, 48, 72, 80, 110, 120, 156, 168, 210, 224, 272, 288, 342, 360, 420, 440, 506, 528, 600, 624, 702, 728, 812, 840, 930, 960, 1056, 1088, 1190, 1224, 1332, 1368, 1482, 1520, 1640, 1680, 1806, 1848, 1980, 2024, 2162, 2208, 2352, 2400, 2550, 2600
Offset: 3

Views

Author

Gaurav Kumar, Apr 13 2009

Keywords

Examples

			For n = 3, maxr => 3*3 - 3 = 6 since 3 is odd.
For n = 4, maxr => 4*4 - 2*4 = 8 since 4 is even.
		

Crossrefs

Cf. A050187.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{6,8,20,24,42},50] (* Harvey P. Dale, Apr 18 2018 *)
  • PARI
    a(n) = if (n % 2, n^2 - n, n^2 - 2*n); \\ Michel Marcus, Aug 26 2013
    
  • PARI
    first(n) = Vec(x^3*(-6-2*x)/((x+1)^2*(x-1)^3) + O(x^(n+3))) \\ Iain Fox, Nov 26 2017

Formula

maxr(n) = n*n - 2*n if n is even, and n*n - n if n is odd.
G.f.: x^3*(-6-2*x)/((x+1)^2*(x-1)^3). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009 (proved by Iain Fox, Nov 26 2017)
a(n) = 2*A050187(n). - R. J. Mathar, Aug 08 2009 (proved by Iain Fox, Nov 27 2017)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 7. - Colin Barker, Oct 29 2017 (proved by Iain Fox, Nov 26 2017)
a(n) = n^2 - n*(3 + (-1)^n)/2. - Iain Fox, Nov 26 2017
From Iain Fox, Nov 27 2017: (Start)
a(n) = A000290(n) - A022998(n).
a(n) = 2*A093005(n-2) + A168273(n-1).
a(n) = (4*(A152749(n-2)) + A091574(n-1) - A010719(n-1))/3.
E.g.f.: x*(exp(x)*x - sinh(x)).
(End)

A272104 Sum of the even numbers among the larger parts of the partitions of n into two parts.

Original entry on oeis.org

0, 0, 0, 2, 2, 4, 4, 10, 10, 14, 14, 24, 24, 30, 30, 44, 44, 52, 52, 70, 70, 80, 80, 102, 102, 114, 114, 140, 140, 154, 154, 184, 184, 200, 200, 234, 234, 252, 252, 290, 290, 310, 310, 352, 352, 374, 374, 420, 420, 444, 444, 494, 494, 520, 520, 574, 574, 602
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 20 2016

Keywords

Comments

Essentially, repeated values of A152749.
Sum of the lengths of the distinct rectangles with even length and integer width such that L + W = n, W <= L. For example, a(10) = 14; the rectangles are 2 X 8 and 4 X 6, so 8 + 6 = 14. - Wesley Ivan Hurt, Nov 04 2017

Examples

			a(5) = 4; the partitions of 5 into 2 parts are (4,1),(3,2) and the sum of the larger even parts is 4.
a(6) = 4; the partitions of 6 into 2 parts are (5,1),(4,2),(3,3) and the sum of the larger even parts is also 4.
		

Crossrefs

Programs

  • Magma
    [(1+3*(2*n-3-(-1)^n)/2+3*(2*n-3-(-1)^n)^2/8+(2*n-1-(-1)^n)*(-1)^((2*n+1-(-1)^n) div 4)/2)/8 : n in [0..50]];
    
  • Maple
    A272104:=n->(1+3*(2*n-3-(-1)^n)/2+3*(2*n-3-(-1)^n)^2/8+(2*n-1-(-1)^n)*(-1)^((2*n+1-(-1)^n)/4)/2)/8: seq(A272104(n), n=0..100);
  • Mathematica
    Table[(1 + 3(2n-3-(-1)^n)/2 + 3(2n-3-(-1)^n)^2/8 + (2n-1-(-1)^n) * (-1)^((2n+1-(-1)^n)/4)/2) / 8, {n, 0, 50}]
    Table[Total@ Map[First, IntegerPartitions[n, {2}] /. {k_, } /; OddQ@ k -> Nothing], {n, 0, 57}] (* _Michael De Vlieger, Apr 20 2016, Version 10.2 *)
  • PARI
    concat(vector(3), Vec(2*x^3*(1-x+x^2)*(1+x+x^2)/((1-x)^3*(1+x)^2*(1+x^2)^2) + O(x^50))) \\ Colin Barker, Apr 20 2016

Formula

a(n) = (1 + 3*(2n-3-(-1)^n)/2 + 3*(2n-3-(-1)^n)^2/8 + (2n-1-(-1)^n) * (-1)^((2n+1-(-1)^n)/4)/2) / 8.
a(n) = Sum_{i=ceiling(n/2)..n-1} i * (i+1 mod 2).
a(n) = Sum_{i=1..floor(n/2)} (n-i) * (n-i+1 mod 2).
a(2n+1) = a(2n+2) = A152749(n) = 2*A001318(n).
G.f.: 2*x^3*(1-x+x^2)*(1+x+x^2) / ((1-x)^3*(1+x)^2*(1+x^2)^2). - Colin Barker, Apr 20 2016
From Wesley Ivan Hurt, Apr 22 2016, Apr 23 2016: (Start)
a(2n+2)-a(2n) = A109043(n) = 2*A026741(n).
a(4n) = A049450(n) = 2*A000326(n),
a(8n) = A126964(n) = 2*A049452(n),
a(12n) = 2*A268351(n).
a(n+1) = A001318(n) - A272212(n+1). (End)
E.g.f.: ((2 + 3*x*(1 + x))*cosh(x) - 2*(cos(x) + x*cos(x) + x*sin(x)) + (-1 + 3*(-1 + x)*x)*sinh(x))/16. - Ilya Gutkovskiy, Apr 29 2016

A334138 Number of ways to write n as x^4 + y*(2*y+1) + z*(3*z+1), where x is a nonnegative integer, and y and z are integers.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 3, 2, 2, 1, 3, 4, 2, 2, 3, 4, 4, 4, 3, 3, 4, 5, 2, 2, 4, 5, 6, 2, 3, 3, 6, 7, 4, 4, 2, 3, 5, 3, 2, 4, 5, 5, 1, 2, 2, 6, 8, 5, 3, 2, 4, 4, 5, 3, 4, 5, 5, 1, 4, 5, 5, 5, 2, 3, 0, 3, 6, 4, 4, 4, 5, 6, 2, 4, 4, 4, 4, 2, 2, 2, 7, 10, 5, 4, 4, 5, 7, 3, 4, 6, 3
Offset: 0

Views

Author

Zhi-Wei Sun, Apr 15 2020

Keywords

Comments

Note that {y*(2*y+1): y is an integer} = {n*(n+1)/2: n = 0,1,...}.
Conjecture 1: a(n) = 0 only for n = 64. In other words, any nonnegative integer n not equal to 64 can be written as x^4 + y*(2*y+1) + z*(3*z+1) with x,y,z integers.
Conjecture 2: (i) The set {x^4+y^2+z(3z+1)/2: x,y,z are integers} contains all nonnegative integers except for 455.
(ii) The set {x^4+y(3y+1)+z(5z+1)/2: x,y,z are integers} contains all nonnegative integers except for 59, and the set {x^4+y(3y+1)+z(5z+3)/2: x,y,z are integers} contains all nonnegative integers except for 856.
(iii) The set {x^4+y(3y+1)+z(3z+2): x,y,z are integers} = {x^4+3y(y+1)/2+z(3z+1)/2: x,y,z are integers} contains all nonnegative integers except for 1975.
(iv) The set {x^4+y(5y+3)+z(3z+1)/2: x,y,z are integers} contains all nonnegative integers except for 2899.
(v) The set {x^4+y(5y+4)+z(3z+1)/2: x,y,z are integers} contains all nonnegative integers except for 17960.
We have verified Conjecture 1 for n up to 10^8, parts (i) and (iii) of Conjecture 2 for n up to 5*10^7, and parts (ii), (iv) and (v) of Conjecture 2 for n up to 2*10^6. See also A334147 for the list of those numbers n with a(n) = 1. - Zhi-Wei Sun, Apr 16 2020

Examples

			a(9) = 1 with 9 = 1^4 + (-2)*(2*(-2)+1) + (-1)*(3*(-1)+1).
a(554) = 1 with 554 = 2^4 + 16*(2*16+1) + (-2)*(3*(-2)+1).
a(555) = 1 with 555 = 2^4 + (-5)*(2*(-5)+1) + (-13)*(3*(-13)+1).
a(25713) = 1 with 25713 = 8^4 + (-85)*(2*(-85)+1) + 49*(3*49+1).
a(80488) = 1 with 80488 = 0^4 + (-196)*(2*(-196)+1) + (-36)*(3*(-36)+1).
		

Crossrefs

Programs

  • Mathematica
    QQ[n_]:=QQ[n]=IntegerQ[Sqrt[12n+1]];
    tab={};Do[r=0;Do[If[QQ[n-x^4-y(2y+1)],r=r+1],{x,0,n^(1/4)},{y,-Floor[(Sqrt[8(n-x^4)+1]+1)/4],(Sqrt[8(n-x^4)+1]-1)/4}];tab=Append[tab,r],{n,0,90}];Print[tab]

A165410 Hankel transform of the transform of 2^n given by A165409.

Original entry on oeis.org

1, 0, -4, -16, 0, 1024, 16384, 0, -16777216, -1073741824, 0, 17592186044416, 4503599627370496, 0, -1180591620717411303424, -1208925819614629174706176, 0, 5070602400912917605986812821504, 20769187434139310514121985316880384
Offset: 0

Views

Author

Paul Barry, Sep 17 2009

Keywords

Comments

Powers of two occurring in this sequence are based on the hexagonal spiral pattern of A049450 and A049451 (see A152749):
.
16--15--14
/ \
17 5---4 13
/ / \ \
18 6 0 3 12
/ / / / /
19 7 1---2 11 26
\ \ / /
20 8---9--10 25
\ /
21--22--23--24
.
The powers, (0,-oo,2,4,-oo,10,14,-oo,24,30,-oo,...) correspond to vertically joining pairs on the (0,4) and (0,2) radial lines, with -oo corresponding to the jump to the next pair.
The Hankel transforms of transforms of r^n behave similarly -- we get 1, 0, -r^2, -r^4, 0, r^10, r^14, ....
Note the Somos-4 property: a(3n) = 4*a(3n-1)*a(3n-3)/e(3n-4). Related to elliptic curve y^2 = 1 - 8x^3 in g.f. of A165409.

Crossrefs

Cf. A165409.

A377979 List of exponents in the expansion of (1 - q)*Sum_{n >= 0} q^(2*n*(n+1))*Product_{k >= 2*n+1} 1 - q^k.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 11, 13, 18, 20, 26, 29, 35, 39, 46, 50, 59, 63, 73, 78, 88, 94, 105, 111, 124, 130, 144, 151, 165, 173, 188, 196, 213, 221, 239, 248, 266, 276, 295, 305, 326, 336, 358, 369, 391, 403, 426, 438, 463, 475, 501, 514, 540, 554, 581, 595, 624, 638, 668, 683, 713, 729, 760, 776, 809, 825
Offset: 1

Views

Author

Peter Bala, Dec 16 2024

Keywords

Comments

Compare with the expansions Sum_{n >= 0} q^(2*n*(n+1))*Product_{k >= 2*n+2} 1 - q^k = 1 - q^2 - q^3 + q^7 + q^17 - q^25 - q^28 + + - - ... (see A268539) and Sum_{n >= 0} q^(n*(n+1))*Product_{k >= 2*n+1} 1 - q^k = 1 - q - q^8 + q^13 + q^17 - q^24 - q^45 + + - - .... (see A204221).
Conjectures:
1) apart from the coefficient of q, the coefficients of the series expansion (see below) belong to {-1, 0, 1}.
2) starting at q^3, the signs of the nonzero coefficients follow the pattern + + - - + + - - ....
It appears that the sequence terms are the exponents in the expansion of Sum_{n >= 0} x^(3*n)/(Product_{k = 1..2*n} 1 + x^k) = 1 + x^3 - x^4 + x^6 - x^8 + x^11 - x^13 + - .... - Peter Bala, Jan 21 2025

Examples

			(1 - q)*Sum_{n >= 0} q^(2*n*(n+1))*Product_{k >= 2*n+1} 1 - q^k = 1 - 2*q + q^3 + q^4 - q^6 - q^8 + q^11 + q^13 - q^18 - q^20 + q^26 + q^29 - q^35 - q^39 + q^46 + q^50 - q^59 - q^63 + + - - ....
		

Crossrefs

Programs

  • Maple
    series(add((1 - q)*q^(2*n*(n+1))*mul(1 - q^k, k = 2*n+1..1000), n = 0..21), q, 1001);

Formula

The following are conjectural:
a(n) is quasi-polynomial in n:
a(8*n+1) = 12*n^2 + 5*n + 1 = A244806(n+1) for n >= 1;
a(8*n+2) = 12*n^2 + 7*n + 1 = A033577(n); a(8*n+3) = 12*n^2 + 11*n + 3;
a(8*n+4) = 12*n^2 + 13*n + 4; a(8*n+5) = 12*n^2 + 17*n + 6 = A033578(n+1);
a(8*n+6) = 12*n^2 + 19*n + 8; a(8*n+7) = 12*n^2 + 23*n + 11;
a(8*n+8) = 12*n^2 + 25*n + 13.
G.f.: x^2*(x^8 - x^7 - 2*x^6 + 3*x^5 + 2*x^4 - 2*x^3 - x^2 + 2*x + 1)/((1 + x)^2*(1 - x)^3*(1 + x^4)) = x^2 + 3*x^3 + 4*x^4 + 6*x^5 + 8*x^6 + 11*x^7 + ....
Previous Showing 11-15 of 15 results.