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

A305189 a(n) = 1*2 + 3 + 4*5 + 6 + 7*8 + 9 + 10*11 + 12 + ... + (up to n).

Original entry on oeis.org

1, 2, 5, 9, 25, 31, 38, 87, 96, 106, 206, 218, 231, 400, 415, 431, 687, 705, 724, 1085, 1106, 1128, 1612, 1636, 1661, 2286, 2313, 2341, 3125, 3155, 3186, 4147, 4180, 4214, 5370, 5406, 5443, 6812, 6851, 6891, 8491, 8533, 8576, 10425, 10470, 10516, 12632
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 15 2018

Keywords

Examples

			a(1) = 1;
a(2) = 1*2 = 2;
a(3) = 1*2 + 3 = 5;
a(4) = 1*2 + 3 + 4 = 9;
a(5) = 1*2 + 3 + 4*5 = 25;
a(6) = 1*2 + 3 + 4*5 + 6 = 31;
a(7) = 1*2 + 3 + 4*5 + 6 + 7 = 38;
a(8) = 1*2 + 3 + 4*5 + 6 + 7*8 = 87;
a(9) = 1*2 + 3 + 4*5 + 6 + 7*8 + 9 = 96;
a(10) = 1*2 + 3 + 4*5 + 6 + 7*8 + 9 + 10 = 106;
a(11) = 1*2 + 3 + 4*5 + 6 + 7*8 + 9 + 10*11 = 206;
a(12) = 1*2 + 3 + 4*5 + 6 + 7*8 + 9 + 10*11 + 12 = 218; etc.
		

Crossrefs

Programs

  • Maple
    seq(coeff(series((x*(1+x+3*x^2+x^3+13*x^4-3*x^5-2*x^6+4*x^7))/((1-x)^4*(1+x+x^2)^3),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Sep 16 2018
  • Mathematica
    Table[3*Floor[n/3]*(Floor[n/3] + 1)/2 + Floor[(n + 1)/3]*(3*Floor[(n + 1)/3]^2 - 1) + n*(Floor[(n - 1)/3] - Floor[(n - 2)/3]), {n, 50}]
    LinearRecurrence[{1,0,3,-3,0,-3,3,0,1,-1 }, {1, 2, 5, 9, 25, 31, 38, 87, 96, 106}, 50] (* Stefano Spezia, Sep 16 2018 *)
  • PARI
    Vec(x*(1 + x + 3*x^2 + x^3 + 13*x^4 - 3*x^5 - 2*x^6 + 4*x^7) / ((1 - x)^4*(1 + x + x^2)^3) + O(x^40)) \\ Colin Barker, Sep 16 2018

Formula

a(n) = 3*floor(n/3)*(floor(n/3) + 1)/2 + floor((n+1)/3)*(3*floor((n+1)/3)^2 - 1) + n*(floor((n-1)/3) - floor((n-2)/3)).
From Colin Barker, Sep 16 2018: (Start)
G.f.: x*(1 + x + 3*x^2 + x^3 + 13*x^4 - 3*x^5 - 2*x^6 + 4*x^7) / ((1 - x)^4*(1 + x + x^2)^3).
a(n) = a(n-1) + 3*a(n-3) - 3*a(n-4) - 3*a(n-6) + 3*a(n-7) + a(n-9) - a(n-10) for n>10.
(End)

A304487 a(n) = (3 + 2*n - 3*n^2 + 4*n^3 - 3*((-1 + n) mod 2))/6.

Original entry on oeis.org

1, 4, 15, 36, 73, 128, 207, 312, 449, 620, 831, 1084, 1385, 1736, 2143, 2608, 3137, 3732, 4399, 5140, 5961, 6864, 7855, 8936, 10113, 11388, 12767, 14252, 15849, 17560, 19391, 21344, 23425, 25636, 27983, 30468, 33097, 35872, 38799, 41880, 45121, 48524, 52095
Offset: 1

Views

Author

Stefano Spezia, Aug 17 2018

Keywords

Comments

a(n) is the trace of an n X n matrix A in which the entries are 1 through n^2, spiraling inward starting with 1 in the (1,1)-entry (proved).
The first three terms of a(n) coincide with those of A317614.

Examples

			For n = 1 the matrix A is
   1
with trace Tr(A) = a(1) = 1.
For n = 2 the matrix A is
   1, 2
   4, 3
with Tr(A) = a(2) = 4.
For n = 3 the matrix A is
   1, 2, 3
   8, 9, 4
   7, 6, 5
with Tr(A) = a(3) = 15.
For n = 4 the matrix A is
   1,  2,  3, 4
  12, 13, 14, 5
  11, 16, 15, 6
  10,  9,  8, 7
with Tr(A) = a(4) = 36.
		

Crossrefs

Cf. A126224 (determinant of the matrix A), A317298 (first differences).

Programs

  • GAP
    a_n:=List([1..43], n->(3 + 2*n - 3*n^2 + 4*n^3 - 3*RemInt(-1 + n, 2))/6);
    
  • GAP
    List([1..43],n->(3+2*n-3*n^2+4*n^3-3*((-1+n) mod 2))/6); # Muniru A Asiru, Sep 17 2018
  • Magma
    I:=[1,4,15,36,73]; [n le 5 select I[n] else 3*Self(n-1)-2*Self(n-2)-2*Self(n-3)+3*Self(n-4)-Self(n-5): n in [1..43]]; // Vincenzo Librandi, Aug 26 2018
    
  • Maple
    seq((3+2*n-3*n^2+4*n^3-3*modp((-1+n),2))/6,n=1..43); # Muniru A Asiru, Sep 17 2018
  • Mathematica
    Table[1/6 (3 + 2 n - 3 n^2 + 4 n^3 - 3 Mod[-1 + n, 2]), {n, 1, 43}] (* or *)
    CoefficientList[ Series[x*(1 + x + 5 x^2 + x^3)/((-1 + x)^4 (1 + x)), {x, 0, 43}], x] (* or *)
    LinearRecurrence[{3, -2, -2, 3, -1}, {1, 4, 15, 36, 73}, 43]
  • Maxima
    a(n):=(3 + 2*n - 3*n^2 + 4*n^3 - 3*mod(-1 + n, 2))/6$ makelist(a(n), n, 1, 43);
    
  • PARI
    Vec(x*(1 + x + 5*x^2 + x^3)/((-1 + x)^4*(1 + x)) + O(x^44))
    
  • PARI
    a(n) = (3 + 2*n - 3*n^2 + 4*n^3 - 3*((-1 + n)%2))/6
    

Formula

a(n) = A045991(n) - Sum_{k=2..n-1} A085046(k) for n > 2 (proved).
G.f.: x*(1 + x + 5 x^2 + x^3)/((-1 + x)^4 (1 + x)).
a(n) + a(n + 1) = A228958(2*n + 1).
From Colin Barker, Aug 17 2018: (Start)
a(n) = (2*n - 3*n^2 + 4*n^3) / 6 for n even.
a(n) = (3 + 2*n - 3*n^2 + 4*n^3) / 6 for n odd.
a(n) = 3*a(n - 1) - 2*a(n - 2) - 2*a(n - 3) + 3*a(n - 4) - a(n - 5) for n > 5.
(End)
E.g.f.: (1/12)*exp(-x)*(-3 + exp(2*x)*(3 + 6*x + 18*x^2 + 8*x^3)). - Stefano Spezia, Feb 10 2019

A318868 a(n) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11^12 + 13^14 + ... + (up to n).

Original entry on oeis.org

1, 1, 4, 82, 87, 15707, 15714, 5780508, 5780517, 3492564909, 3492564920, 3141920941630, 3141920941643, 3940518306640919, 3940518306640934, 6572348874019531544, 6572348874019531561, 14069656800941744522553, 14069656800941744522572, 37604043114346899937878154
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 16 2018

Keywords

Examples

			a(1) = 1;
a(2) = 1^2 = 1;
a(3) = 1^2 + 3 = 4;
a(4) = 1^2 + 3^4 = 82;
a(5) = 1^2 + 3^4 + 5 = 87;
a(6) = 1^2 + 3^4 + 5^6 = 15707;
a(7) = 1^2 + 3^4 + 5^6 + 7 = 15714;
a(8) = 1^2 + 3^4 + 5^6 + 7^8 = 5780508;
a(9) = 1^2 + 3^4 + 5^6 + 7^8 + 9 = 5780517;
a(10) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 = 3492564909;
a(11) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11 = 3492564920;
a(12) = 1^2 + 3^4 + 5^6 + 7^8 + 9^10 + 11^12 = 3141920941630, etc.
		

Crossrefs

Programs

  • Mathematica
    Table[(2*Floor[(n - 1)/2] + 1)*Mod[n, 2] + Sum[(2*i - 1)^(2*i), {i, Floor[n/2]}], {n, 25}]
  • PARI
    a(n) = (2*((n-1)\2) + 1)*(n % 2) + sum(i=1, n\2, (2*i - 1)^(2*i)); \\ Michel Marcus, Sep 18 2018

Formula

a(n) = (2*floor((n-1)/2) + 1)*(n mod 2) + Sum_{i=1..floor(n/2)} (2*i - 1)^(2*i).

A319258 a(n) = 1 + 2*3 + 4 + 5*6 + 7 + 8*9 + 10 + 11*12 + ... + (up to n).

Original entry on oeis.org

1, 3, 7, 11, 16, 41, 48, 56, 120, 130, 141, 262, 275, 289, 485, 501, 518, 807, 826, 846, 1246, 1268, 1291, 1820, 1845, 1871, 2547, 2575, 2604, 3445, 3476, 3508, 4532, 4566, 4601, 5826, 5863, 5901, 7345, 7385, 7426, 9107, 9150, 9194, 11130, 11176, 11223
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 16 2018

Keywords

Examples

			a(1) = 1;
a(2) = 1 + 2 = 3;
a(3) = 1 + 2*3 = 7;
a(4) = 1 + 2*3 + 4 = 11;
a(5) = 1 + 2*3 + 4 + 5 = 16;
a(6) = 1 + 2*3 + 4 + 5*6 = 41;
a(7) = 1 + 2*3 + 4 + 5*6 + 7 = 48;
a(8) = 1 + 2*3 + 4 + 5*6 + 7 + 8 = 56;
a(9) = 1 + 2*3 + 4 + 5*6 + 7 + 8*9 = 120;
a(10) = 1 + 2*3 + 4 + 5*6 + 7 + 8*9 + 10 = 130;
a(11) = 1 + 2*3 + 4 + 5*6 + 7 + 8*9 + 10 + 11 = 141;
a(12) = 1 + 2*3 + 4 + 5*6 + 7 + 8*9 + 10 + 11*12 = 262; etc.
		

Crossrefs

Programs

  • Mathematica
    Table[n (1 + Floor[(n - 2)/3] - Floor[n/3]) + 3 Floor[n/3]^2 (1 + Floor[n/3]) + Floor[(n + 2)/3] (3 Floor[(n + 2)/3] - 1)/2, {n, 50}]
  • PARI
    Vec(x*(1 + 2*x + 4*x^2 + x^3 - x^4 + 13*x^5 - 2*x^6 - x^7 + x^8) / ((1 - x)^4*(1 + x + x^2)^3) + O(x^40)) \\ Colin Barker, Sep 16 2018

Formula

a(n) = n*(1 + floor((n-2)/3) - floor(n/3)) + 3*floor(n/3)^2*(1 + floor(n/3)) + floor((n+2)/3)*(3*floor((n+2)/3) - 1)/2.
From Colin Barker, Sep 16 2018: (Start)
G.f.: x*(1 + 2*x + 4*x^2 + x^3 - x^4 + 13*x^5 - 2*x^6 - x^7 + x^8) / ((1 - x)^4*(1 + x + x^2)^3).
a(n) = a(n-1) + 3*a(n-3) - 3*a(n-4) - 3*a(n-6) + 3*a(n-7) + a(n-9) - a(n-10) for n>10.
(End)

A300254 a(n) = 25*(n + 1)*(4*n + 3)*(5*n + 4)/3.

Original entry on oeis.org

100, 1050, 3850, 9500, 19000, 33350, 53550, 80600, 115500, 159250, 212850, 277300, 353600, 442750, 545750, 663600, 797300, 947850, 1116250, 1303500, 1510600, 1738550, 1988350, 2261000, 2557500, 2878850, 3226050, 3600100, 4002000, 4432750, 4893350, 5384800, 5908100, 6464250
Offset: 0

Views

Author

Bruno Berselli, Mar 12 2018

Keywords

Comments

Hirschhorn has discovered that p(20*n+11,4) + p(20*n+12,4) + p(20*n+13,4) = 25*(n + 1)*(4*n + 3)*(5*n + 4)/3, where p(m,k) denote the number of partitions of m into at most k parts. Therefore, p(20*n+11,4) + p(20*n+12,4) + p(20*n+13,4) == 0 (mod 50) [see Hirschhorn's paper in References section].
a(n) == 0 (mod 3) if n is of the form 2*h + 3*floor(h/3 + 2/3) + 1.
a(n) == 0 (mod 7) if n is a member of A047278.

References

  • Michael D. Hirschhorn, Congruences modulo 5 for partitions into at most four parts, The Fibonacci Quarterly, Vol. 56, Number 1, 2018, pages 32-37 [the equation 1.7 contains a typo].

Crossrefs

Subsequence of A014112, A212964, A228958, A268684.

Programs

  • GAP
    List([0..40], n -> 25*(n+1)*(4*n+3)*(5*n+4)/3);
    
  • Julia
    [div(25*(n+1)*(4*n+3)*(5*n+4), 3) for n in 0:40] |> println
    
  • Magma
    [25*(n+1)*(4*n+3)*(5*n+4)/3: n in [0..40]];
    
  • Mathematica
    Table[25 (n + 1) (4 n + 3) (5 n + 4)/3, {n, 0, 40}]
  • Maxima
    makelist(25*(n+1)*(4*n+3)*(5*n+4)/3, n, 0, 40);
    
  • PARI
    vector(40, n, n--; 25*(n+1)*(4*n+3)*(5*n+4)/3)
    
  • PARI
    Vec(50*(2 + 13*x + 5*x^2) / (1 - x)^4 + O(x^60)) \\ Colin Barker, Mar 13 2018
  • Python
    [25*(n+1)*(4*n+3)*(5*n+4)/3 for n in range(40)]
    
  • Sage
    [25*(n+1)*(4*n+3)*(5*n+4)/3 for n in (0..40)]
    

Formula

O.g.f.: 50*(2 + 13*x + 5*x^2)/(1 - x)^4 [formula 4.3 in Hirschhorn's paper].
E.g.f.: 25*(12 + 114*x + 111*x^2 + 20*x^3)*exp(x)/3.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4)
a(n) = A014112(10*n+8) = A212964(10*n+9) = A228958(10*n+8) = A268684(5*n+4).

A319438 a(n) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11^12 + 13^14 - ... + (up to n).

Original entry on oeis.org

1, 1, -2, -80, -75, 15545, 15538, -5749256, -5749247, 3481035145, 3481035134, -3134947341576, -3134947341563, 3934241438357713, 3934241438357698, -6564474114274532912, -6564474114274532895, 14056519977953450458097, 14056519977953450458078
Offset: 1

Views

Author

Wesley Ivan Hurt, Sep 18 2018

Keywords

Comments

An alternating version of A318868.

Examples

			   a(1) = 1;
   a(2) = 1^2 = 1;
   a(3) = 1^2 - 3 = -2;
   a(4) = 1^2 - 3^4 = -80;
   a(5) = 1^2 - 3^4 + 5 = -75;
   a(6) = 1^2 - 3^4 + 5^6 = 15545;
   a(7) = 1^2 - 3^4 + 5^6 - 7 = 15538;
   a(8) = 1^2 - 3^4 + 5^6 - 7^8 = -5749256;
   a(9) = 1^2 - 3^4 + 5^6 - 7^8 + 9 = -5749247;
  a(10) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 = 3481035145;
  a(11) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11 = 3481035134;
  a(12) = 1^2 - 3^4 + 5^6 - 7^8 + 9^10 - 11^12 = -3134947341576; etc .
		

Crossrefs

Programs

  • Mathematica
    Table[n*Mod[n, 2]*(-1)^(Floor[n/2]) + Sum[(2*i - 1)^(2*i)*(-1)^(i - 1), {i, Floor[n/2]}], {n, 30}]

Formula

a(n) = n*(n mod 2)*(-1)^floor(n/2) + Sum_{i=1..floor(n/2)} (2*i - 1)^(2*i)*(-1)^(i - 1).
Previous Showing 11-16 of 16 results.