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

A214734 Sum_{k=1..n} floor(k*p/q), where (p,q) are either coprime positive integers or q=1 or p=1, n*p>=q, ordered by (n + p + q) ascending, then n ascending, then p ascending.

Original entry on oeis.org

1, 2, 3, 3, 1, 6, 6, 1, 4, 9, 2, 12, 10, 5, 1, 4, 12, 1, 18, 4, 20, 15, 1, 2, 6, 15, 3, 8, 24, 2, 30, 6, 30, 21, 1, 7, 1, 3, 7, 18, 30, 1, 5, 14, 40, 3, 45, 9, 42, 28, 1, 3, 8, 1, 4, 21, 1, 3, 7, 14, 36, 50, 2, 8, 21, 60, 5, 63, 12, 56, 36
Offset: 1

Views

Author

Renzo Benedetti, Jul 27 2012

Keywords

Comments

Since this is a sequence with 3 indexes (n,p,q), then the order proposed is an ordering by planes of 3D-discrete points (similar to a diagonal ordering of 2D-discrete points). It is not possible to order by rows, columns since n, p, q are boundless.
This sequence generalizes other sequences like A130518, A001840, A058937, A130519, A001972 and maybe others (most of those sequences are replica of each other up to an offset), by providing a closed formula (see formulas).

Examples

			a(n, 1, 3) = n*(n+1)/ 6 - floor(n/3) - Sum_{k=1..(n mod 3)} (k mod 3) = n*(n+1)/ 6 - floor(n/3) - (4 mod 3)/3 = A130518(n).
Example of the ordering (n,p,q): (1,1,1), (1,1,2), (1,2,1), (2,1,1), (1,1,3), (1,3,1), (2,1,2), (2,2,1), (3,1,1), (1,1,4), ...
		

Formula

a(n, p, q) = Sum_{k=1..n} floor(k*p/q) defines the sequence.
a(n, p, q) = n*(n+1)*p/q/2 - floor(n/q) * (q-1)/2 - Sum_{k=1...(n mod q)} (k*p mod q)/q (the remaining sum has at most q-1 terms, and can assume at most q values when n varies, i.e., that sum for n is equal to the sum for n+q, so the computation of a(n, p, q) requires adding at most (q+1) terms). [Renzo Benedetti, Jul 27 2012]

A221912 Partial sums of floor(n/12).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 76, 80, 84, 88, 92, 96, 100, 104, 108, 112, 116, 120, 125, 130, 135, 140, 145, 150, 155
Offset: 0

Views

Author

Philippe Deléham, Mar 27 2013

Keywords

Comments

Apart from the initial zeros, the same as A008730.

Examples

			..0....0....0....0....0....0....0....0....0....0....0....0
..1....2....3....4....5....6....7....8....9...10...11...12
.14...16...18...20...22...24...26...28...30...32...34...36
.39...42...45...48...51...54...57...60...63...66...69...72
.76...80...84...88...92...96..100..104..108..112..116..120
125..130..135..140..145..150..155..160..165..170..175..180
186..192..198..204..210..216..222..228..234..240..246..252
259..266..273..280..287..294..301..308..315..322..329..336
344..352..360..368..376..384..392..400..408..416..424..432
441..450..459..468..477..486..495..504..513..522..531..540
...
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Floor[Range[0,70]/12]] (* or *) LinearRecurrence[{2,-1,0,0,0,0,0,0,0,0,0,1,-2,1},{0,0,0,0,0,0,0,0,0,0,0,0,1,2},70] (* Harvey P. Dale, Mar 23 2015 *)

Formula

a(12n) = A051866(n).
a(12n+1) = A139267(n).
a(12n+2) = A094159(n).
a(12n+3) = A033579(n).
a(12n+4) = A049452(n).
a(12n+5) = A033581(n).
a(12n+6) = A049453(n).
a(12n+7) = A033580(n).
a(12n+8) = A195319(n).
a(12n+9) = A202804(n).
a(12n+10) = A211014(n).
a(12n+11) = A049598(n).
G.f.: x^12/((1-x)^2*(1-x^12)).
a(0)=0, a(1)=0, a(2)=0, a(3)=0, a(4)=0, a(5)=0, a(6)=0, a(7)=0, a(8)=0, a(9)=0, a(10)=0, a(11)=0, a(12)=1, a(13)=2, a(n)=2*a(n-1)- a(n-2)+ a(n-12)- 2*a(n-13)+ a(n-14). - Harvey P. Dale, Mar 23 2015

A300322 Number T(n,k) of Dyck paths of semilength n such that 2*k is the difference between the area under the right half of the path and the area under the left half of the path; triangle T(n,k), n>=0, -floor(n*(n-1)/6) <= k <= floor(n*(n-1)/6), read by rows.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 3, 6, 3, 1, 2, 5, 8, 12, 8, 5, 2, 1, 4, 9, 16, 22, 28, 22, 16, 9, 4, 1, 1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1, 2, 7, 15, 31, 53, 82, 114, 147, 171, 186, 171, 147, 114, 82, 53, 31, 15, 7, 2, 1, 5, 13, 30, 56, 95, 150, 216, 293, 371, 445, 495, 522, 495, 445, 371, 293, 216, 150, 95, 56, 30, 13, 5, 1
Offset: 0

Views

Author

Alois P. Heinz, Mar 02 2018

Keywords

Examples

			               /\
T(3,-1) = 1:  /  \/\
.
                /\
               /  \     /\/\
T(3,0) = 3:   /    \   /    \   /\/\/\
.
                 /\
T(3,1) = 1:   /\/  \
.
Triangle T(n,k) begins:
:                             1                            ;
:                             1                            ;
:                             2                            ;
:                         1,  3,  1                        ;
:                     1,  3,  6,  3,  1                    ;
:                 2,  5,  8, 12,  8,  5,  2                ;
:         1,  4,  9, 16, 22, 28, 22, 16,  9,  4,  1        ;
:  1, 4, 11, 21, 34, 49, 60, 69, 60, 49, 34, 21, 11, 4, 1  ;
		

Crossrefs

Row sums give A000108.
Column k=0 gives A300323.

Programs

  • Maple
    b:= proc(x, y, v) option remember; expand(
         `if`(min(y, v, x-max(y, v))<0, 0, `if`(x=0, 1, (l-> add(add(
          b(x-1, y+i, v+j)*z^((y-v)/2+(i-j)/4), i=l), j=l))([-1, 1]))))
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=ldegree(p)..degree(p)))(
                 add(b(n, (n-2*j)$2), j=0..n/2)):
    seq(T(n), n=0..12);
  • Mathematica
    b[x_, y_, v_] := b[x, y, v] = Expand[If[Min[y, v, x - Max[y, v]] < 0, 0, If[x == 0, 1, Function[l, Sum[Sum[b[x - 1, y + i, v + j] z^((y - v)/2 + (i - j)/4), {i, l}], {j, l}]][{-1, 1}]]]];
    T[n_] := Function[p, Table[Coefficient[p, z, i], {i, Range[Exponent[p, z, Reverse @@ # &], Exponent[p, z]]}]][Sum[b[n, n-2j, n-2j], {j, 0, n/2}]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 31 2018, from Maple *)

Formula

T(n,k) = T(n,-k).
T(n,A130518(n)) = A177702(n).

A259486 a(n) = 3*n^2 - 3*n + 1 + 6*floor((n-1)*(n-2)/6).

Original entry on oeis.org

1, 7, 19, 43, 73, 109, 157, 211, 271, 343, 421, 505, 601, 703, 811, 931, 1057, 1189, 1333, 1483, 1639, 1807, 1981, 2161, 2353, 2551, 2755, 2971, 3193, 3421, 3661, 3907, 4159, 4423, 4693, 4969, 5257, 5551, 5851, 6163, 6481, 6805, 7141, 7483, 7831, 8191, 8557
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 28 2015

Keywords

Comments

Start with the geometric picture for the centered hex numbers (A003215). Here, each hexagonal figure in the sequence is the aggregate of smaller unit hexes (with n hexes along each side). Then, when possible, add additional unit hexes to each side except for the corners --> do this repeatedly with the same restriction until no hexes can be added. a(n) gives the area of each figure (see example).
a(n) == 1 mod 6. - Robert Israel, Jun 29 2015

Examples

			-----------------------------------------------------------------------
Figure 1
-----------------------------------------------------------------------
                                                  __    __    __
                                                 /  \__/  \__/  \
                                                 \_*/  \__/  \*_/
                              __               __/  \__/  \__/  \__
                           __/  \__           /  \__/  \__/  \__/  \
            __          __/  \__/  \__        \__/  \__/  \__/  \__/
         __/  \__      /  \__/  \__/  \     __/  \__/  \__/  \__/  \__
.__     /  \__/  \     \__/  \__/  \__/    / *\__/  \__/  \__/  \__/* \
/  \    \__/  \__/     /  \__/  \__/  \    \__/  \__/  \__/  \__/  \__/
\__/    /  \__/  \     \__/  \__/  \__/       \__/  \__/  \__/  \__/
        \__/  \__/     /  \__/  \__/  \       /  \__/  \__/  \__/  \
           \__/        \__/  \__/  \__/       \__/  \__/  \__/  \__/
                          \__/  \__/             \__/  \__/  \__/
                             \__/                / *\__/  \__/* \
                                                 \__/  \__/  \__/
n=1         n=2               n=3                       n=4
-----------------------------------------------------------------------
Table 1
-----------------------------------------------------------------------
a(1) = 1                              =  1
a(2) = 3  + 2(2)                      =  7
a(3) = 5  + 2(3+4)                    =  19
a(4) = 7  + 2(4+5+6)          + 6(1)  =  43
a(5) = 9  + 2(5+6+7+8)        + 6(2)  =  73
a(6) = 11 + 2(6+7+8+9+10)     + 6(3)  =  109
a(7) = 13 + 2(7+8+9+10+11+12) + 6(5)  =  157
...
		

Crossrefs

Cf. A003215 (hex numbers), A000969, A130518, A255840 (similar, with squares).

Programs

  • Magma
    [3*n^2 - 3*n + 1 + 6*Floor((n-1)*(n-2)/6) : n in [1..100]];
    
  • Magma
    I:=[1,7,19,43,73]; [n le 5 select I[n] else 2*Self(n-1)-Self(n-2)+Self(n-3)-2*Self(n-4)+Self(n-5): n in [1..60]]; // Vincenzo Librandi, Jul 14 2015
  • Maple
    A259486:=n->3*n^2 - 3*n + 1 + 6*floor((n-1)*(n-2)/6): seq(A259486(n), n=1..100);
  • Mathematica
    Table[3 n^2 - 3 n + 1 + 6 Floor[(n - 1) (n - 2)/6], {n, 50}] (* or *)
    CoefficientList[Series[(1 + 5 x + 6 x^2 + 11 x^3 + x^4)/((1 - x)^3 (1 + x + x^2)), {x, 0, 50}], x]
    LinearRecurrence[{2, -1, 1, -2, 1}, {1, 7, 19, 43, 73}, 50]; (* Vincenzo Librandi, Jul 14 2015 *)

Formula

G.f.: (1+5*x+6*x^2+11*x^3+x^4)/((1-x)^3*(1+x+x^2)).
a(n) = 2*a(n-1)-a(n-2)+a(n-3)-2*a(n-4)+a(n-5), n>5.
a(n) = A003215(n+1) + 6*A130518(n+1).
From Robert Israel, Jun 29 2015: (Start)
a(n) = 4*n^2 - 6*n + 1 if 3 divides n, 4*n^2 - 6*n + 3 otherwise.
a(n) = 1 + 6 * A000969(n-2) for n >= 2. (End)
a(n) = 4*n^2 - 6*n + 3^sign(n mod 3). - Wesley Ivan Hurt, Jul 13 2015

A301926 a(n+3) = a(n) + 24*n + 32, a(0)=0, a(1)=3, a(2)=13.

Original entry on oeis.org

0, 3, 13, 32, 59, 93, 136, 187, 245, 312, 387, 469, 560, 659, 765, 880, 1003, 1133, 1272, 1419, 1573, 1736, 1907, 2085, 2272, 2467, 2669, 2880, 3099, 3325, 3560, 3803, 4053, 4312, 4579, 4853, 5136, 5427, 5725
Offset: 0

Views

Author

Paul Curtz, Jun 20 2018

Keywords

Comments

Difference table:
0, 3, 13, 32, 59, 93, 136, 187, ...
3, 10, 19, 27, 34, 43, 51, ... = b(n)
7, 9, 8, 7, 9, 8, ... .
The sequence of last decimal digits of a(n) has period 15 and contain no 1's, 4's or 8's.
a(n) is e(n), hexasection, in A262397(n-1).
b(n) mod 9 is of period 9: 3, 1, 1, 0, 7, 7, 6, 4, 4.

Crossrefs

Cf. A262997, A262397. A000290, A240438, A016754, A262523 (hexasections). Cf. A130518.

Programs

  • Mathematica
    CoefficientList[ Series[ -x (5^3 +9x^2 +7x +3)/(x -1)^3 (x^2 +x +1), {x, 0, 40}], x] (* or *)LinearRecurrence[{2, -1, 1, -2, 1}, {0, 3, 13, 32, 59, 93}, 41] (* Robert G. Wilson v, Jun 20 2018 *)
  • PARI
    concat(0, Vec(x*(1 + x)*(3 + 4*x + 5*x^2) / ((1 - x)^3*(1 + x + x^2)) + O(x^40))) \\ Colin Barker, Jun 20 2018

Formula

a(-n) = A262997(n).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
Trisections: a(3n) = 4*n*(9*n-1), a(3n+1) = 3 + 20*n + 36*n^2, a(3n+2) = 13 + 44*n + 36*n^2.
a(n+15) = a(n) + 40*(22+3*n).
G.f.: x*(1 + x)*(3 + 4*x + 5*x^2) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Jun 20 2018

A269445 a(n) = Sum_{k=0..n} floor(k/13).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 42, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 27 2016

Keywords

Comments

Partial sums of A090620.
More generally, the ordinary generating function for the Sum_{k=0..n} floor(k/m) is x^m/((1 - x^m)*(1 - x)^2).

Crossrefs

Cf. A090620.
Cf. similar sequences of Sum_{k=0..n} floor(k/m): A002620 (m=2), A130518 (m=3), A130519 (m=4), A130520 (m=5), A174709 (m=6), A174738 (m=7), A118729 (m=8), A218470 (m=9), A131242 (m=10), A218530 (m=11), A221912 (m=12), this sequence (m=13).

Programs

  • Mathematica
    Table[Sum[Floor[k/13], {k, 0, n}], {n, 0, 73}]
    LinearRecurrence[{2, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -2, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2}, 74]

Formula

G.f.: x^13/((1 - x^13)*(1 - x)^2).
a(n) = 2*a(n-1) - a(n-2) + a(n-13) - 2*a(n-14) + a(n-15).

A302588 a(n) = a(n-3) + 7*(n-2), a(0)=1, a(1)=2, a(2)=4.

Original entry on oeis.org

1, 2, 4, 8, 16, 25, 36, 51, 67, 85, 107, 130, 155, 184, 214, 246, 282, 319, 358, 401, 445, 491, 541, 592, 645, 702, 760, 820, 884, 949, 1016, 1087, 1159, 1233, 1311, 1390, 1471, 1556, 1642, 1730, 1822, 1915, 2010
Offset: 0

Views

Author

Paul Curtz, Jul 17 2018

Keywords

Comments

Third of a family after A000124 and A084684. Built from the second differences. The fourth sequence is 1, 2, 4, 8, 16, 32, 49, 91, ..., from periodic [1, 2, 4, 8].

References

  • 0

Crossrefs

Cf. A069705, A047350 (first differences), A130518.

Programs

  • Mathematica
    CoefficientList[ Series[-(4x^4 +x^3 +x^2 +1)/((x -1)^3 (x^2 +x +1)), {x, 0, 50}], x] (* or *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {1, 2, 4, 8, 16}, 50] (* Robert G. Wilson v, Jul 18 2018 *)

Formula

Repeat the second differences of 1, 2, 4, 8, 16, i.e., repeat [1, 2, 4].
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5).
a(n) = A069705(n) + 7*A130518(n).

A308067 Number of integer-sided triangles with perimeter n whose longest side length is odd.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 2, 1, 1, 0, 3, 2, 2, 1, 5, 3, 3, 2, 7, 5, 5, 3, 9, 7, 7, 5, 12, 9, 9, 7, 15, 12, 12, 9, 18, 15, 15, 12, 22, 18, 18, 15, 26, 22, 22, 18, 30, 26, 26, 22, 35, 30, 30, 26, 40, 35, 35, 30, 45, 40, 40, 35, 51, 45, 45, 40, 57, 51, 51, 45, 63, 57
Offset: 1

Views

Author

Wesley Ivan Hurt, May 10 2019

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Sum[Mod[n - i - k, 2]*Sign[Floor[(i + k)/(n - i - k + 1)]], {i, k, Floor[(n - k)/2]}], {k, Floor[n/3]}], {n, 100}]
  • PARI
    a(n) = sum(k=1, n\3, sum(i=k, (n-k)\2, sign((i+k)\(n-i-k+1))*((n-i-k) % 2))); \\ Michel Marcus, May 15 2019

Formula

a(n) = Sum_{k=1..floor(n/3)} Sum_{i=k..floor((n-k)/2)} sign(floor((i+k)/(n-i-k+1))) * ((n-i-k) mod 2).
Conjectures from Colin Barker, May 11 2019: (Start)
G.f.: x^3*(1 - x + x^2 - x^3 + x^4) / ((1 - x)^3*(1 + x)^2*(1 - x + x^2)*(1 + x^2)^2*(1 + x + x^2)).
a(n) = a(n-1) - a(n-2) + a(n-3) + a(n-4) - a(n-5) + 2*a(n-6) - 2*a(n-7) + a(n-8) - a(n-9) - a(n-10) + a(n-11) - a(n-12) + a(n-13) for n>13.
(End)
Conjectures from Marc Bofill Janer, May 15 2019: (Start)
a(4*n) = a(4*n+1).
a(4*n) < a(4*n-1).
a(4*n) = A001840(n-1) = A130518(n+1) = A062781(n+2).
a(4*n-1) = a(4*n+4) = a(4*n+5).
a(4*n-1) = A001840(n) = A130518(n+2) = A062781(n+3).
a(4*n+2) = a(4*n-4) = a(4*n-3).
a(4*n+2) = A001840(n-2) for n>=2.
a(4*n+2) = A130518(n) = A062781(n+1).
(End)

A330285 The maximum number of arithmetic progressions in a sequence of length n.

Original entry on oeis.org

0, 0, 1, 3, 7, 12, 20, 29, 41, 55, 72, 90, 113, 137, 164, 194, 228, 263, 303, 344, 390, 439, 491, 544, 604, 666, 731, 799, 872, 946, 1027, 1109, 1196, 1286, 1379, 1475, 1579, 1684, 1792, 1903, 2021, 2140, 2266, 2393, 2525, 2662, 2802, 2943, 3093, 3245, 3402, 3562, 3727
Offset: 1

Views

Author

Joseph Wheat, Dec 21 2019

Keywords

Comments

The partial arithmetic density D_n(A) up to n is merely the number of arithmetic progressions, A(s(n)), divided by the total number of nonempty subsets of {s(1), s(2), ..., s(n)}, i.e., A(s(n))/(2^n - 1). As n approaches infinity, D_n(A) converges to zero. Furthermore, the infinite sum of the partial densities for any sequence always converges to the total density D(A). Every infinite arithmetic progression has the same total density, Sum_{n >= 1} a(n)/(2^n - 1) = alpha ~ 1.25568880818612911696845537; sequences with a finite number of progressions have D(A) < alpha; and sequences without any arithmetic progressions have D(A) = 0.

Crossrefs

Partial sums of A002541.

Programs

  • PARI
    a(n) = sum(i=1, n, sum(j=1, i, floor((i - 1)/(j + 1))))

Formula

a(n) = Sum_{i=1..n} Sum_{j=1..i} floor((i - 1)/(j + 1)).
Previous Showing 11-19 of 19 results.