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 41-50 of 193 results. Next

A224262 T(n,k) = number of n X k 0..2 arrays with rows, diagonals and antidiagonals unimodal and columns nondecreasing.

Original entry on oeis.org

3, 9, 6, 22, 36, 10, 46, 158, 100, 15, 86, 548, 648, 225, 21, 148, 1600, 3096, 2017, 441, 28, 239, 4102, 12032, 12467, 5246, 784, 36, 367, 9503, 40182, 59855, 41012, 11990, 1296, 45, 541, 20299, 119367, 240829, 238366, 116692, 24842, 2025, 55, 771, 40570
Offset: 1

Views

Author

R. H. Hardin, Apr 02 2013

Keywords

Examples

			Table starts:
   3    9     22      46       86       148        239         367          541
   6   36    158     548     1600      4102       9503       20299        40570
  10  100    648    3096    12032     40182     119367      322885       808618
  15  225   2017   12467    59855    240829     850875     2717731      8000608
  21  441   5246   41012   238366   1122522    4542734    16423026     54399996
  28  784  11990  116692   816361   4480391   20568693    82733667    301228048
  36 1296  24842  296646  2485967  15921905   83124099   371699763   1478187738
  45 2025  47643  688533  6868203  51343083  306179180  1530419762   6671184875
  55 3025  85838 1482310 17467782 152072846 1038489172  5835731860  28072690614
  66 4356 146878 2995516 41364960 417672794 3266157979 20709405119 110622071553
  ...
Some solutions for n=3 k=4:
..1..1..0..0....1..1..1..1....1..1..2..1....0..2..1..0....0..0..0..0
..2..1..1..0....1..2..2..1....2..2..2..1....0..2..1..1....0..0..2..0
..2..2..1..1....2..2..2..1....2..2..2..2....0..2..2..1....0..0..2..2
		

Crossrefs

Main diagonal is A224256.
Columns 1..7 are A000217(n+1), A000537(n+1), A224257, A224258, A224259, A224260, A224261.
Cf. A223838.

Formula

Empirical: columns k=1..7 are polynomials of order 2*k for n>0,0,0,2,4,6,8.
Empirical: rows n=1..7 are polynomials of degree 4*n for k>0,0,0,2,4,6,8.

Extensions

Name corrected by Andrew Howroyd, Mar 18 2025

A159065 Number of crossings in a regular drawing of the complete bipartite graph K(n,n).

Original entry on oeis.org

0, 1, 7, 27, 65, 147, 261, 461, 737, 1143, 1637, 2349, 3217, 4401, 5769, 7457, 9433, 11945, 14753, 18235, 22173, 26771, 31801, 37813, 44449, 52161, 60489, 69955, 80289, 92203, 104941, 119493, 135261, 152705, 171205, 191649, 213473, 237877
Offset: 1

Views

Author

Stéphane Legendre, Apr 04 2009, Jul 11 2009

Keywords

Examples

			For n = 3 draw vertically 3 points regularly spaced on the right, and 3 points regularly spaced on the left. Join the left and right points by straight lines. These lines cross at c(3) = 7 points.
		

References

  • Umberto Eco, Foucault's Pendulum. San Diego: Harcourt Brace Jovanovich, p. 473, 1989.
  • Athanasius Kircher (1601-1680). Ars Magna Sciendi, In XII Libros Digesta, qua nova et universali Methodo Per Artificiosum Combinationum contextum de omni re proposita plurimis et prope infinitis rationibus disputari, omniumque summaria quaedam cognitio comparari potest, Amstelodami, Apud Joannem Janssonium a Waesberge, et Viduam Elizei Weyerstraet, 1669, fol., pp. 482 (altra ed.: Amstelodami.(ut supra), 1671).

Crossrefs

Programs

  • Maple
    A159065 := proc(n)
        local a,b,c ;
        c := 0 ;
        for a from 1 to n-1 do
        for b from 1 to n-1 do
            if igcd(a,b) = 1 then
                c := c+(n-a)*(n-b) ;
                if 2*a< n and 2*b < n then
                    c := c-(n-2*a)*(n-2*b) ;
                end if;
            end if;
        end do:
        end do:
        c ;
    end proc:
    seq(A159065(n),n=1..30); # R. J. Mathar, Jul 20 2017
  • Mathematica
    a[n_] := Module[{x, y, s1 = 0, s2 = 0}, For[x = 1, x <= n-1, x++, For[y = 1, y <= n-1, y++, If[GCD[x, y] == 1, s1 += (n-x)*(n-y); If[2*x <= n-1 && 2*y <= n-1, s2 += (n-2*x)*(n-2*y)]]]]; s1-s2]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jan 10 2014, translated from Joerg Arndt's PARI code *)
  • PARI
    a(n) = {
        my(s1=0, s2=0);
        for (x=1, n-1,
            for (y=1, n-1,
                if ( gcd(x, y)==1,
                    s1 += (n-x) * (n-y);
                    if ( ( 2*x<=n-1) && (2*y<=n-1),
                        s2 += (n-2*x) * (n-2*y); );
                 );
            );
        );
        return( s1 - s2 );
    }
    \\ Joerg Arndt, Oct 13 2013
    
  • Pascal
    s1:=0; s2:=0;
    for a:=1 to n-1 do
       for b:=1 to n-1 do
          if gcd(a, b)=1 then
          begin
             s1:=s1+(n-a)*(n-b);
             if (2*a<=n-1) and (2*b<=n-1) then
                s2:=s2+(n-2*a)*(n-2*b);
          end;
    a:=s1-s2;
    
  • Python
    from math import gcd
    def a159065(n):
        c=0
        for a in range(1, n):
            for b in range(1, n):
                if gcd(a, b)==1:
                    c+=(n - a)*(n - b)
                    if 2*aIndranil Ghosh, Jul 20 2017
    
  • Python
    from sympy import totient
    def A159065(n): return n-1 if n <= 2 else 2*n-3+3*sum(totient(i)*(n-i)*i for i in range(2,(n+1)//2)) + sum(totient(i)*(n-i)*(2*n-i) for i in range((n+1)//2,n)) # Chai Wah Wu, Aug 16 2021

Formula

a(n) = Sum((n-a)*(n-b); 1<=a
a(n) = (9/(8*Pi^2))*n^4 + O(n^3 log(n)). Asymptotic to (9/(2*Pi^2))*A000537(n-1).
For n > 2: a(n) = A115004(n-1)-(n-2)^2-2*Sum{n=2..floor((n-1)/2)} (n-2i)*(n-i)*phi(i) = 2n-3+3*Sum{n=2..floor((n-1)/2)}(n-i)*i*phi(i) + Sum_{n=floor((n+1)/2)..n-1} (n-i)*(2n-i)*phi(i). - Chai Wah Wu, Aug 16 2021

A224012 T(n,k)=Number of nXk 0..2 arrays with rows nondecreasing and antidiagonals unimodal.

Original entry on oeis.org

3, 6, 9, 10, 36, 27, 15, 100, 216, 81, 21, 225, 868, 1296, 243, 28, 441, 2661, 7378, 7776, 729, 36, 784, 6815, 28541, 62764, 46656, 2187, 45, 1296, 15340, 90051, 297859, 534352, 279936, 6561, 55, 2025, 31324, 245055, 1108969, 3094127, 4549684, 1679616
Offset: 1

Author

R. H. Hardin Mar 30 2013

Keywords

Comments

Table starts
.....3........6.........10..........15...........21............28............36
.....9.......36........100.........225..........441...........784..........1296
....27......216........868........2661.........6815.........15340.........31324
....81.....1296.......7378.......28541........90051........245055........595822
...243.....7776......62764......297859......1108969.......3516324.......9866389
...729....46656.....534352.....3094127.....13275381......47735665.....150787422
..2187...279936....4549684....32148473....157347899.....630339756....2200064042
..6561..1679616...38737252...334179881...1859567103....8213689391...31256208954
.19683.10077696..329817976..3474343713..21962353421..106375878027..437370837827
.59049.60466176.2808146488.36122604265.259365424097.1373916879120.6067995150599

Examples

			Some solutions for n=3 k=4
..1..1..2..2....0..1..1..1....0..0..0..0....0..0..0..1....0..2..2..2
..0..2..2..2....0..1..1..1....0..1..2..2....2..2..2..2....0..0..1..1
..1..1..2..2....0..2..2..2....1..2..2..2....2..2..2..2....0..0..2..2
		

Crossrefs

Column 1 is A000244
Column 2 is A000400
Row 1 is A000217(n+1)
Row 2 is A000537(n+1)

Formula

Empirical: columns k=1..7 have recurrences of order 1,1,5,7,11,14,19
Empirical: rows n=1..7 are polynomials of degree 2*n for k>0,0,1,2,3,4,5

A224353 T(n,k)=Number of nXk 0..2 arrays with diagonals and antidiagonals unimodal and rows nondecreasing.

Original entry on oeis.org

3, 6, 9, 10, 36, 27, 15, 100, 216, 81, 21, 225, 788, 1296, 243, 28, 441, 2321, 5880, 7776, 729, 36, 784, 5840, 19608, 45064, 46656, 2187, 45, 1296, 13052, 57387, 160362, 349280, 279936, 6561, 55, 2025, 26610, 151010, 495985, 1351748, 2710892, 1679616
Offset: 1

Author

R. H. Hardin Apr 04 2013

Keywords

Comments

Table starts
.....3........6.........10.........15..........21..........28...........36
.....9.......36........100........225.........441.........784.........1296
....27......216........788.......2321........5840.......13052........26610
....81.....1296.......5880......19608.......57387......151010.......363392
...243.....7776......45064.....160362......495985.....1421762......3816783
...729....46656.....349280....1351748.....4231138....12340932.....34697869
..2187...279936....2710892...11704964....37433596...107694133....300892325
..6561..1679616...21021916..102319662...342170839...977742699...2654062881
.19683.10077696..163012744..895494806..3178789749..9202126546..24422915139
.59049.60466176.1264202660.7833508842.29672959682.88363107023.233364588801

Examples

			Some solutions for n=3 k=4
..1..1..1..2....0..0..1..1....0..0..2..2....1..2..2..2....0..2..2..2
..1..1..1..2....0..0..2..2....0..1..1..2....0..1..2..2....1..1..2..2
..0..0..1..2....0..1..1..1....0..1..1..2....1..2..2..2....1..1..1..2
		

Crossrefs

Column 1 is A000244
Column 2 is A000400
Row 1 is A000217(n+1)
Row 2 is A000537(n+1)

Formula

Empirical: columns k=1..6 have recurrences of order 1,1,10,26,56,98
Empirical: rows n=1..7 are polynomials of degree 2*n for k>0,0,1,3,5,7,9

A060300 a(n) = (2*n*(n+1))^2.

Original entry on oeis.org

0, 16, 144, 576, 1600, 3600, 7056, 12544, 20736, 32400, 48400, 69696, 97344, 132496, 176400, 230400, 295936, 374544, 467856, 577600, 705600, 853776, 1024144, 1218816, 1440000, 1690000, 1971216, 2286144, 2637376, 3027600, 3459600, 3936256, 4460544, 5035536, 5664400
Offset: 0

Author

Jason Earls, Mar 25 2001

Keywords

Comments

Arises from middle column 4^2, 12^2, 24^2, ... of following triangle: :
3^2 + 4^2 = 5^2
10^2 + 11^2 + 12^2 = 13^2 + 14^2
21^2 + 22^2 + 23^2 + 24^2 = 25^2 + 26^2 + 27^2
36^2 + 37^2 + 38^2 + 39^2 + 40^2 = 41^2 + 42^2 + 43^2 + 44^2
...

References

  • C. Stanley Ogilvy and John T. Anderson, Excursions in Number Theory, Oxford University Press, NY, 1966, pp. 90-92.

Programs

  • Magma
    [(2*n*(n+1))^2: n in [0..30]]; // Vincenzo Librandi, Nov 18 2016
  • Mathematica
    CoefficientList[Series[16 x (1 + 4 x + x^2) / (1 - x)^5, {x, 0, 33}], x] (* Vincenzo Librandi, Nov 18 2016 *)
    Table[(2n(n+1))^2,{n,0,30}] (* Harvey P. Dale, Jan 19 2019 *)
  • PARI
    a(n) = { (2*n*(n + 1))^2 } \\ Harry J. Smith, Jul 03 2009
    

Formula

G.f.: 16*x*(1+4*x+x^2)/(1-x)^5. - Colin Barker, Apr 22 2012
a(n) = 4*A035287(n+1) = 4*A002378(n)^2. - Michel Marcus, May 24 2016
a(n) = 16*A000537(n) = 16*(n*(n+1)/2)^2 = 16*A000217(n)^2 = A046092(n)^2. - Bruce J. Nicholson, Jun 05 2017
a(n) = Integral_{x=1..2*n+1} (x^3-x) dx. - César Aguilera, Jun 27 2020
From Elmo R. Oliveira, Aug 14 2025: (Start)
E.g.f.: 4*x*(2 + x)*(2 + 6*x + x^2)*exp(x).
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = 2*A254371(n) = 8*A163102(n). (End)

Extensions

Name corrected by Harry J. Smith, Jul 03 2009

A085582 The number of rectangles (orthogonal or not) with corners on an n X n grid of points.

Original entry on oeis.org

0, 1, 10, 44, 130, 313, 640, 1192, 2044, 3305, 5078, 7524, 10750, 14993, 20388, 27128, 35448, 45665, 57922, 72636, 89970, 110297, 133976, 161440, 192860, 228857, 269758, 316012, 367974, 426417, 491468, 564120, 644640, 733633, 831674, 939292
Offset: 1

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 06 2003

Keywords

Examples

			a(3) = 10 because on the 3 X 3 grid there are four 1 X 1 rectangles, two 1 X 2s, two 2 X 1's, one 2 X 2 and one 45-degree rectangle, sqrt(2) X sqrt(2).
		

Crossrefs

Cf. A000537, A002415, A113751 (diagonal rectangles on an n X n grid).

Formula

a(n) = A000537(n-1) + A113751(n). - T. D. Noe, Nov 09 2005 [corrected by David Radcliffe, Feb 06 2020]
a(n) = n*(n-1)^2*(2n-1)/6 + 2*Sum_{a,b>0, 0David Radcliffe, Feb 06 2020

Extensions

Edited by Don Reble, Nov 05 2005

A094414 Triangle T read by rows: dot product <1,2,...,r> * .

Original entry on oeis.org

1, 5, 4, 14, 11, 11, 30, 24, 22, 24, 55, 45, 40, 40, 45, 91, 76, 67, 64, 67, 76, 140, 119, 105, 98, 98, 105, 119, 204, 176, 156, 144, 140, 144, 156, 176, 285, 249, 222, 204, 195, 195, 204, 222, 249, 385, 340, 305, 280, 265, 260, 265, 280, 305, 340, 506, 451, 407, 374, 352, 341, 341, 352, 374, 407, 451
Offset: 0

Author

Ralf Stephan, May 02 2004

Keywords

Comments

Offset for r (the rows) is 1, for s (the columns) it is 0.

Examples

			Triangle begins as:
   1;
   5,  4;
  14, 11, 11;
  30, 24, 22, 24;
  55, 45, 40, 40, 45;
  91, 76, 67, 64, 67, 76;
		

Crossrefs

Row sums are A000537.
See also A094415, A088003.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n-1], k-> n*((n+1)*(2*n+1) -3*k*(n-k))/6 ))); # G. C. Greubel, Oct 30 2019
  • Magma
    [n*((n+1)*(2*n+1) -3*k*(n-k))/6: k in [0..n-1], n in [0..12]]; // G. C. Greubel, Oct 30 2019
    
  • Maple
    T:=proc(r,s) if s>=r then 0 else r*(2*r^2+3*r+1-3*r*s+3*s^2)/6 fi end: for r from 1 to 11 do seq(T(r,s),s=0..r-1) od; # yields sequence in triangular form # Emeric Deutsch, Nov 27 2006
  • Mathematica
    Table[n*((n+1)*(2*n+1) -3*k*(n-k))/6, {n,0,12}, {k,0,n-1}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
  • PARI
    T(n,k) = n*((n+1)*(2*n+1) -3*k*(n-k))/6;
    for(n=0,12, for(k=0,n-1, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 30 2019
    
  • Sage
    [[n*((n+1)*(2*n+1) -3*k*(n-k))/6 for k in (0..n-1)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
    

Formula

T(r, s) = r*(2*r^2 + 3*r - 3*r*s + 1 + 3*s^2)/6, r >= 1, 0 <= s <= r-1.

Extensions

More terms from G. C. Greubel, Oct 30 2019

A224190 T(n,k) = Number of n X k 0..2 arrays with rows unimodal and columns nondecreasing.

Original entry on oeis.org

3, 9, 6, 22, 36, 10, 46, 158, 100, 15, 86, 548, 684, 225, 21, 148, 1600, 3526, 2205, 441, 28, 239, 4102, 14751, 15779, 5852, 784, 36, 367, 9503, 52591, 89380, 55438, 13524, 1296, 45, 541, 20299, 165212, 422488, 408222, 163746, 28176, 2025, 55, 771, 40570
Offset: 1

Author

R. H. Hardin Apr 01 2013

Keywords

Comments

Table starts
..3....9.....22......46.......86........148.........239..........367
..6...36....158.....548.....1600.......4102........9503........20299
.10..100....684....3526....14751......52591......165212.......468292
.15..225...2205...15779....89380.....422488.....1727738......6272940
.21..441...5852...55438...408222....2469182....12741432.....57644194
.28..784..13524..163746..1519738...11444292....72710554....400958714
.36.1296..28176..424326..4844576...44435746...340780382...2249643632
.45.2025..54153..992607.13669953..150015321..1366188661..10635858679
.55.3025..97570.2138488.34953776..452158538..4823267213..43724068755
.66.4356.166738.4305730.82399174.1240740774.15322738603.159999462711

Examples

			Some solutions for n=3, k=4
..1..2..2..1....0..0..2..0....1..2..1..1....0..1..0..0....1..0..0..0
..1..2..2..1....1..2..2..0....1..2..1..1....0..1..2..0....1..1..0..0
..2..2..2..2....1..2..2..1....2..2..1..1....0..2..2..0....1..1..0..0
		

Crossrefs

Column 1 is A000217(n+1).
Column 2 is A000537(n+1).
Row 1 is A223718.
Row 2 is A223919.
Row 3 is A223865.

Formula

Empirical: columns k=1..7 are polynomials of degree 2*k.
Empirical: rows n=1..7 are polynomials of degree 4*n.

A236770 a(n) = n*(n + 1)*(3*n^2 + 3*n - 2)/8.

Original entry on oeis.org

0, 1, 12, 51, 145, 330, 651, 1162, 1926, 3015, 4510, 6501, 9087, 12376, 16485, 21540, 27676, 35037, 43776, 54055, 66045, 79926, 95887, 114126, 134850, 158275, 184626, 214137, 247051, 283620, 324105, 368776, 417912, 471801, 530740, 595035, 665001, 740962
Offset: 0

Author

Bruno Berselli, Jan 31 2014

Keywords

Comments

After 0, first trisection of A011779 and right border of A177708.

Crossrefs

Partial sums of A004188.
Cf. similar sequences on the polygonal numbers: A002817(n) = A000217(A000217(n)); A000537(n) = A000290(A000217(n)); A037270(n) = A000217(A000290(n)); A062392(n) = A000384(A000217(n)).
Cf. sequences of the form A000217(m)+k*A000332(m+2): A062392 (k=12); A264854 (k=11); A264853 (k=10); this sequence (k=9); A006324 (k=8); A006323 (k=7); A000537 (k=6); A006322 (k=5); A006325 (k=4), A002817 (k=3), A006007 (k=2), A006522 (k=1).

Programs

  • Magma
    [n*(n+1)*(3*n^2+3*n-2)/8: n in [0..40]];
  • Mathematica
    Table[n (n + 1) (3 n^2 + 3 n - 2)/8, {n, 0, 40}]
    LinearRecurrence[{5,-10,10,-5,1},{0,1,12,51,145},40] (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    for(n=0, 40, print1(n*(n+1)*(3*n^2+3*n-2)/8", "));
    

Formula

G.f.: x*(1 + 7*x + x^2)/(1 - x)^5.
a(n) = a(-n-1) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
a(n) = A000326(A000217(n)).
a(n) = A000217(n) + 9*A000332(n+2).
Sum_{n>=1} 1/a(n) = 2 + 4*sqrt(3/11)*Pi*tan(sqrt(11/3)*Pi/2) = 1.11700627139319... . - Vaclav Kotesovec, Apr 27 2016

A094415 Triangle T read by rows: dot product * .

Original entry on oeis.org

1, 4, 5, 10, 13, 13, 20, 26, 28, 26, 35, 45, 50, 50, 45, 56, 71, 80, 83, 80, 71, 84, 105, 119, 126, 126, 119, 105, 120, 148, 168, 180, 184, 180, 168, 148, 165, 201, 228, 246, 255, 255, 246, 228, 201, 220, 265, 300, 325, 340, 345, 340, 325, 300, 265, 286, 341
Offset: 0

Author

Ralf Stephan, May 02 2004

Keywords

Examples

			Triangle begins as:
   1;
   4,  5;
  10, 13, 13;
  20, 26, 28, 26;
  35, 45, 50, 50, 45;
  56, 71, 80, 83, 80, 71;
		

Crossrefs

Half-diagonal is A050410.
Row sums are A000537.
See also A094414, A088003.

Programs

  • GAP
    Flat(List([0..12], n-> List([0..n], k-> (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 ))); # G. C. Greubel, Oct 30 2019
  • Magma
    [(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6: k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 30 2019
    
  • Maple
    seq(seq( (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 , k=0..n), n=0..12); # G. C. Greubel, Oct 30 2019
  • Mathematica
    Table[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6, {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 30 2019 *)
  • PARI
    T(n,k) = (n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6;
    for(n=0,12, for(k=0,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Oct 30 2019
    
  • Sage
    [[(n+1)*((n+2)*(n+3) + 3*k*(n-k+1))/6 for k in (0..n)] for n in (0..12)] # G. C. Greubel, Oct 30 2019
    

Formula

T(n, k) = n*(n^2 + 3*n*(1+k) + 2 - 3*k^2)/6 for n >= 0, 0 <= k <= n.
Previous Showing 41-50 of 193 results. Next