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-10 of 12 results. Next

A129654 Number of different ways to represent n as general polygonal number P(m,r) = 1/2*r*((m-2)*r-(m-4)) = n>1, for m,r>1.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 2, 2, 4, 3, 2, 3, 2, 2, 4, 3, 2, 3, 3, 2, 3, 4, 2, 3, 2, 2, 3, 3, 3, 5, 2, 2, 3, 3, 2, 3, 2, 2, 5, 3, 2, 3, 3, 2, 4, 3, 2, 3, 4, 2, 3, 3, 2, 3, 2, 2, 3, 4, 3, 5, 2, 2, 3, 4, 2, 3, 2, 2, 4, 3, 2, 4, 2, 2, 5, 3, 2, 3, 3, 2, 3, 3, 2, 3, 4, 3, 3, 3, 3, 4, 2, 2, 3, 4, 2, 3, 2, 2, 5, 3
Offset: 2

Views

Author

Alexander Adamchuk, Apr 27 2007

Keywords

Comments

The indices k of the first appearance of number n in a(k) are listed in A063778(n) = {2,3,6,15,36,225,...} = Least number k>1 such that k could be represented in n different ways as general m-gonal number P(m,r) = 1/2*r*((m-2)*r-(m-4)).
From Gus Wiseman, May 03 2019: (Start)
Also the number of integer partitions of n whose augmented differences are all equal, where the augmented differences aug(y) of an integer partition y of length k are given by aug(y)i = y_i - y{i + 1} + 1 if i < k and aug(y)_k = y_k; for example aug(6,5,5,3,3,3) = (2,1,3,1,1,3). Equivalently, a(n) is the number of integer partitions of n whose differences are all equal to the last part minus one. The Heinz numbers of these partitions are given by A307824. For example, the a(35) = 5 partitions are:
(35)
(23,12)
(11,9,7,5,3)
(8,7,6,5,4,3,2)
(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1)
(End)

Examples

			a(6) = 3 because 6 = P(2,6) = P(3,3) = P(6,2).
		

Crossrefs

Programs

  • Maple
    A129654 := proc(n) local resul, dvs, i, r, m ;
       dvs := numtheory[divisors](2*n) ;
       resul := 0 ;
       for i from 1 to nops(dvs) do
          r := op(i, dvs) ;
          if r > 1 then
             m := (2*n/r-4+2*r)/(r-1) ;
             if is(m, integer) then
                resul := resul+1 ;
             fi ;
          fi ;
       od ;
       RETURN(resul) ;
    end: # R. J. Mathar, May 14 2007
  • Mathematica
    a[n_] := (dvs = Divisors[2*n]; resul = 0; For[i = 1, i <= Length[dvs], i++, r = dvs[[i]]; If[r > 1, m = (2*n/r-4+2*r)/(r-1); If[IntegerQ[m], resul = resul+1 ] ] ]; resul); Table[a[n], {n, 2, 106}] (* Jean-François Alcover, Sep 13 2012, translated from R. J. Mathar's Maple program *)
    Table[Length[Intersection[Divisors[2 n - 2] + 1, Divisors[2 n]]], {n, 2, 106}] (* Jonathan Sondow, May 09 2014 *)
    atpms[n_]:=Select[Join@@Table[i*Range[k,1,-1],{k,n},{i,0,n}],Total[#+1]==n&];
    Table[Length[atpms[n]],{n,100}] (* Gus Wiseman, May 03 2019 *)
  • PARI
    a(n) = sumdiv(2*n, d, (d>1) && (2*n/d + 2*d - 4) % (d-1) == 0); \\ Daniel Suteu, Dec 22 2018

Formula

a(n) = A177025(n) + 1.
G.f.: x * Sum_{k>=1} x^k / (1 - x^(k*(k + 1)/2)) (conjecture). - Ilya Gutkovskiy, Apr 09 2020

A239551 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-1,0,1}.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 6, 9, 13, 18, 24, 34, 49, 71, 100, 145, 205, 295, 423, 610, 872, 1260, 1804, 2599, 3733, 5381, 7725, 11131, 15996, 23042, 33133, 47714, 68608, 98793, 142101, 204585, 294318, 423683, 609565, 877457, 1262508, 1817205, 2614832, 3763553, 5415668
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Examples

			a(6) = 6: [1,1,1,1,1,1], [1,1,1,1,2], [1,1,2,2], [1,2,2,1], [1,2,3], [1,5].
		

Crossrefs

Column k=1 of A239550.

Formula

a(n) ~ c * d^n, where d=1.4391340589699362028978918824612984596732704665024595117321768607966..., c=0.5987103268327131789103863373328359387911710658212178254615152936898... - Vaclav Kotesovec, May 01 2014

A239552 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-2,...,2}.

Original entry on oeis.org

1, 1, 1, 2, 4, 7, 11, 18, 32, 53, 89, 152, 255, 431, 733, 1243, 2111, 3583, 6087, 10342, 17564, 29845, 50704, 86150, 146382, 248716, 422618, 718091, 1220156, 2073272, 3522846, 5985967, 10171232, 17282786, 29366645, 49899299, 84788109, 144070585, 244802450
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Examples

			a(5) = 7: [1,1,1,1,1], [1,1,1,2], [1,1,2,1], [1,1,3], [1,2,1,1], [1,2,2], [1,4].
a(6) = 11: [1,1,1,1,1,1], [1,1,1,1,2], [1,1,1,2,1], [1,1,1,3], [1,1,2,1,1], [1,1,2,2], [1,2,1,1,1], [1,2,1,2], [1,2,2,1], [1,2,3], [1,5].
		

Crossrefs

Column k=2 of A239550.

Formula

a(n) ~ c * d^n, where d = 1.6991842071646453928920987915033839182675484195426953647249305754952..., c = 0.4361924842463814839782496098129122542027259655263562779280217228428... . - Vaclav Kotesovec, Aug 28 2014

A239553 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-3,...,3}.

Original entry on oeis.org

1, 1, 1, 2, 4, 7, 13, 23, 40, 73, 132, 235, 425, 767, 1379, 2491, 4495, 8105, 14629, 26407, 47647, 86009, 155251, 280202, 505771, 912930, 1647796, 2974292, 5368610, 9690288, 17491016, 31571338, 56986216, 102860299, 185663064, 335122028, 604896038, 1091838582
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=3 of A239550.

Formula

a(n) ~ c * d^n, where d = 1.80500192473773030222699209897983267121107478038035391729605116..., c = 0.35357751116733859348564640393076257358506245520421137739865819... . - Vaclav Kotesovec, Aug 28 2014

A239554 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-4,...,4}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 15, 28, 52, 97, 183, 344, 647, 1219, 2295, 4322, 8140, 15338, 28899, 54449, 102588, 193297, 364219, 686272, 1293113, 2436562, 4591090, 8650808, 16300370, 30714116, 57873375, 109048498, 205475699, 387169634, 729528290, 1374621010, 2590143467
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=4 of A239550.

A239555 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-5,...,5}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 15, 29, 56, 106, 201, 388, 743, 1421, 2727, 5233, 10034, 19248, 36925, 70836, 135885, 260684, 500101, 959400, 1840522, 3530904, 6773757, 12994934, 24929791, 47825908, 91750372, 176016138, 337673592, 647801215, 1242757517, 2384136115
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=5 of A239550.

A239556 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-6,...,6}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 16, 31, 60, 117, 228, 441, 860, 1678, 3267, 6368, 12413, 24192, 47158, 91929, 179190, 349306, 680925, 1327341, 2587450, 5043845, 9832184, 19166364, 37361945, 72831417, 141973854, 276756612, 539495115, 1051664254, 2050060645, 3996283405
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=6 of A239550.

A239557 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-7,...,7}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 16, 31, 61, 120, 235, 460, 901, 1769, 3471, 6811, 13367, 26236, 51497, 101079, 198399, 389428, 764384, 1500372, 2945008, 5780612, 11346484, 22271478, 43715623, 85807323, 168427136, 330597667, 648914509, 1273723636, 2500131931, 4907390780
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=7 of A239550.

A239560 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-10,...,10}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 16, 32, 64, 127, 252, 501, 997, 1982, 3940, 7832, 15575, 30972, 61590, 122481, 243567, 484363, 963221, 1915501, 3809243, 7575217, 15064391, 29957679, 59575090, 118473530, 235601447, 468526933, 931732343, 1852882096, 3684719208, 7327587468
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Crossrefs

Column k=10 of A239550.

A239561 Number of compositions of n such that the first part is 1 and the second differences of the parts are in {-n,...,n}.

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 16, 31, 63, 125, 252, 504, 1013, 2027, 4069, 8141, 16318, 32650, 65381, 130801, 261791, 523677, 1047780, 2095796, 4192533, 8385623, 16773321, 33547917, 67100362, 134203614, 268417029, 536840509, 1073702131, 2147418493, 4294882224, 8589795592
Offset: 0

Views

Author

Alois P. Heinz, Mar 21 2014

Keywords

Examples

			There are 2^5 = 32 compositions of 7 with first part = 1.  Exactly one of these has second differences not in {-7,...,7}, namely [1,5,1].  Thus a(7) = 32 - 1 = 31.
		

Crossrefs

Main diagonal of A239550.

Programs

  • Maple
    b:= proc(n) option remember; `if`(n<5, [1, 1, 3, 4, 8][n+1],
          (-(n^3+3*n^2+184*n-348) *b(n-1)
           +(2*n^4+23*n^3-155*n^2-166*n+3776) *b(n-2)
           +(n^4+14*n^3-5*n^2+122*n+768) *b(n-3)
           +(2*n^3+10*n^2-64*n-1328) *b(n-4)
           -(2*n^4+28*n^3-78*n^2-272*n+2320) *b(n-5))/
          (n^4+10*n^3-75*n^2-20*n+1244))
        end:
    a:= n-> `if`(n<7, ceil(2^(n-2)), 2^(n-2)-b(n-7)):
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, i_, j_, k_] := b[n, i, j, k] = If[n == 0, 1, If[i == 0, Sum[b[n - h, j, h, k], {h, 1, n}], Sum[b[n - h, j, h, k], {h, Max[1, 2*j - i - k], Min[n, 2*j - i + k]}]]];
    a[n_] := If[n == 0, 1, b[n - 1, 0, 1, n]];
    a /@ Range[0, 40] (* Jean-François Alcover, Jan 03 2021, after Alois P. Heinz *)

Formula

a(n) ~ 2^(n-2). - Vaclav Kotesovec, May 01 2014
Showing 1-10 of 12 results. Next