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 21-30 of 33 results. Next

A306383 Number of ways to write n as x*(2x+1) + y*(2y+1) + z*(2z+1), where x,y,z are nonnegative integers with x <= y <= z.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 2, 1, 0, 2, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 0, 1, 1, 0, 0, 1, 1, 1, 0
Offset: 0

Views

Author

Zhi-Wei Sun, Feb 11 2019

Keywords

Comments

Conjecture 1: a(n) > 0 for any integer n > 138158.
We have verified this for n up to 2*10^6. Note that n*(2n+1) (n = 0,1,...) are the second hexagonal numbers (A014105).
Conjecture 2: Any integer n > 146858 can be written as the sum of three hexagonal numbers (A000384).
Conjecture 3: Any integer n > 33066 can be written as the sum of three pentagonal numbers (A000326).
Conjecture 4: Any integer n > 24036 can be written as the sum of three second pentagonal numbers (A005449).
Conjecture 5: Let N(1) = 114862, N(-1) = 166897, N(3) = 196987 and N(-3) = 273118. Then, for any r among 1, -1, 3 and -3, each integer n > N(r) can be written as x*(5x+r)/2 + y*(5y+r)/2 + z*(5z+r)/2 with x,y,z nonnegative integers.
We have verified Conjectures 2-5 for n up to 10^6.

Examples

			a(223595) = 1 with 223595 = 95*(2*95+1) + 200*(2*200+1) + 250*(2*250+1).
a(290660) = 1 with 290660 = 136*(2*136+1) + 149*(2*149+1) + 323*(2*323+1).
		

Crossrefs

Programs

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

A126264 a(n) = 5*n^2 + 3*n.

Original entry on oeis.org

8, 26, 54, 92, 140, 198, 266, 344, 432, 530, 638, 756, 884, 1022, 1170, 1328, 1496, 1674, 1862, 2060, 2268, 2486, 2714, 2952, 3200, 3458, 3726, 4004, 4292, 4590, 4898, 5216, 5544, 5882, 6230, 6588, 6956, 7334, 7722, 8120, 8528, 8946, 9374, 9812, 10260
Offset: 1

Views

Author

Gary W. Adamson, Dec 22 2006

Keywords

Examples

			a(24) = 5*24^2 + 3*24 = 2880 + 72 = 2952.
		

References

  • L. B. W. Jolley, Summation of Series, Dover Publications, 1961, p. 12

Crossrefs

Programs

Formula

Sum_{i=1..n} a(i) = n*(n+1)*(5n+7)/3 = 2*A162148(n).
a(n) = 2*A147875(n+1).
From G. C. Greubel, Aug 23 2017: (Start)
G.f.: 2*x*(x + 4)/(1 - x)^3.
E.g.f.: x*(5*x + 8)*exp(x). (End)
Sum_{n>=1} 1/a(n) = 5/9 + sqrt(1-2/sqrt(5))*Pi/6 + log(phi)*sqrt(5)/6 - 5*log(5)/12, where phi is the golden ratio (A001622). - Amiram Eldar, Aug 21 2022

Extensions

More terms from Emeric Deutsch, Apr 17 2007

A225785 Numbers n such that triangular(n) + triangular(2*n) is a triangular number.

Original entry on oeis.org

0, 12, 84, 3960, 27144, 1275204, 8740380, 410611824, 2814375312, 132215732220, 906220110180, 42573055163112, 291800061102744, 13708391546789940, 93958713454973484, 4414059505011197664, 30254413932440359200, 1421313452222058857964
Offset: 1

Views

Author

Alex Ratushnyak, May 16 2013

Keywords

Comments

Equivalently, numbers n such that oblong(n) + oblong(2*n) is an oblong number, where oblong(n) = A002378(n) = n*(n+1).
Also, x values in the equation A147875(x) = A000217(y) - see Ralf Stephan in Program lines. - Bruno Berselli, May 18 2013
Also, numbers m such that 2*m+1 and 10*m+1 are both squares. - Bruno Berselli, Mar 03 2016

Examples

			12*13/2 + 24*25/2 = 27*28/2, so 12 is in the sequence.
		

Crossrefs

Cf. A224419 (numbers n such that triangular(n) + triangular(2*n) is a square).
Cf. A011916 (numbers n such that triangular(2*n) - triangular(n) is a triangular number).
Cf. A225786 (numbers n such that oblong(2*n) + oblong(n) is a square).
Cf. A225839 (triangular numbers of the form triangular(x) + triangular(2*x)).

Programs

  • C
    #include 
    #include 
    int main() {
      unsigned long long i, s, t;
      for (i = 0; i< (1ULL<<31); i++) {
        s = 2*i*(2*i+1) + i*(i+1);
        t = sqrt(s);
        if (s==t*(t+1)) printf("%llu, ", i);
      }
      return 0;
    }
    
  • Mathematica
    CoefficientList[Series[12 x (1 + 6 x + x^2)/((1 - x) (1 - 18 x + x^2) (1 + 18 x + x^2)), {x, 0, 20}], x] (* Bruno Berselli, May 18 2013 *)
    LinearRecurrence[{1,322,-322,-1,1},{0,12,84,3960,27144},20] (* Harvey P. Dale, Apr 08 2021 *)
  • PARI
    for(n=1,10^9,t=n*(5*n+3)/2;x=sqrtint(2*t);if(t==x*(x+1)/2,print(n))) /* Ralf Stephan, May 17 2013 */

Formula

G.f.: 12*x*(1+6*x+x^2)/((1-x)*(1-18*x+x^2)(1+18*x+x^2)). [Bruno Berselli, May 18 2013]
a(n) = (1/20)*((3+(-1)^n*sqrt(5))*(2-sqrt(5))^(4*floor(n/2))+(3-(-1)^n*sqrt(5))*(2+sqrt(5))^(4*floor(n/2))-6). [Bruno Berselli, May 18 2013]
a(2*n) = (Fibonacci(6*n-3)^2 + Lucas(6*n-3)*Fibonacci(6*n-1))/2. - Greg Dresden, Sep 24 2023

Extensions

More terms from Bruno Berselli, May 18 2013

A255934 Number of ways to write n as the sum of four unordered generalized octagonal numbers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 11 2015

Keywords

Comments

I have proved that a(n) > 0 for all n, i.e., any nonnegative integer can be expressed as the sum of four generalized octagonal numbers. I can show that a(n) = 1 if 3*n+4 is among 7, 13, 19, 31, 43, 2^(2k), 5*2^(2k+1), 11*2^(2k+1), 23*2^(2k+1) (k = 0,1,2,...), and conjecture the converse.
I also conjecture that each nonnegative integer can be written as the sum of two heptagonal numbers, a second heptagonal number and a generalized heptagonal number.

Examples

			a(60) = 1 since 60 = 1*(3*1-2) + (-1)*(3*(-1)-2) + 3*(3*3-2) + (-3)*(3*(-3)-2).
a(1876) = 1 since 1876 = (-5)*(3*(-5)-2) + (-5)*(3*(-5)-2) + 11*(3*11-2) + (-21)*(3*(-21)-2).
a(15700) = 1 since 15700 = 11*(3*11-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-53)*(3*(-53)-2).
a(21844) = 1 since 21844 = 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2) + 43*(3*43-2).
a(30036) = 1 since 30036 = (-21)*(3*(-21)-2) + (-21)*(3*(-21)-2) + 43*(3*43-2) + (-85)*(3*(-85)-2).
		

Crossrefs

Programs

  • Mathematica
    T[n_]:=Union[Table[x(3x-2),{x,-Floor[(Sqrt[3n+1]-1)/3],Floor[(Sqrt[3n+1]+1)/3]}]]
    Do[r=0;Do[If[n-Part[T[n],x]-Part[T[n],y]-Part[T[n],z]
    				

A174814 a(n) = n*(n+1)*(5*n+1)/3.

Original entry on oeis.org

0, 4, 22, 64, 140, 260, 434, 672, 984, 1380, 1870, 2464, 3172, 4004, 4970, 6080, 7344, 8772, 10374, 12160, 14140, 16324, 18722, 21344, 24200, 27300, 30654, 34272, 38164, 42340, 46810, 51584, 56672, 62084, 67830, 73920, 80364, 87172, 94354, 101920, 109880
Offset: 0

Views

Author

Bruno Berselli, Dec 01 2010 - Dec 02 2010

Keywords

Comments

Also zero followed by bisection (even part) of A088003.
Numbers ending in 0, 2 or 4 (cf. 2*A053796(n)). Therefore we can easily see that a(m)^(2*k+1)==-1 (mod 5) only for m in A047219, while a(m)^(2*k)==-1 (mod 5) only for m in A016873 and k odd.

Programs

Formula

G.f.: 2*x*(2+3*x)/(1-x)^4.
a(n) = 2*A033994(n) for n>0.
a(n) = n*A147875(n+1)-sum(k=1..n, A147875(k)) for n>0.
a(-n) = -A144945(n).

A253187 Number of ordered ways to write n as the sum of a pentagonal number, a second pentagonal number and a generalized decagonal number.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 07 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n. Also, for any ordered pair (k,m) among (5,7), (5,9), (5,13), (6,5), (6,7), (7,5), each nonnegative integer n can be written as the sum of a k-gonal number, a second k-gonal number and a generalized m-gonal number.
See also the author's similar conjectures in A254574, A254631, A255916 and the two linked papers.

Examples

			a(33) = 1 since 33 = 0*(3*0-1)/2 + 4*(3*4+1)/2 + 1*(4*1+3).
a(56) = 1 since 56 = 4*(3*4-1)/2 + 2*(3*2+1)/2 + 3*(4*3+3).
		

Crossrefs

Programs

  • Mathematica
    DQ[n_]:=IntegerQ[Sqrt[16n+9]]
    Do[r=0;Do[If[DQ[n-x(3x-1)/2-y(3y+1)/2],r=r+1],{x,0,(Sqrt[24n+1]+1)/6},{y,0,(Sqrt[24(n-x(3x-1)/2)+1]-1)/6}];
    Print[n," ",r];Continue,{n,0,100}]

A254623 Number of ways to write n as x^2 + y*(3*y+1)/2 + z*(5*z+3)/2 with x,y,z nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 03 2015

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n, and a(n) > 1 for all n > 118.
(ii) For each m = 5,7,8, any nonnegative integer n can be written as the sum of two triangular numbers and a second m-gonal number, where the second m-gonal numbers are given by (m-2)*k*(k+1)/2-k (k = 0,1,...).
(iii) For every m = 5,6,7,9,11, any nonnegative integer n can be written as the sum of a triangular number, a square and a second m-gonal number.
Note that k*(3*k+1)/2 (k = 0,1,...) are second pentagonal numbers and k*(5*k+3)/2 (k = 0,1,...) are second heptagonal numbers. The conjecture has been verified for all n = 0.. 2*10^6.

Examples

			a(41) = 1 since 41 = 1^2 + 5*(3*5+1)/2 + 0*(5*0+3)/2.
a(98) = 1 since 98 = 8^2 + 2*(3*2+1)/2 + 3*(5*3+3)/2.
a(118) = 1 since 118 = 2^2 + 3*(3*3+1)/2 + 6*(5*6+3)/2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-y(3y+1)/2-z(5z+3)/2],r=r+1],{y,0,(Sqrt[24n+1]-1)/6},{z,0,(Sqrt[40(n-y(3y+1)/2)+9]-3)/10}];
    Print[n," ",r];Continue,{n,0,100}]

A367964 Triangle of 2-parameter triangular numbers, read by rows. T(n, k) = (n*(n + 1) + k*(k + 1)) / 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 6, 7, 9, 12, 10, 11, 13, 16, 20, 15, 16, 18, 21, 25, 30, 21, 22, 24, 27, 31, 36, 42, 28, 29, 31, 34, 38, 43, 49, 56, 36, 37, 39, 42, 46, 51, 57, 64, 72, 45, 46, 48, 51, 55, 60, 66, 73, 81, 90, 55, 56, 58, 61, 65, 70, 76, 83, 91, 100, 110
Offset: 0

Views

Author

Peter Luschny, Dec 07 2023

Keywords

Comments

If the rows of the triangle are extended for k > n, the array A144216 is created, which is symmetrical to the main diagonal and therefore contains no new information compared to this triangle.

Examples

			Triangle T(n, k) starts:
  0 |  0;
  1 |  1,  2;
  2 |  3,  4,  6;
  3 |  6,  7,  9, 12;
  4 | 10, 11, 13, 16, 20;
  5 | 15, 16, 18, 21, 25, 30;
  6 | 21, 22, 24, 27, 31, 36, 42;
  7 | 28, 29, 31, 34, 38, 43, 49, 56;
  8 | 36, 37, 39, 42, 46, 51, 57, 64, 72;
  9 | 45, 46, 48, 51, 55, 60, 66, 73, 81,  90;
 10 | 55, 56, 58, 61, 65, 70, 76, 83, 91, 100, 110;
.
Start at row 0, column 0 with 0. Go down by adding the column index in step n. At row n, restart the counting and go n steps right by adding the row index in step n, then change direction and go down again by adding the column index. After 3*n steps on this path you are at T(2*n, n) which is 2*triangular(n) + (triangular(2*n) - triangular(n)) = (5*n^2 + 3*n)/2. These are the sliced heptagonal numbers A147875 (see the illustration of Leo Tavares).
.
The equation T(n, k) = (n*(n + 1) + k*(k + 1))/2 can be extended to all n, k in ZZ.
  [n\k] ... -6  -5  -4  -3  -2  -1   0   1   2   3   4   5  ...
  -------------------------------------------------------------
  [-5] ..., 25, 20, 16, 13, 11, 10, 10, 11, 13, 16, 20, 25, ...
  [-4] ..., 21, 16, 12,  9,  7,  6,  6,  7,  9, 12, 16, 21, ...
  [-3] ..., 18, 13,  9,  6,  4,  3,  3,  4,  6,  9, 13, 18, ...
  [-2] ..., 16, 11,  7,  4,  2,  1,  1,  2,  4,  7, 11, 16, ...
  [-1] ..., 15, 10,  6,  3,  1,  0,  0,  1,  3,  6, 10, 15, ...
  [ 0] ..., 15, 10,  6,  3,  1,  0,  0,  1,  3,  6, 10, 15, ...
  [ 1] ..., 16, 11,  7,  4,  2,  1,  1,  2,  4,  7, 11, 16, ...
  [ 2] ..., 18, 13,  9,  6,  4,  3,  3,  4,  6,  9, 13, 18, ...
  [ 3] ..., 21, 16, 12,  9,  7,  6,  6,  7,  9, 12, 16, 21, ...
  [ 4] ..., 25, 20, 16, 13, 11, 10, 10, 11, 13, 16, 20, 25, ...
		

Crossrefs

Cf. A147875 (T(2*n, n)), A016061 (row sums), A367965 (alternating row sums), A143216 (the multiplicative equivalent), A144216 (extended array).

Programs

  • Maple
    T := (n, k) -> (n*(n + 1) + k*(k + 1)) / 2:
    for n from 0 to 10 do seq(T(n, k), k = 0..n) od;
  • Mathematica
    Module[{n=1},NestList[Append[#+n,n*++n]&,{0},10]] (* or *)
    Table[(n(n+1)+k(k+1))/2,{n,0,10},{k,0,n}] (* Paolo Xausa, Dec 07 2023 *)
  • Python
    # A purely additive construction:
    from functools import cache
    @cache
    def a_row(n: int) -> list[int]:
        if n == 0: return [0]
        row = a_row(n - 1) + [0]
        for k in range(n): row[k] += n
        row[n] = row[n - 1] + n
        return row

Formula

Recurrence: T(n, n) = n + T(n, n-1) starting with T(0, 0) = 0.
For k <> n: T(n, k) = n + T(n-1, k).
T(n, k) = t(n) + t(k), where t(n) are the triangular numbers A000217.
G.f.: (x + x*(2 - 5*x + x^2)*y + x^4*y^2)/((1 - x)^3*(1 - x*y)^3). - Stefano Spezia, Dec 07 2023

A225839 Triangular numbers representable as triangular(m) + triangular(2m).

Original entry on oeis.org

0, 378, 17766, 39209940, 1842032556, 4065365016846, 190985619471570, 421505175637435176, 19801770996209306328, 43702499616375188919330, 2053087220237987679246270, 4531162564803507161896556028, 212868189148913267563402477956, 469799997000254729943383533193910
Offset: 1

Views

Author

Alex Ratushnyak, May 17 2013

Keywords

Comments

Triangular numbers of the sequence A147875: a(n) = A147875(A225785(n)) - see also Ralf Stephan in Program lines. [Bruno Berselli, May 20 2013]

Crossrefs

Cf. A108281 (triangular numbers representable as triangular(m) + m^2).
Cf. A225785 (numbers n such that triangular(n) + triangular(2n) is a triangular number).

Programs

  • Mathematica
    CoefficientList[Series[378 x (1 + 46 x + x^2)/((1 - x) (1 - 322 x + x^2) (1 + 322 x + x^2)), {x, 0, 20}], x] (* Bruno Berselli, May 20 2013 *)
    LinearRecurrence[{1,103682,-103682,-1,1},{0,378,17766,39209940,1842032556},20] (* Harvey P. Dale, Jan 16 2019 *)
  • PARI
    for(n=1,10^9,t=n*(5*n+3)/2;x=sqrtint(2*t);if(t==x*(x+1)/2,print(t))) \\ Ralf Stephan, May 17 2013

Formula

G.f.: 378*x*(1+46*x+x^2)/((1-x)*(1-322*x+x^2)*(1+322*x+x^2)). [Bruno Berselli, May 20 2013]

Extensions

More terms from Bruno Berselli, May 20 2013

A332495 a(n-2) = a(n-6) + 5*(1+2*n) with a(0)=0, a(1)=2, a(2)=7, a(3)=15 for n>=4.

Original entry on oeis.org

0, 2, 7, 15, 25, 37, 52, 70, 90, 112, 137, 165, 195, 227, 262, 300, 340, 382, 427, 475, 525, 577, 632, 690, 750, 812, 877, 945, 1015, 1087, 1162, 1240, 1320, 1402, 1487, 1575, 1665, 1757, 1852, 1950, 2050, 2152, 2257
Offset: 0

Views

Author

Paul Curtz, Feb 14 2020

Keywords

Comments

a(-2)=2, a(-1)=0. 4 evens followed by 4 odds.
Last digit is only 0, 2, 5, 7.
The vertical spoke S-N of the pentagonal spiral for A004526.
37
37 25 25
36 24 15 15 26
36 24 14 7 8 16 26
35 23 14 7 2 3 8 16 27
35 23 13 6 2 0 0 3 9 17 27
34 22 13 6 1 1 4 9 17 28
34 22 12 5 5 4 10 18 28
33 21 12 11 11 10 18 29
33 21 20 20 19 19 29
32 32 31 31 30 30
Rank of multiples of 10: 0, 7, 8, 15, 16, ... = A047521. Compare to A154260 in the formula.

Crossrefs

Cf. A004526, A033429, A062786, A168668, A135706, A147874, 2*A147875 (all in the spiral).

Programs

  • Mathematica
    CoefficientList[Series[x (2 + x + 2 x^2)/((1 - x)^3*(1 + x^2)), {x, 0, 42}], x] (* Michael De Vlieger, Feb 14 2020 *)
  • PARI
    concat(0, Vec(x*(2 + x + 2*x^2) / ((1 - x)^3*(1 + x^2)) + O(x^40))) \\ Colin Barker, Feb 14 2020

Formula

a(-1-n) = a(n).
a(2*n) + a(1+2*n) = 2, 22, 62, ... = A273366(n).
Second differences give the sequence of period 4: repeat [3, 3, 2, 2].
From Colin Barker, Feb 14 2020: (Start)
G.f.: x*(2 + x + 2*x^2) / ((1 - x)^3*(1 + x^2)).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>4.
(End)
Multiples of 10: 10*(0, 7, 9, 30, 34, ... = A154260).
4*a(n) = A087960(n) +5*n -1 +5*n^2. - R. J. Mathar, Feb 28 2020
Previous Showing 21-30 of 33 results. Next