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

A085780 Numbers that are a product of 2 triangular numbers.

Original entry on oeis.org

0, 1, 3, 6, 9, 10, 15, 18, 21, 28, 30, 36, 45, 55, 60, 63, 66, 78, 84, 90, 91, 100, 105, 108, 120, 126, 135, 136, 150, 153, 165, 168, 171, 190, 198, 210, 216, 225, 231, 234, 253, 270, 273, 276, 280, 300, 315, 325, 330, 351, 360, 378, 396, 406, 408, 420, 435, 441
Offset: 1

Views

Author

Jon Perry, Jul 23 2003

Keywords

Comments

Is there a fast algorithm for detecting these numbers? - Charles R Greathouse IV, Jan 26 2013
The number of rectangles with positive width 1<=w<=i and positive height 1<=h<=j contained in an i*j rectangle is t(i)*t(j), where t(k)=A000217(k), see A096948. - Dimitri Boscainos, Aug 27 2015

Examples

			18 = 3*6 = t(2)*t(3) is a product of two triangular numbers and therefore in the sequence.
		

Crossrefs

Cf. A000217, A085782, A068143, A000537 (subsequence), A006011 (subsequence), A033487 (subsequence), A188630 (subsequence).
Cf. A072389 (this times 4).

Programs

  • Maple
    isA085780 := proc(n)
         local d;
         for d in numtheory[divisors](n) do
            if d^2 > n then
                return false;
            end if;
            if isA000217(d) then
                if isA000217(n/d) then
                    return true;
                end if;
            end if;
        end do:
        return false;
    end proc:
    for n from 1 to 1000 do
        if isA085780(n) then
            printf("%d,",n) ;
        end if ;
    end do: # R. J. Mathar, Nov 29 2015
  • Mathematica
    t1 = Table[n (n+1)/2, {n, 0, 100}];Select[Union[Flatten[Outer[Times, t1, t1]]], # <= t1[[-1]] &] (* T. D. Noe, Jun 04 2012 *)
  • PARI
    A003056(n)=(sqrtint(8*n+1)-1)\2
    list(lim)=my(v=List([0]),t); for(a=1, A003056(lim\1), t=a*(a+1)/2; for(b=a, A003056(lim\t), listput(v,t*b*(b+1)/2))); vecsort(Vec(v),,8) \\ Charles R Greathouse IV, Jan 26 2013
    
  • Python
    from itertools import count, islice
    from sympy import divisors, integer_nthroot
    def A085780_gen(startvalue=0): # generator of terms
        if startvalue <= 0:
            yield 0
        for n in count(max(startvalue,1)):
            for d in divisors(m:=n<<2):
                if d**2 > m:
                    break
                if integer_nthroot((d<<2)+1,2)[1] and integer_nthroot((m//d<<2)+1,2)[1]:
                    yield n
                    break
    A085780_list = list(islice(A085780_gen(),10)) # Chai Wah Wu, Aug 28 2022

Formula

Conjecture: There are about sqrt(x)*log(x) terms up to x. - Charles R Greathouse IV, Jul 11 2024

Extensions

More terms from Max Alekseyev and Jon E. Schoenfield, Sep 04 2009

A004320 a(n) = n*(n+1)*(n+2)^2/6.

Original entry on oeis.org

0, 3, 16, 50, 120, 245, 448, 756, 1200, 1815, 2640, 3718, 5096, 6825, 8960, 11560, 14688, 18411, 22800, 27930, 33880, 40733, 48576, 57500, 67600, 78975, 91728, 105966, 121800, 139345, 158720, 180048, 203456, 229075, 257040, 287490, 320568, 356421, 395200
Offset: 0

Views

Author

Keywords

Comments

Consider the set B(n) = {1,2,3,...n}. Let a(0) = 0. Then a(n) = Sum [ b(i)^2 - b(j)^2] for all i, j = 1 to n, b(i) belongs to B(n). E.g., a(3) = (3^2-1^2) + (3^2-2^2) + (2^2-1^2) = 16. - Amarnath Murthy, Jun 01 2001
Partial sums of A016061. - J. M. Bergot, Jun 18 2013
For n >= 3, a(n-2) is the number of permutations of n symbols that 3-commute with an n-cycle (see A233440 for definition). - Luis Manuel Rivera Martínez, Feb 24 2014
a(n) is the sum of all pairs with repetitions allowed drawn from the set of triangular numbers from A000217(0) to A000217(n). This is similar to A027480 but uses triangular numbers instead of the integers. Example for n=2: 0+1, 0+3, 1+1, 1+3, 3+3 gives sum of 16 = a(2). - J. M. Bergot, Mar 23 2016
From Mircea Dan Rus, Jul 29 2020: (Start)
a(n) is the number of lattice rectangles (squares included) inside half of an Aztec diamond of order n. This shape is obtained by stacking n rows of consecutive unit lattice squares, with the centers of rows vertically aligned and consisting successively of 2n, 2n-2,..., 4, 2 squares. See below the representation for n=6.
||_|_
||_|||_
||_|||_||
||_|||_|||_|_
||_|||_|||_|||_
|||_|||_|||_|||_|
(End)
a(n-1) = (n+1)*binomial(n+1, 3) is the number of certain rectangles (squares included) in an n X n square filled with 1 X 1 squares. Divide the n X n square, for n >= 2, into two complementary staircases by the boundary consisting of 2*n length 1 edges. For n = 1 there is no boundary. See a A000332 figure in the Mircea Dan Rus comment for the staircase with basis length n = 4. The complementary staircase is upside down with basis length n-1 = 3. Then a(n-1) is the number of rectangles in the n X n square which have at least one border link in their interior. This counting is based on the binomial identity given in the formula section, using A096948 (for n=m), A000332(n+3) and A000332(n+2). - Wolfdieter Lang, Sep 22 2020

Crossrefs

Programs

Formula

G.f.: x*(3+x)/(1-x)^5. - Paul Barry, Feb 27 2003
a(n) = (n+2)*A000292(n). - Zerinvary Lajos, May 26 2006
a(n) = A047929(n+2)/6. - Zerinvary Lajos, May 09 2007
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Oct 28 2014
a(n) = 3*A000332(n+3) + A000332(n+2). - Mircea Dan Rus, Jul 29 2020
Sum_{n>=1} 1/a(n) = Pi^2/2 - 9/2. - Jaume Oliver Lafont, Jul 13 2017
a(n-1) = T(n)^2 - (s(n) + s(n-1)), with T(n) = binomial(n+1, 2) = A000217(n) and s(n) = binomial(n+3, 4) = A000332(n+3), for n >= 1. See a comment above, and the formula by Mircea Dan Rus. - Wolfdieter Lang, Sep 22 2020
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/4 + 12*log(2) - 21/2. - Amiram Eldar, Jan 28 2022
E.g.f.: exp(x)*x*(18 + 30*x + 11*x^2 + x^3)/6. - Stefano Spezia, Mar 04 2023
a(n) = Sum_{j=0..n+1} binomial(n+1,2) + binomial(n+1,3). - Detlef Meya, Jan 20 2024

A004302 a(n) = n^2*(n+1)^2*(n+2)/12.

Original entry on oeis.org

0, 1, 12, 60, 200, 525, 1176, 2352, 4320, 7425, 12100, 18876, 28392, 41405, 58800, 81600, 110976, 148257, 194940, 252700, 323400, 409101, 512072, 634800, 780000, 950625, 1149876, 1381212, 1648360, 1955325, 2306400, 2706176, 3159552, 3671745, 4248300, 4895100
Offset: 0

Views

Author

Keywords

Comments

Kekulé numbers for certain benzenoids. - Emeric Deutsch, Jun 19 2005
a(n-2), n>=3, is the number of ways to have n identical objects in m=3 of altogether n distinguishable boxes (n-3 boxes stay empty). - Wolfdieter Lang, Nov 13 2007
Starting with offset 1 = row sums of triangle A096948 and binomial transform of [1, 11, 37, 55, 38, 10, 0, 0, 0, ...]. - Gary W. Adamson, Aug 08 2008

Examples

			a(3)=60 because n=5 identical balls can be put into m=3 of n=5 distinguishable boxes in binomial(5,3)*(3!/(2!*1!)+ 3!/(1!*2!) ) = 10*(3+3) = 60 ways. The m=3 part partitions of 5, namely (1^2,3) and (1,2^2) specify the filling of each of the 10 possible three-box choices. - _Wolfdieter Lang_, Nov 13 2007
		

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p. 233, # 11).
  • T. A. Gulliver, Sequences from Cubes of Integers, Int. Math. Journal, 4 (2003), 439-445.

Crossrefs

Third column of triangle A103371.
Main diagonal of A103252.

Programs

  • Haskell
    a004302 0 = 0
    a004302 n = a103371 (n + 1) 2 -- Reinhard Zumkeller, Apr 04 2014
    
  • Magma
    [n^2*(n+1)^2*(n+2)/12: n in [0..40]]; // Vincenzo Librandi, May 22 2011
    
  • Maple
    a:=n->n^2*(n+1)^2*(n+2)/12: seq(a(n),n=0..33); # Emeric Deutsch, Jun 19 2005
  • Mathematica
    Table[n^2 (n+1)^2 (n+2)/12,{n,0,30}] (* or *) LinearRecurrence[{6,-15,20, -15,6,-1}, {0,1,12,60,200,525}, 30] (* Harvey P. Dale, Oct 19 2014 *)
  • PARI
    a(n)=n^2*(n+1)^2*(n+2)/12 \\ Charles R Greathouse IV, Oct 07 2015
    
  • SageMath
    def A004302(n): return 3*binomial(n+2,3)^2//(n+2)
    print([A004302(n) for n in range(41)]) # G. C. Greubel, Mar 12 2025

Formula

From Paul Barry, Feb 03 2005: (Start)
G.f.: x*(1 + 6*x + 3*x^2)/(1 - x)^6.
a(n) = C(n, 2)*C(n+1, 3). (End)
a(n) = 3*C(n+2,3)^2/(n+2). - Zerinvary Lajos, May 09 2008
a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>5. - Harvey P. Dale, Oct 19 2014
a(n) = A000217(n)*A000292(n). - Bruno Berselli, Jan 13 2015
a(n) = Sum_{k=0..n} Sum_{i=0..n} i*C(k+1,k-1). - Wesley Ivan Hurt, Sep 21 2017
a(n) = Sum_{i=0..n} (n+2)*(n-i)^3/3. - Bruno Berselli, Oct 31 2017
From Amiram Eldar, May 29 2022: (Start)
Sum_{n>=1} 1/a(n) = 3*Pi^2 - 57/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 45/2 - Pi^2/2 - 24*log(2). (End)
E.g.f.: exp(x)*x*(12 + 60*x + 54*x^2 + 14*x^3 + x^4)/12. - Stefano Spezia, May 22 2023

A381503 Number of rectangles in a Fibonacci(n) X Fibonacci(n+1) grid.

Original entry on oeis.org

1, 3, 18, 90, 540, 3276, 21021, 137445, 916300, 6167700, 41812200, 284604840, 1942428033, 13278352815, 90862598190, 622150990734, 4261620339460, 29198279495220, 200080147593645, 1371167039301345, 9397260307853496, 64406143791454248, 441430873666787088, 3025546968019741200
Offset: 1

Views

Author

Darío Clavijo, Feb 25 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Times @@@ Partition[PolygonalNumber[Fibonacci[Range[25]]], 2, 1] (* Paolo Xausa, Mar 13 2025 *)
  • Python
    from sympy import fibonacci
    A096948 = lambda n,m: (m * (m + 1) * n * (n + 1)) >> 2
    a = lambda n: A096948(fibonacci(n),fibonacci(n+1))
    print([a(n) for n in range(1, 25)])

Formula

a(n) = A096948(Fibonacci(n),Fibonacci(n+1)).
a(n) = A033192(n) * A033192(n+1).

A289832 Triangle read by rows: T(n,k) = number of rectangles all of whose vertices lie on an (n+1) X (k+1) rectangular grid.

Original entry on oeis.org

1, 3, 10, 6, 20, 44, 10, 33, 74, 130, 15, 49, 110, 198, 313, 21, 68, 152, 276, 443, 640, 28, 90, 200, 364, 592, 866, 1192, 36, 115, 254, 462, 756, 1113, 1550, 2044, 45, 143, 314, 570, 935, 1385, 1944, 2586, 3305, 55, 174, 380, 688, 1129, 1680, 2370, 3172, 4081, 5078
Offset: 1

Views

Author

Hector J. Partridge, Jul 13 2017

Keywords

Comments

T(n,k) is the number of rectangles (including squares) that can be drawn on an (n+1) X (k+1) grid.
The diagonal of T(n,k) is the number of rectangles in a square lattice (A085582), i.e., T(n,n) = A085582(n+1).
Column k=1 equals A000217.
Column k=2 equals A140229 for n >= 3 as the only oblique rectangles are squares of side length sqrt(2), leading to the same formula.

Examples

			Triangle T(n,k) begins:
n/k  1    2    3    4     5     6     7     8     9    10
1    1
2    3   10
3    6   20   44
4   10   33   74  130
5   15   49  110  198   313
6   21   68  152  276   443   640
7   28   90  200  364   592   866  1192
8   36  115  254  462   756  1113  1550  2044
9   45  143  314  570   935  1385  1944  2586  3305
10  55  174  380  688  1129  1680  2370  3172  4081  5078
e.g., there are T(3,3) =  44 rectangles in a 4 X 4 lattice:
There are A096948(3,3) = 36 rectangles whose sides are parallel to the axes;
There are 4 squares with side length sqrt(2);
There are 2 squares with side length sqrt(5);
There are 2 rectangles with side lengths sqrt(2) X 2 sqrt(2).
		

Crossrefs

Programs

  • Python
    from math import gcd
    def countObliques(a,b,c,d,n,k):
        if(gcd(a, b) == 1): #avoid double counting
            boundingBox={'width':(b * c) + (a * d),'height':(a * c) + (b * d)}
            if(boundingBox['width']A096948
        ret=(n*(n-1)*k*(k-1))/4
        #oblique rectangles
        ret+=sum(countObliques(a,b,c,d,n,k) for a in range(1,n) \
                                            for b in range(1,n) \
                                            for c in range(1,k) \
                                            for d in range(1,k))
        return ret
    Tnk=[[totalRectangles(n+1,k+1) for k in range(1, n+1)] for n in range(1, 20)]
    print(Tnk)
Showing 1-5 of 5 results.