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.

User: Bruno Berselli

Bruno Berselli's wiki page.

Bruno Berselli has authored 384 sequences. Here are the ten most recent ones:

A327440 a(n) = floor(3*n/10).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 23
Offset: 0

Author

Bruno Berselli, Sep 11 2019

Keywords

Comments

The sequence can be obtained from A008585 by deleting the last digit of each term.

Crossrefs

Cf. A008585.
Similar sequences with the formula floor(k*n/10): A059995 (k=1); A002266 (k=2); A057354 (k=4); A004526 (k=5); A057355 (k=6); A188511 (k=7); A090223 (k=8).

Programs

  • Julia
    [div(3*n, 10) for n in 0:80] |> println
    
  • Mathematica
    Table[Floor[3 n/10], {n, 0, 80}]
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3}, 80]
  • PARI
    vector(80, n, n--; floor(3*n/10))

Formula

O.g.f.: x^4*(1 + x^3 + x^6)/((1 + x)*(1 - x)^2*(1 - x + x^2 - x^3 + x^4)*(1 + x + x^2 + x^3 + x^4)) = (x^4 + x^7 + x^10)/(1 - x - x^10 + x^11).
a(n) = a(n-1) + a(n-10) - a(n-11) for n > 10.

A322489 Numbers k such that k^k ends with 4.

Original entry on oeis.org

2, 18, 22, 38, 42, 58, 62, 78, 82, 98, 102, 118, 122, 138, 142, 158, 162, 178, 182, 198, 202, 218, 222, 238, 242, 258, 262, 278, 282, 298, 302, 318, 322, 338, 342, 358, 362, 378, 382, 398, 402, 418, 422, 438, 442, 458, 462, 478, 482, 498, 502, 518, 522, 538, 542, 558
Offset: 1

Author

Bruno Berselli, Dec 12 2018

Keywords

Comments

Also numbers k == 2 (mod 4) such that 2^k and k^2 end with the same digit.
Numbers congruent to {2, 18} mod 20. - Amiram Eldar, Feb 27 2023

Crossrefs

Subsequence of A139544, A235700.
Numbers k such that k^k ends with d: A008592 (d=0), A017281 (d=1), A067870 (d=3), this sequence (d=4), A017329 (d=5), A271346 (d=6), A322490 (d=7), A017377 (d=9).

Programs

  • GAP
    List([1..70], n -> 10*n+3*(-1)^n-5);
    
  • Julia
    [10*n+3*(-1)^n-5 for n in 1:70] |> println
    
  • Magma
    [10*n+3*(-1)^n-5: n in [1..70]];
    
  • Maple
    select(n->n^n mod 10=4,[$1..558]); # Paolo P. Lava, Dec 18 2018
  • Mathematica
    Table[10 n + 3 (-1)^n - 5, {n, 1, 60}]
  • Maxima
    makelist(10*n+3*(-1)^n-5, n, 1, 70);
    
  • PARI
    apply(A322489(n)=10*n+3*(-1)^n-5, [1..70]) \\ M. F. Hasler, Dec 14 2018
    
  • PARI
    Vec(2*x*(1 + 8*x + x^2) / ((1 - x)^2*(1 + x)) + O(x^70)) \\ Colin Barker, Dec 13 2018
  • Python
    [10*n+3*(-1)**n-5 for n in range(1, 70)]
    
  • Sage
    [10*n+3*(-1)^n-5 for n in (1..70)]
    

Formula

O.g.f.: 2*x*(1 + 8*x + x^2)/((1 + x)*(1 - x)^2).
E.g.f.: 2 + 3*exp(-x) + 5*(2*x - 1)*exp(x).
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 10*n + 3*(-1)^n - 5. Therefore:
a(n) = 10*n - 8 for odd n;
a(n) = 10*n - 2 for even n.
a(n+2*k) = a(n) + 20*k.
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(2*Pi/5)*Pi/20 = sqrt(5+2*sqrt(5))*Pi/20. - Amiram Eldar, Feb 27 2023

A322490 Numbers k such that k^k ends with 7.

Original entry on oeis.org

3, 17, 23, 37, 43, 57, 63, 77, 83, 97, 103, 117, 123, 137, 143, 157, 163, 177, 183, 197, 203, 217, 223, 237, 243, 257, 263, 277, 283, 297, 303, 317, 323, 337, 343, 357, 363, 377, 383, 397, 403, 417, 423, 437, 443, 457, 463, 477, 483, 497, 503, 517, 523, 537, 543, 557, 563
Offset: 1

Author

Bruno Berselli, Dec 12 2018

Keywords

Comments

Equivalently, numbers k such that k and (7^h)^k end with the same digit, where h == 1 (mod 4).
Also, numbers k such that k and (3^h)^k end with the same digit, where h == 3 (mod 4).
Numbers congruent to {3, 17} mod 20. - Amiram Eldar, Feb 27 2023

Crossrefs

Subsequence of A063226, A295009.
Similar sequences are listed in A322489.

Programs

  • GAP
    List([1..70], n -> 10*n+2*(-1)^n-5);
    
  • Julia
    [10*n+2*(-1)^n-5 for n in 1:70] |> println
    
  • Magma
    [10*n+2*(-1)^n-5: n in [1..70]];
    
  • Maple
    select(n->n^n mod 10=7,[$1..563]); # Paolo P. Lava, Dec 18 2018
  • Mathematica
    Table[10 n + 2 (-1)^n - 5, {n, 1, 60}]
    LinearRecurrence[{1,1,-1},{3,17,23},80] (* Harvey P. Dale, Sep 15 2019 *)
  • Maxima
    makelist(10*n+2*(-1)^n-5, n, 1, 70);
    
  • PARI
    apply(A322490(n)=10*n+2*(-1)^n-5, [1..70])
    
  • PARI
    Vec(x*(3 + 14*x + 3*x^2) / ((1 + x)*(1 - x)^2) + O(x^55)) \\ Colin Barker, Dec 13 2018
  • Python
    [10*n+2*(-1)**n-5 for n in range(1, 70)]
    
  • Sage
    [10*n+2*(-1)^n-5 for n in (1..70)]
    

Formula

O.g.f.: x*(3 + 14*x + 3*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: 3 + 2*exp(-x) + 5*(2*x - 1)*exp(x).
a(n) = -a(-n+1) = a(n-1) + a(n-2) - a(n-3).
a(n) = 10*n + 2*(-1)^n - 5. Therefore:
a(n) = 10*n - 7 for odd n;
a(n) = 10*n - 3 for even n.
a(n+2*k) = a(n) + 20*k.
Sum_{n>=1} (-1)^(n+1)/a(n) = tan(7*Pi/20)*Pi/20. - Amiram Eldar, Feb 27 2023

A321383 Numbers k such that the concatenation k21 is a square.

Original entry on oeis.org

1, 15, 37, 79, 123, 193, 259, 357, 445, 571, 681, 835, 967, 1149, 1303, 1513, 1689, 1927, 2125, 2391, 2611, 2905, 3147, 3469, 3733, 4083, 4369, 4747, 5055, 5461, 5791, 6225, 6577, 7039, 7413, 7903, 8299, 8817, 9235, 9781, 10221, 10795, 11257, 11859, 12343, 12973, 13479
Offset: 1

Author

Bruno Berselli, Nov 08 2018

Keywords

Crossrefs

Cf. A008805.
Numbers k such that the concatenation km is a square: A132356 (m = 1), A273365 (m = 4), A273366 (m = 5), A273367 (m = 6), A273368 (m = 9); missing sequence for m = 16; this sequence for m = 21; missing sequence for m = 24; A002378 (m = 25).

Programs

  • GAP
    List([1..50], n -> (50*(n-1)*n+3*(2*n-1)*(-1)^n+11)/8);
    
  • Julia
    [div((50*(n-1)*n+3*(2*n-1)*(-1)^n+11), 8) for n in 1:50] |> println
  • Magma
    [(50*(n-1)*n+3*(2*n-1)*(-1)^n+11)/8: n in [1..50]];
    
  • Mathematica
    Table[(50 (n - 1) n + 3 (2 n - 1) (-1)^n + 11)/8, {n, 1, 50}]
  • Maxima
    makelist((50*(n-1)*n+3*(2*n-1)*(-1)^n+11)/8, n, 1, 50);
    
  • PARI
    vector(50, n, nn; (50*(n-1)*n+3*(2*n-1)*(-1)^n+11)/8)
    
  • PARI
    Vec(x*(1 + 14*x + 20*x^2 + 14*x^3 + x^4) / ((1 - x)^3*(1 + x)^2) + O(x^50)) \\ Colin Barker, Nov 12 2018
    
  • Python
    [(50*(n-1)*n+3*(2*n-1)*(-1)**n+11)/8 for n in range(1, 50)]
    
  • Sage
    [(50*(n-1)*n+3*(2*n-1)*(-1)^n+11)/8 for n in (1..50)]
    

Formula

G.f.: x*(1 + 14*x + 20*x^2 + 14*x^3 + x^4)/((1 + x)^2*(1 - x)^3).
a(n) = a(-n+1) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
a(n) = 2*a(n-2) - a(n-4) + 50.
a(n) = (50*(n - 1)*n + 3*(2*n - 1)*(-1)^n + 11)/8. Therefore:
a(n) = (25*n^2 - 22*n + 4)/4 for even n;
a(n) = (25*n^2 - 28*n + 7)/4 for odd n.

A319007 Sum of the next n nonnegative integers repeated (A004526).

Original entry on oeis.org

0, 1, 5, 14, 29, 51, 82, 124, 178, 245, 327, 426, 543, 679, 836, 1016, 1220, 1449, 1705, 1990, 2305, 2651, 3030, 3444, 3894, 4381, 4907, 5474, 6083, 6735, 7432, 8176, 8968, 9809, 10701, 11646, 12645, 13699, 14810, 15980, 17210, 18501, 19855, 21274, 22759, 24311, 25932
Offset: 1

Author

Bruno Berselli, Sep 07 2018

Keywords

Comments

After 29, all terms are composite.

Examples

			Next n nonnegative integers repeated:    Sums:
0,  ......................................   0
0, 1,  ...................................   1
1, 2, 2,  ................................   5
3, 3, 4, 4,  .............................  14
5, 5, 6, 6, 7,  ..........................  29
7, 8, 8, 9, 9, 10,  ......................  51, etc.
		

Crossrefs

Sum of the next n nonnegative integers: A027480.

Programs

  • Magma
    [Integers()! (n*(n^2-2)+(-(n mod 2))^(n*(n-1)/2))/4: n in [1..50]];
    
  • Maple
    a := n -> (n^3 - 2*n + (-(n mod 2))^binomial(n,2))/4;
    seq(a(n), n=1..47); # Peter Luschny, Sep 09 2018
  • Mathematica
    Table[(2 n (n^2 - 2) + (1 - (-1)^n) (-1)^((n-1)/2))/8, {n, 1, 50}]
  • PARI
    concat(0, Vec(x^2*(1 + x + x^2)/((1 + x^2)*(1 - x)^4) + O(x^50))) \\ Colin Barker, Sep 10 2018

Formula

G.f.: x^2*(1 + x + x^2)/((1 + x^2)*(1 - x)^4).
a(n) = -a(-n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6).
a(n) = (2*n*(n^2 - 2) + (1 - (-1)^n)*(-1)^((n-1)/2))/8.
a(n) = A319006(n) - n.
a(n) = (n^3 - 2*n + Chi(n))/4 where Chi(n) = A101455(n). - Peter Luschny, Sep 09 2018

A319006 Sum of the next n positive integers repeated (A008619).

Original entry on oeis.org

1, 3, 8, 18, 34, 57, 89, 132, 187, 255, 338, 438, 556, 693, 851, 1032, 1237, 1467, 1724, 2010, 2326, 2673, 3053, 3468, 3919, 4407, 4934, 5502, 6112, 6765, 7463, 8208, 9001, 9843, 10736, 11682, 12682, 13737, 14849, 16020, 17251, 18543, 19898, 21318, 22804, 24357, 25979
Offset: 1

Author

Bruno Berselli, Sep 07 2018

Keywords

Examples

			Next n positive integers repeated:       Sums:
1,  ......................................   1
1, 2,  ...................................   3
2, 3, 3,  ................................   8
4, 4, 5,  5,  ............................  18
6, 6, 7,  7,  8,  ........................  34
8, 9, 9, 10, 10, 11,  ....................  57, etc.
		

Crossrefs

Sum of the next n positive integers: A006003 (after 0).

Programs

  • Magma
    [Integers()! (n*(n^2+2)+(-(n mod 2))^(n*(n-1)/2))/4: n in [1..50]];
    
  • Maple
    a := n -> (n^3 + 2*n + (-(n mod 2))^binomial(n, 2))/4:
    seq(a(n), n=1..47); # Peter Luschny, Sep 09 2018
  • Mathematica
    Table[(2 n (n^2 + 2) + (1 - (-1)^n) (-1)^((n-1)/2))/8, {n, 1, 50}]
    Module[{nn=50,lst},lst=Flatten[Table[{n,n},{n,(nn(nn+1))/2}]];Total/@ TakeList[lst,Range[nn]]] (* Requires Mathematica version 11 or later *) (* or *) LinearRecurrence[{4,-7,8,-7,4,-1},{1,3,8,18,34,57},50] (* Harvey P. Dale, Jul 10 2021 *)
  • PARI
    Vec(x*(1 - x + 3*x^2 - x^3 + x^4)/((1 + x^2)*(1 - x)^4) + O(x^50)) \\ Colin Barker, Sep 10 2018

Formula

G.f.: x*(1 - x + 3*x^2 - x^3 + x^4)/((1 + x^2)*(1 - x)^4).
a(n) = -a(-n) = 4*a(n-1) - 7*a(n-2) + 8*a(n-3) - 7*a(n-4) + 4*a(n-5) - a(n-6).
a(n) = (2*n*(n^2 + 2) + (1 - (-1)^n)*(-1)^((n-1)/2))/8.
a(n) = A319007(n) + n.
a(n) = (n^3 + 2*n + Chi(n))/4 where Chi(n) = A101455(n). - Peter Luschny, Sep 09 2018

A318765 a(n) = (n + 2)*(n^2 + n - 1).

Original entry on oeis.org

-2, 3, 20, 55, 114, 203, 328, 495, 710, 979, 1308, 1703, 2170, 2715, 3344, 4063, 4878, 5795, 6820, 7959, 9218, 10603, 12120, 13775, 15574, 17523, 19628, 21895, 24330, 26939, 29728, 32703, 35870, 39235, 42804, 46583, 50578, 54795, 59240, 63919, 68838, 74003, 79420, 85095
Offset: 0

Author

Bruno Berselli, Sep 04 2018

Keywords

Comments

First differences are in A004538.
a(n) is divisible by 11 for n = 3, 7, 9, 14, 18, 20, 25, 29, 31, 36, 40, ... with formula (1/3)*(11*m + (1 + (m mod 3))*(-1)^((m-1) mod 3) + 8), m >= 0.

Crossrefs

Cf. A004538.
Subsequence of A047216.
Similar sequences (see Table in Links section): A011379, A027444, A033445, A034262, A045991, A069778.

Programs

  • GAP
    List([0..50], n -> (n+2)*(n^2+n-1));
    
  • Julia
    [(n+2)*(n^2+n-1) for n in 0:50] |> println
  • Magma
    [(n+2)*(n^2+n-1): n in [0..50]];
    
  • Maple
    seq((n+2)*(n^2+n-1),n=0..43); # Paolo P. Lava, Sep 04 2018
  • Mathematica
    Table[(n + 2) (n^2 + n - 1), {n, 0, 50}]
  • Maxima
    makelist((n+2)*(n^2+n-1), n, 0, 50);
    
  • PARI
    vector(50, n, n--; (n+2)*(n^2+n-1))
    
  • Python
    [(n+2)*(n**2+n-1) for n in range(50)]
    
  • Sage
    [(n+2)*(n^2+n-1) for n in (0..50)]
    

Formula

O.g.f.: (-2 + 11*x - 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (-2 + 5*x + 6*x^2 + x^3)*exp(x).
a(n) = -A033445(-n-1).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n >= 5. - Wesley Ivan Hurt, Dec 18 2020

A316672 Numbers k for which 120*k + 169 is a square.

Original entry on oeis.org

-1, 0, 1, 3, 10, 14, 17, 22, 36, 43, 48, 56, 77, 87, 94, 105, 133, 146, 155, 169, 204, 220, 231, 248, 290, 309, 322, 342, 391, 413, 428, 451, 507, 532, 549, 575, 638, 666, 685, 714, 784, 815, 836, 868, 945, 979, 1002, 1037, 1121, 1158, 1183, 1221, 1312, 1352, 1379, 1420
Offset: 1

Author

Bruno Berselli, Jul 10 2018

Keywords

Comments

All terms of A303305 belong to this sequence.

Crossrefs

Subsequence of A047283.
Cf. Numbers k for which 8*(2*h+1)*k + (2*h-1)^2 is a square: A000217 (h=0), A001318 (h=1), A085787 (h=2), A118277 (h=3), A195160 (h=4), A195313 (h=5), A277082 (h=6), this sequence (h=7), A303813 (h=8), A303298 (h=9); A303815 (h=13).

Programs

  • Magma
    [k: k in [0..1500] | IsSquare(120*k+169)];
    
  • Maple
    select(k->issqr(120*k+169),[$-1..1500]); # Muniru A Asiru, Jul 10 2018
  • Mathematica
    LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {-1, 0, 1, 3, 10, 14, 17, 22, 36}, 60]
  • PARI
    isok(n) = issquare(120*n+169); \\ Michel Marcus, Jul 11 2018
    
  • PARI
    Vec(x*(-1 + x + x^2 + 2*x^3 + 9*x^4 + 2*x^5 + x^6 + x^7 - x^8)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2) + O(x^40)) \\ Colin Barker, Jul 18 2018
  • Sage
    print([k for k in (0..1500) if is_square(120*k+169)])
    

Formula

O.g.f.: x*(-1 + x + x^2 + 2*x^3 + 9*x^4 + 2*x^5 + x^6 + x^7 - x^8)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2).
a(n) = a(1-n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9).
a(n) = (30*n^2 - 2*(15 + 3*(-1)^n + 10*i^(n*(n+1)))*n + 2*(5 + (-1)^n)*i^(n*(n+1)) + 3*(-1)^n - 79)/64, with i = sqrt(-1). Therefore:
a(4*k+1) = (3*k + 2)*(5*k - 1)/2;
a(4*k+2) = k*(15*k + 13)/2, first bisection of A303305;
a(4*k+3) = (k + 1)*(15*k + 2)/2, second bisection of A303305 (see A051869);
a(4*k+4) = (3*k + 1)*(5*k + 6)/2.

A316466 a(n) = 2*n*(7*n - 3).

Original entry on oeis.org

0, 8, 44, 108, 200, 320, 468, 644, 848, 1080, 1340, 1628, 1944, 2288, 2660, 3060, 3488, 3944, 4428, 4940, 5480, 6048, 6644, 7268, 7920, 8600, 9308, 10044, 10808, 11600, 12420, 13268, 14144, 15048, 15980, 16940, 17928, 18944, 19988, 21060, 22160, 23288, 24444, 25628, 26840
Offset: 0

Author

Bruno Berselli, Jul 04 2018

Keywords

Comments

This is the case k = 9 of Sum_{i = 2..k} P(i,n) = (k - 1)*n*((k - 2)*n - (k - 6))/4, where P(k,n) = n*((k - 2)*n - (k - 4))/2 (see Crossrefs for similar sequences and "Square array in A139600" in Links section).
14*x + 9 is a square for x = a(n) or x = a(-n).

Crossrefs

Similar sequences (see the first comment): A000096 (k = 3), A045943 (k = 4), A049451 (k = 5), A033429 (k = 6), A167469 (k = 7), A152744 (k = 8), this sequence (k = 9), A152994 (k = 10).

Programs

  • GAP
    List([0..50], n -> 2*n*(7*n-3));
    
  • Julia
    [2*n*(7*n-3) for n in 0:50] |> println
  • Magma
    [2*n*(7*n-3): n in [0..50]];
    
  • Mathematica
    Table[2 n (7 n - 3), {n, 0, 50}]
    LinearRecurrence[{3,-3,1},{0,8,44},50] (* Harvey P. Dale, Jan 24 2021 *)
  • Maxima
    makelist(2*n*(7*n-3), n, 0, 50);
    
  • PARI
    vector(50, n, n--; 2*n*(7*n-3))
    
  • PARI
    concat(0, Vec(4*x*(2 + 5*x)/(1 - x)^3 + O(x^40))) \\ Colin Barker, Jul 05 2018
    
  • Python
    [2*n*(7*n-3) for n in range(50)]
    
  • Sage
    [2*n*(7*n-3) for n in (0..50)]
    

Formula

O.g.f.: 4*x*(2 + 5*x)/(1 - x)^3.
E.g.f.: 2*x*(4 + 7*x)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 4*A218471(n).

A316224 a(n) = n*(2*n + 1)*(4*n + 1).

Original entry on oeis.org

0, 15, 90, 273, 612, 1155, 1950, 3045, 4488, 6327, 8610, 11385, 14700, 18603, 23142, 28365, 34320, 41055, 48618, 57057, 66420, 76755, 88110, 100533, 114072, 128775, 144690, 161865, 180348, 200187, 221430, 244125, 268320, 294063, 321402, 350385, 381060, 413475, 447678, 483717
Offset: 0

Author

Bruno Berselli, Jun 27 2018

Keywords

Comments

Sums of the consecutive integers from A000384(n) to A000384(n+1)-1. This is the case s=6 of the formula n*(n*(s-2) + 1)*(n*(s-2) + 2)/2 related to s-gonal numbers.
The inverse binomial transform is 0, 15, 60, 48, 0, ... (0 continued).

Examples

			Row sums of the triangle:
|  0 |  ................................................................. 0
|  1 |  2  3  4  5  .................................................... 15
|  6 |  7  8  9 10 11 12 13 14  ........................................ 90
| 15 | 16 17 18 19 20 21 22 23 24 25 26 27  ........................... 273
| 28 | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  ............... 612
| 45 | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65  .. 1155
...
where:
. first column is A000384,
. second column is A130883 (without 1),
. third column is A033816,
. diagonal is A014106,
. 0, 2, 8, 18, 32, 50, ... are in A001105.
		

Crossrefs

First bisection of A059270 and subsequence of A034828, A047866, A109900, A290168.
Sums of the consecutive integers from P(s,n) to P(s,n+1)-1, where P(s,k) is the k-th s-gonal number: A027480 (s=3), A055112 (s=4), A228888 (s=5).

Programs

  • GAP
    List([0..40], n -> n*(2*n+1)*(4*n+1));
    
  • Julia
    [n*(2*n+1)*(4*n+1) for n in 0:40] |> println
  • Magma
    [n*(2*n+1)*(4*n+1): n in [0..40]];
    
  • Maple
    seq(n*(2*n+1)*(4*n+1),n=0..40); # Muniru A Asiru, Jun 27 2018
  • Mathematica
    Table[n (2 n + 1) (4 n + 1), {n, 0, 40}]
  • Maxima
    makelist(n*(2*n+1)*(4*n+1), n, 0, 40);
    
  • PARI
    vector(40, n, n--; n*(2*n+1)*(4*n+1))
    
  • Python
    [n*(2*n+1)*(4*n+1) for n in range(40)]
    
  • Sage
    [n*(2*n+1)*(4*n+1) for n in (0..40)]
    

Formula

O.g.f.: 3*x*(5 + 10*x + x^2)/(1 - x)^4.
E.g.f.: x*(15 + 30*x + 8*x^2)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
a(n) = 3*A258582(n).
a(n) = -3*A100157(-n).
Sum_{n>0} 1/a(n) = 2*(3 - log(4)) - Pi.
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) + 2*sqrt(2)*log(1+sqrt(2)) + (sqrt(2)-1/2)*Pi - 6. - Amiram Eldar, Sep 17 2022