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

A190190 Positions of 1 in A190188; complement of A180189.

Original entry on oeis.org

1, 2, 4, 5, 8, 12, 13, 15, 16, 18, 19, 24, 25, 26, 27, 29, 32, 35, 36, 37, 38, 40, 43, 47, 48, 50, 51, 54, 57, 59, 61, 62, 64, 65, 70, 71, 72, 73, 75, 76, 82, 83, 84, 86, 89, 93, 94, 95, 96, 97, 100, 103, 105, 106, 107, 108, 111, 114, 118, 119, 121, 122, 125, 128, 129, 130, 132, 133, 135, 140, 141, 142, 143, 144, 146, 151
Offset: 1

Views

Author

Clark Kimberling, May 05 2011

Keywords

Comments

See A190188.

Crossrefs

Programs

  • Mathematica
    u = E; v = 1/E;
    f[n_] := Floor[n*u + n*v] - Floor[n*u] - Floor[n*v]
    t = Table[f[n], {n, 1, 120}] (* A190188 *)
    Flatten[Position[t, 0]]      (* A190189 *)
    Flatten[Position[t, 1]]      (* A190190 *)

A180188 Triangle read by rows: T(n,k) is the number of permutations of [n] with k circular successions (0<=k<=n-1). A circular succession in a permutation p of [n] is either a pair p(i), p(i+1), where p(i+1)=p(i)+1 or the pair p(n), p(1) if p(1)=p(n)+1.

Original entry on oeis.org

1, 0, 2, 3, 0, 3, 8, 12, 0, 4, 45, 40, 30, 0, 5, 264, 270, 120, 60, 0, 6, 1855, 1848, 945, 280, 105, 0, 7, 14832, 14840, 7392, 2520, 560, 168, 0, 8, 133497, 133488, 66780, 22176, 5670, 1008, 252, 0, 9, 1334960, 1334970, 667440, 222600, 55440, 11340, 1680, 360, 0
Offset: 1

Views

Author

Emeric Deutsch, Sep 06 2010

Keywords

Comments

For example, p=(4,1,2,5,3) has 2 circular successions: (1,2) and (3,4).
Sum of entries in row n = n! = A000142(n).
T(n,0)=nd(n-1)=A000240(n).
T(n,1)=n(n-1)d(n-2)=A180189(n).
Sum(k*T(n,k), k>=0)=n! = A000142(n) if n>=2.

Examples

			T(3,2) = 3 because we have 123, 312, and 231.
The triangle starts:
1;
0,   2;
3,   0,  3;
8,  12,  0, 4;
45, 40, 30, 0, 5;
		

Crossrefs

Programs

  • Maple
    A180188 := proc (n, k) n*binomial(n-1, k)*A000166(n-1-k) end proc:
    for n to 10 do seq(A180188(n, k), k = 0 .. n-1) end do; # yields sequence in triangular form
  • Mathematica
    T[n_, k_] := n*Binomial[n-1, k]*Subfactorial[n-1-k]; Table[T[n, k], {n, 0, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Feb 19 2017 *)

Formula

T(n,k) = n*C(n-1,k)*d(n-1-k), where d(j) = A000166(j) are the derangement numbers (see Prop. 1 of the Tanny reference).
T(n,k) = n*A008290(n-1,k), 0<=k=1. - R. J. Mathar, Sep 08 2013

A182437 a(0)=0, a(n) = (a(n-1) XOR n) * (n+1).

Original entry on oeis.org

0, 2, 0, 12, 40, 270, 1848, 14840, 133488, 1334970, 14684560, 176214852, 2290793128, 32071103750, 481066556280, 7697064900464, 130850103307616, 2355301859537394, 44750735331210144, 895014706624203260, 18795308839108268040, 413496794460381897342
Offset: 0

Views

Author

Alex Ratushnyak, Apr 28 2012

Keywords

Comments

for n<12, a(n)=A180189(n).

Crossrefs

Programs

  • Mathematica
    nxt[{n_,a_}]:={n+1,BitXor[a,n+1](n+2)}; NestList[nxt,{0,0},30][[All,2]] (* Harvey P. Dale, Nov 01 2017 *)
  • Python
    a=0
    for i in range(1,55):
      print(a, end=', ')
      a ^= i
      a *= i+1

Formula

a(0)=0, for n>0, a(n) = (a(n-1) XOR n) * (n+1).

A348311 a(n) = n! * Sum_{k=1..n} (-1)^k * (k-2) / (k-1)!.

Original entry on oeis.org

0, 1, 2, 3, 20, 85, 534, 3703, 29672, 266985, 2669930, 29369131, 352429692, 4581585853, 64142202110, 962133031455, 15394128503504, 261700184559313, 4710603322067922, 89501463119290195, 1790029262385804260, 37590614510101889061, 826993519222241559782
Offset: 0

Views

Author

Ilya Gutkovskiy, Oct 11 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[n! Sum[(-1)^k (k - 2)/(k - 1)!, {k, 1, n}], {n, 0, 22}]
    nmax = 22; CoefficientList[Series[x (1 + x) Exp[-x]/(1 - x), {x, 0, nmax}], x] Range[0, nmax]!
  • PARI
    a(n) = n!*sum(k=1, n, (-1)^k * (k-2) / (k-1)!); \\ Michel Marcus, Oct 20 2021

Formula

E.g.f.: x * (1 + x) * exp(-x) / (1 - x).
a(0) = 0; a(n) = n * (a(n-1) + (-1)^n * (n-2)).
a(n) = n * (2 * A000166(n-1) + (-1)^n).
Showing 1-4 of 4 results.