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-20 of 82 results. Next

A034959 Divide even numbers into groups with prime(n) elements and add together.

Original entry on oeis.org

2, 18, 70, 182, 484, 884, 1666, 2546, 4048, 6612, 8928, 13172, 17794, 22274, 28576, 37524, 48380, 57340, 71556, 85626, 98550, 118658, 138112, 163404, 196134, 224220, 249672, 281838, 310650, 347136, 420624, 467670, 525806, 571846, 655898
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Examples

			{0,2} #2 S=2;
{4,6,8} #3 S=18;
{10,12,14,16,18} #5 S=70;
{20,22,24,26,28,30,32} #7 S=182.
		

Crossrefs

Programs

  • Python
    from itertools import islice
    from sympy import nextprime
    def A034959_gen(): # generator of terms
        a, p = 0, 2
        while True:
            yield p*((a<<1)+p-1)
            a, p = a+p, nextprime(p)
    A034959_list = list(islice(A034959_gen(),20)) # Chai Wah Wu, Mar 22 2023

Formula

From Hieronymus Fischer, Sep 27 2012: (Start)
a(n) = 2*Sum_{k=(A007504(n-1)+1)..A007504(n)} (k-1), n > 1.
a(n) = (A007504(n) - A007504(n-1))*(A007504(n) + A007504(n-1) - 1), n > 1.
a(n) = 2*(A000217(A007504(n) - 1) - A000217(A007504(n-1) - 1)), n > 1.
If we define A007504(0):=0, then the formulas above are also true for n=1.
a(n) = 2*A034957(n).
a(n) = A034960(n) - A000040(n).
(End)

A179268 Product of numbers between and including n and n^2.

Original entry on oeis.org

1, 24, 181440, 3487131648000, 646300418472124416000000, 3099944389915843478899995401256960000000, 844835922269816056767016893501799134566045599137792000000000
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 06 2010

Keywords

Comments

a(n) = Product_{k=n..n^2} k;
a(n) = A088020(n)/A000142(n-1).

Examples

			a(2) = 2*3*4 = 24;
a(3) = 3*4*5*6*7*8*9 = 181440.
		

Crossrefs

Programs

  • Magma
    [Factorial(n^2) / Factorial(n-1): n in [1..10]]; // Vincenzo Librandi, May 31 2011
  • Mathematica
    Table[Times@@Range[n,n^2],{n,10}] (* Harvey P. Dale, Sep 16 2020 *)

Formula

a(n) = (n^2)! / (n-1)!.

Extensions

Definition clarified by Harvey P. Dale, Sep 16 2020

A034957 Divide natural numbers in groups with prime(n) elements and add together.

Original entry on oeis.org

1, 9, 35, 91, 242, 442, 833, 1273, 2024, 3306, 4464, 6586, 8897, 11137, 14288, 18762, 24190, 28670, 35778, 42813, 49275, 59329, 69056, 81702, 98067, 112110, 124836, 140919, 155325, 173568, 210312, 233835, 262903, 285923, 327949, 355001, 393285
Offset: 1

Views

Author

Patrick De Geest, Oct 15 1998

Keywords

Comments

Natural numbers starting from 0,1,2,3,...

Examples

			{0,1} #2 S=1;
{2,3,4} #3 S=9;
{5,6,7,8,9} #5 S=35;
{10,11,12,13,14,15,16} #7 S=91.
		

Crossrefs

Programs

  • Mathematica
    {1}~Join~Map[Abs@ Apply[Subtract, Map[PolygonalNumber, #]] &, Partition[Accumulate@ Prime@ Range@ 37 - 1, 2, 1]] (* Michael De Vlieger, Oct 06 2019 *)
    Module[{nn=40,tprs},tprs=Total[Prime[Range[nn]]];Total/@TakeList[Range[0,tprs],Prime[Range[nn]]]] (* Harvey P. Dale, Apr 18 2025 *)
  • Python
    from itertools import islice
    from sympy import nextprime
    def A034957_gen(): # generator of terms
        a, p = 0, 2
        while True:
            yield p*((a<<1)+p-1)>>1
            a, p = a+p, nextprime(p)
    A034957_list = list(islice(A034957_gen(),20)) # Chai Wah Wu, Mar 22 2023

Formula

From Hieronymus Fischer, Sep 27 2012: (Start)
a(n) = Sum_{k=A007504(n-1)+1..A007504(n)} (k-1), n > 1.
a(n) = (A007504(n) - A007504(n-1))*(A007504(n) + A007504(n-1) - 1)/2, n > 1.
a(n) = (A000217(A007504(n) - 1) - A000217(A007504(n-1) - 1)), n > 1.
If we define A007504(0):=0, then the formulas above are also true for n=1.
a(n) = A034959(n)/2.
a(n) = A034956(n) - A000040(n).
(End)

A068253 1/3 of the number of colorings of an n X n square array with 3 colors.

Original entry on oeis.org

1, 6, 82, 2604, 193662, 33865632, 13956665236, 13574876544396, 31191658416342674, 169426507164530254380, 2176592549084872196370724, 66158464020552857153017287240, 4759146677426447759184119036493676, 810410082813497381147177065840601910384
Offset: 1

Views

Author

R. H. Hardin, Feb 24 2002

Keywords

Crossrefs

See A047938 for number of improper colorings.
Main diagonal of A078099.
Twice A207993 for n>1.

Programs

  • Mathematica
    M[1] = {{1}}; M[m_] := M[m] = {{M[m - 1], Transpose[M[m - 1]]}, {Array[0 &, {2^(m - 2), 2^(m - 2)}], M[m - 1]}} // ArrayFlatten; W[m_] := M[m] + Transpose[M[m]]; T[m_, 1] := 2^(m - 1); T[1, n_] := 2^(n - 1); T[m_, n_] := MatrixPower[W[m], n - 1] // Flatten // Total; a[n_] := T[n, n]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 12}] (* Jean-François Alcover, Nov 01 2017, after code from A078099 *)

Formula

For formula see A078099.

Extensions

More terms from Vladeta Jovovic, Jul 22 2004
a(11)-a(12) from Alois P. Heinz, Mar 25 2009
a(13)-a(14) from Andrew Howroyd, Jun 26 2017

A068271 1/4 the number of colorings of an n X n rhombic hexagonal array with 4 colors.

Original entry on oeis.org

1, 12, 264, 11424, 1008576, 184910592, 71033971200, 57469424744448, 98237339264864256, 355574469749489123328, 2729407814499050197254144, 44482040254775494064841818112, 1540473331004371306422199656382464, 113440401780206156918876627438624833536
Offset: 1

Views

Author

R. H. Hardin, Feb 24 2002

Keywords

Comments

Terms for rhombic- and staggered- hexagonal arrays are the same for n in 1..4.

Crossrefs

Extensions

a(9) from Alois P. Heinz, May 02 2012
a(10)-a(14) from Andrew Howroyd, Jun 25 2017

A108396 Triangle read by rows: T(n,k) = n*(1+n^k)/2, 0<=k<=n.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 3, 6, 15, 42, 4, 10, 34, 130, 514, 5, 15, 65, 315, 1565, 7815, 6, 21, 111, 651, 3891, 23331, 139971, 7, 28, 175, 1204, 8407, 58828, 411775, 2882404, 8, 36, 260, 2052, 16388, 131076, 1048580, 8388612, 67108868, 9, 45, 369, 3285, 29529, 265725
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 02 2005

Keywords

Comments

Row sums give A108397;
T(n,0) = A001477(n);
T(n,1) = A000217(n) for n>0;
T(n,2) = A006003(n) for n>1;
T(n,3) = A027441(n) for n>2;
T(n,4) = A021003(n) for n>3;
T(n,n) = A108398(n).

Examples

			.  0:  0
.  1:  1  1
.  2:  2  3   5
.  3:  3  6  15   42
.  4:  4 10  34  130   514
.  5:  5 15  65  315  1565   7815
.  6:  6 21 111  651  3891  23331  139971
.  7:  7 28 175 1204  8407  58828  411775  2882404
.  8:  8 36 260 2052 16388 131076 1048580  8388612  67108868
.  9:  9 45 369 3285 29529 265725 2391489 21523365 193710249 1743392205 .
		

Crossrefs

Cf. A079901, A000312, A033918, A001477, A000217, A006003, A027441, A021003, A108398, A108397 (row sums), A256512 (central terms).

Programs

  • Haskell
    a108396 n k = a108396_tabl !! n !! k
    a108396_row n = a108396_tabl !! n
    a108396_tabl = zipWith (\v ws -> map (flip div 2 . (* v) . (+ 1)) ws)
                           [0..] a079901_tabl
    -- Reinhard Zumkeller, Mar 31 2015
  • Mathematica
    Join[{0},Flatten[Table[n (1+n^k)/2,{n,10},{k,0,n}]]] (* Harvey P. Dale, Mar 19 2015 *)

Extensions

Offset changed by Reinhard Zumkeller, Mar 31 2015

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

Original entry on oeis.org

0, 1, 65, 1095, 8194, 39065, 139971, 411775, 1048580, 2391489, 5000005, 9743591, 17915910, 31374265, 52706759, 85429695, 134217736, 205169345, 306110025, 446935879, 640000010, 900544281, 1247178955, 1702412735, 2293235724, 3051757825, 4015905101
Offset: 0

Views

Author

N. J. A. Sloane, Dec 11 2009

Keywords

Crossrefs

Sequences of the form n*(n^m + 1)/2: A001477 (m=0), A000217 (m=1), A006003 (m=2), A027441 (m=3), A021003 (m=4), A167963 (m=5), this sequence (m=6), A168067 (m=7), A168116 (m=8), A168118 (m=9), A168119 (m=10).

Programs

  • Magma
    [n*(n^6+1)/2: n in [0..40]]; // Vincenzo Librandi, Dec 10 2014
    
  • Mathematica
    CoefficientList[Series[x(1 +57x +603x^2 +1198x^3 +603x^4 +57x^5 +x^6)/ (1-x)^8, {x, 0, 50}], x] (* Vincenzo Librandi, Dec 10 2014 *)
    LinearRecurrence[{8,-28,56,-70,56,-28,8,-1}, {0,1,65,1095,8194,39065, 139971,411775}, 41] (* Harvey P. Dale, Jan 24 2019 *)
  • SageMath
    [n*(n^6+1)/2 for n in range(41)] # G. C. Greubel, Jan 12 2023

Formula

G.f.: x*(1+57*x+603*x^2+1198*x^3+603*x^4+57*x^5+x^6)/(1-x)^8. - Vincenzo Librandi, Dec 10 2014
E.g.f.: (x/2)*(2 +63*x +301*x^2 +350*x^3 +140*x^4 +21*x^5 +x^6)*exp(x). - G. C. Greubel, Jan 12 2023

Extensions

More terms from Vincenzo Librandi, Dec 10 2014

A068244 1/6 the number of colorings of a 3 X 3 rhombic- or staggered- hexagonal array with n colors.

Original entry on oeis.org

1, 176, 5490, 65600, 455875, 2239776, 8647716, 27962880, 78920325, 200002000, 464447126, 1003294656, 2039332295, 3935444800, 7261533000, 12884914176, 22089914121, 36733221360, 59442494650, 93866696000, 144987663051, 219503536736, 326295822700, 476993088000
Offset: 3

Views

Author

R. H. Hardin, Feb 24 2002

Keywords

Comments

Numbers for rhombic- and staggered- hexagonal arrays differ above 4 X 4.

Crossrefs

Programs

  • Maple
    a:= n-> (248 +(-1012 +(1786 +(-1791 +(1120 +(-448 +(112 +(-16+n)*n) *n) *n) *n) *n) *n) *n) *n/6:
    seq(a(n), n=3..40);  #  Alois P. Heinz, May 02 2012

Formula

From Alois P. Heinz, May 02 2012: (Start)
G.f.: (1089*x^6+10934*x^5+26015*x^4+18500*x^3+3775*x^2+166*x+1) / (x-1)^10*x^3.
a(n) = (n^9 -16*n^8 +112*n^7 -448*n^6 +1120*n^5 -1791*n^4 +1786*n^3 -1012*n^2 +248*n)/6. (End)

A068245 1/6 the number of colorings of a 4 X 4 rhombic- or staggered- hexagonal array with n colors.

Original entry on oeis.org

1, 7616, 5141250, 552093440, 20631905875, 395001645696, 4771909547076, 41190314035200, 275192443300005, 1502690499112000, 6971521964029766, 28275884687022336, 102456840191225975, 337289521082456320, 1022310183284613000, 2883605488481550336, 7636012822945480521
Offset: 3

Views

Author

R. H. Hardin, Feb 24 2002

Keywords

Comments

Numbers for rhombic- and staggered- hexagonal arrays differ above 4 X 4.

Crossrefs

Programs

  • Magma
    [(n^11 -26*n^10 +310*n^9 -2240*n^8 +10915*n^7 -37726*n^6 +94576*n^5 -172395*n^4 +224588*n^3 -199854*n^2 +109788*n -28340)*n *(n-1)*(n-2)^3/6: n in [3..19]]; // Bruno Berselli, May 03 2012
  • Maple
    a:= n-> (-226720+ (1445104+ (-4304712+ (7968348+ (-10265148+ (9755858+ (-7068408+ (3975561+ (-1749715+ (602408+ (-160859+ (32703+ (-4898+ (510+ (-33+n)*n) *n) *n) *n) *n) *n) *n) *n) *n) *n) *n) *n) *n) *n) *n/6:
    seq(a(n), n=3..40); #  Alois P. Heinz, May 02 2012

Formula

From Alois P. Heinz, May 02 2012: (Start)
G.f.: -(7926831*x^13 +710120929*x^12 +16477733814*x^11 +144915014346*x^10 +569769493505*x^9 +1086745824783*x^8 +1040642122932*x^7 +499586289612*x^6 +115866023553*x^5 +11940350895*x^4 +465727286*x^3 +5011914*x^2 +7599*x+1) *x^3 / (x-1)^17.
a(n) = (n^16 -33*n^15 +510*n^14 -4898*n^13 +32703*n^12 -160859*n^11 +602408*n^10 -1749715*n^9 +3975561*n^8 -7068408*n^7 +9755858*n^6 -10265148*n^5 +7968348*n^4 -4304712*n^3 +1445104*n^2 -226720*n)/6. (End)

Extensions

Extended beyond a(15) by Alois P. Heinz, May 02 2012

A068254 1/4 the number of colorings of an n X n square array with 4 colors.

Original entry on oeis.org

1, 21, 2403, 1500183, 5110723191, 95013316876491, 9639473169171326643, 5336900216006709884938623, 16124704040675904181778734982451, 265865038636937159336134567410478299051
Offset: 1

Views

Author

R. H. Hardin, Feb 24 2002

Keywords

Crossrefs

Programs

Extensions

a(9)-a(10) from Alois P. Heinz, Apr 27 2012
Previous Showing 11-20 of 82 results. Next