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

A075249 x-value of the solution (x,y,z) to 5/n = 1/x + 1/y + 1/z satisfying 0 < x < y < z and having the largest z-value. The y and z components are in A075250 and A075251.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 14, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18
Offset: 3

Views

Author

T. D. Noe, Sep 10 2002

Keywords

Comments

See A075248 for more details.

Crossrefs

Programs

  • Mathematica
    For[xLst={}; yLst={}; zLst={}; n=3, n<=100, n++, cnt=0; xr=n/5; If[IntegerQ[xr], x=xr+1, x=Ceiling[xr]]; While[yr=1/(5/n-1/x); If[IntegerQ[yr], y=yr+1, y=Ceiling[yr]]; cnt==0&&y>x, While[zr=1/(5/n-1/x-1/y); cnt==0&&zr>y, If[IntegerQ[zr], z=zr; cnt++; AppendTo[xLst, x]; AppendTo[yLst, y]; AppendTo[zLst, z]]; y++ ]; x++ ]]; xLst

Formula

Is a(n) = A047252(n-3)-n+4 ? - Ralf Stephan, Feb 24 2004

A296050 Number of permutations p of [n] such that min_{j=1..n} |p(j)-j| = 1.

Original entry on oeis.org

0, 0, 1, 2, 8, 40, 236, 1648, 13125, 117794, 1175224, 12903874, 154615096, 2007498192, 28075470833, 420753819282, 6726830163592, 114278495205524, 2055782983578788, 39039148388975552, 780412763620655061, 16381683795665956242, 360258256118419518680, 8283042472303599966974
Offset: 0

Views

Author

Alois P. Heinz, Jan 21 2019

Keywords

Examples

			a(2) = 1: 21.
a(3) = 2: 231, 312.
a(4) = 8: 2143, 2341, 2413, 3142, 3421, 4123, 4312, 4321.
a(5) = 40: 21453, 21534, 23154, 23451, 23514, 24153, 24513, 24531, 25134, 25413, 25431, 31254, 31452, 31524, 34152, 34251, 35124, 35214, 35412, 35421, 41253, 41523, 41532, 43152, 43251, 43512, 43521, 45132, 45213, 45231, 51234, 51423, 51432, 53124, 53214, 53412, 53421, 54132, 54213, 54231.
		

Crossrefs

Programs

  • Maple
    b:= proc(s, k) option remember; (n-> `if`(n=0, `if`(k=1, 1, 0), add(
          `if`(n=j, 0, b(s minus {j}, min(k, abs(n-j)))), j=s)))(nops(s))
        end:
    a:= n-> b({$1..n}, n):
    seq(a(n), n=0..14);
    # second Maple program:
    a:= n-> (f-> f(1)-f(2))(k-> `if`(n=0, 1, LinearAlgebra[Permanent](
            Matrix(n, (i, j)-> `if`(abs(i-j)>=k, 1, 0))))):
    seq(a(n), n=0..14);
    # third Maple program:
    g:= proc(n) g(n):= `if`(n<2, 1-n, (n-1)*(g(n-1)+g(n-2))) end:
    h:= proc(n) h(n):= `if`(n<7, [1, 0$3, 1, 4, 29][n+1], n*h(n-1)+4*h(n-2)
          -3*(n-3)*h(n-3)+(n-4)*h(n-4)+2*(n-5)*h(n-5)-(n-7)*h(n-6)-h(n-7))
        end:
    a:= n-> g(n)-h(n):
    seq(a(n), n=0..25);
  • Mathematica
    g[n_] := g[n] = If[n < 2, 1-n, (n-1)(g[n-1] + g[n-2])];
    h[n_] := h[n] = If[n < 7, {1, 0, 0, 0, 1, 4, 29}[[n+1]],
         n h[n-1] + 4h[n-2] - 3(n-3)h[n-3] + (n-4)h[n-4] +
         2(n-5)h[n-5] - (n-7)h[n-6] - h[n-7]];
    a[n_] := g[n] - h[n];
    Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 30 2021, after third Maple program *)

Formula

a(n) = A000142(n) - A001883(n) - A002467(n).
a(n) = A000166(n) - A001883(n).
a(n) = Sum_{k=1..n} A323671(n,k).
a(n) is odd <=> n in { A016933 }.
a(n) is even <=> n in { A047252 }.

A047248 Numbers that are congruent to {0, 2, 3, 4, 5} (mod 6).

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 68
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A047252.

Programs

Formula

G.f.: x^2*(2+x+x^2+x^3+x^4) / ( (x^4+x^3+x^2+x+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
Sum_{n>=2} (-1)^n/a(n) = log(2+sqrt(3))/(2*sqrt(3)) + log(2)/6 - (9-4*sqrt(3))*Pi/36. - Amiram Eldar, Dec 17 2021
Showing 1-3 of 3 results.