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

A270809 a(n) = n^3/3 - 7*n/3 + 4.

Original entry on oeis.org

4, 2, 2, 6, 16, 34, 62, 102, 156, 226, 314, 422, 552, 706, 886, 1094, 1332, 1602, 1906, 2246, 2624, 3042, 3502, 4006, 4556, 5154, 5802, 6502, 7256, 8066, 8934, 9862, 10852, 11906, 13026, 14214, 15472, 16802, 18206, 19686, 21244, 22882, 24602, 26406, 28296, 30274
Offset: 0

Views

Author

N. J. A. Sloane, Apr 06 2016

Keywords

Crossrefs

Cf. A105163.

Programs

  • Magma
    [n^3/3-7*n/3+4: n in [0..50]]; // Vincenzo Librandi, Apr 08 2016
    
  • Mathematica
    Table[n^3 / 3 - 7 n / 3 + 4, {n, 0, 50}] (* Vincenzo Librandi, Apr 08 2016 *)
    LinearRecurrence[{4,-6,4,-1},{4,2,2,6},50] (* Harvey P. Dale, Jul 18 2025 *)
  • PARI
    vector(50, n, n--; n^3/3-7*n/3+4) \\ Bruno Berselli, Apr 08 2016
    
  • PARI
    x='x+O('x^99); Vec((4-14*x+18*x^2-6*x^3)/(1-x)^4) \\ Altug Alkan, Apr 08 2016
    
  • Sage
    [n^3/3-7*n/3+4 for n in [0..50]] # Bruno Berselli, Apr 08 2016

Formula

O.g.f.: (4 - 14*x + 18*x^2 - 6*x^3)/(1-x)^4. - Vincenzo Librandi, Apr 08 2016
E.g.f.: (12 - 6*x + 3*x^2 + x^3)*exp(x)/3. - Bruno Berselli, Apr 08 2016
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>3. - Vincenzo Librandi, Apr 08 2016
a(n) = 2*A105163(n) for n>0. - Bruno Berselli, Apr 08 2016

A363256 Number of length n strings on the alphabet {0,1,2,3} with digit sum at most 4.

Original entry on oeis.org

1, 4, 13, 32, 66, 121, 204, 323, 487, 706, 991, 1354, 1808, 2367, 3046, 3861, 4829, 5968, 7297, 8836, 10606, 12629, 14928, 17527, 20451, 23726, 27379, 31438, 35932, 40891, 46346, 52329, 58873, 66012, 73781, 82216, 91354, 101233, 111892, 123371, 135711
Offset: 0

Views

Author

Daniel T. Martin, May 23 2023

Keywords

Examples

			For n=2, the 13 strings are all possible 2-character strings of '0', '1', '2' and '3' except the four strings '33', '32', '23'.
		

Crossrefs

Cf. A227259 (the same for {0,1,2} with digit sum <= 4).
Cf. A105163 (the same for {0,1,2} with digit sum <= 3, shifted by 2).
Cf. A005718.

Programs

  • Mathematica
    f[n_, r_, l_] := If[r < 0, 0, If[r==0, 1, If[l < 0, 0, If[l == 0, 1, Sum[f[n, r-j, l-1], {j, 0, n}]]]]]; Table[f[3, 4,x], {x, 0, 40}]

Formula

a(n) = (((n + 10)*n + 35)*n + 26)*n/24 + 1.
G.f.: -(x^4 - 3*x^3 + 3*x^2 - x + 1)/(x - 1)^5.
a(n) = 1 + A005718(n-1) for n>=1.
Previous Showing 11-12 of 12 results.