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-20 of 48 results. Next

A163590 Odd part of the swinging factorial A056040.

Original entry on oeis.org

1, 1, 1, 3, 3, 15, 5, 35, 35, 315, 63, 693, 231, 3003, 429, 6435, 6435, 109395, 12155, 230945, 46189, 969969, 88179, 2028117, 676039, 16900975, 1300075, 35102025, 5014575, 145422675, 9694845, 300540195, 300540195, 9917826435, 583401555, 20419054425, 2268783825
Offset: 0

Views

Author

Peter Luschny, Aug 01 2009

Keywords

Comments

Let n$ denote the swinging factorial. a(n) = n$ / 2^sigma(n) where sigma(n) is the exponent of 2 in the prime-factorization of n$. sigma(n) can be computed as the number of '1's in the base 2 representation of floor(n/2).
If n is even then a(n) is the numerator of the reduced ratio (n-1)!!/n!! = A001147(n-1)/A000165(n), and if n is odd then a(n) is the numerator of the reduced ratio n!!/(n-1)!! = A001147(n)/A000165(n-1). The denominators for each ratio should be compared to A060818. Here all ratios are reduced. - Anthony Hernandez, Feb 05 2020 [See the Mathematica program for a more compact form of the formula. Peter Luschny, Mar 01 2020 ]

Examples

			11$ = 2772 = 2^2*3^2*7*11. Therefore a(11) = 3^2*7*11 = 2772/4 = 693.
From _Anthony Hernandez_, Feb 04 2019: (Start)
a(7) = numerator((1*3*5*7)/(2*4*6)) = 35;
a(8) = numerator((1*3*5*7)/(2*4*6*8)) = 35;
a(9) = numerator((1*3*5*7*9)/(2*4*6*8)) = 315;
a(10) = numerator((1*3*5*7*9)/(2*4*6*8*10)) = 63. (End)
		

Crossrefs

Programs

  • Maple
    swing := proc(n) option remember; if n = 0 then 1 elif irem(n, 2) = 1 then swing(n-1)*n else 4*swing(n-1)/n fi end:
    sigma := n -> 2^(add(i,i= convert(iquo(n,2),base,2))):
    a := n -> swing(n)/sigma(n);
  • Mathematica
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/ f!]; a[n_] := With[{s = sf[n]}, s/2^IntegerExponent[s, 2]]; Table[a[n], {n, 0, 31}] (* Jean-François Alcover, Jul 26 2013 *)
    r[n_] := (n - Mod[n - 1, 2])!! /(n - 1 + Mod[n - 1, 2])!! ;
    Table[r[n], {n, 0, 36}] // Numerator (* Peter Luschny, Mar 01 2020 *)
  • PARI
    A163590(n) = {
        my(a = vector(n+1)); a[1] = 1;
        for(n = 1, n,
            a[n+1] = a[n]*n^((-1)^(n+1))*2^valuation(n, 2));
    a } \\ Peter Luschny, Sep 29 2019
  • Sage
    # uses[A000120]
    @CachedFunction
    def swing(n):
        if n == 0: return 1
        return swing(n-1)*n if is_odd(n) else 4*swing(n-1)/n
    A163590 = lambda n: swing(n)/2^A000120(n//2)
    [A163590(n) for n in (0..31)]  # Peter Luschny, Nov 19 2012
    # Alternatively:
    
  • Sage
    @cached_function
    def A163590(n):
        if n == 0: return 1
        return A163590(n - 1) * n^((-1)^(n + 1)) * 2^valuation(n, 2)
    print([A163590(n) for n in (0..31)]) # Peter Luschny, Sep 29 2019
    

Formula

a(2*n) = A001790(n).
a(2*n+1) = A001803(n).
a(n) = a(n-1)*n^((-1)^(n+1))*2^valuation(n, 2) for n > 0. - Peter Luschny, Sep 29 2019

A163869 Binomial transform of the beta numbers 1/beta(n+1,n+1) (A002457).

Original entry on oeis.org

1, 7, 43, 249, 1395, 7653, 41381, 221399, 1175027, 6196725, 32512401, 169863147, 884318973, 4589954619, 23761814955, 122735222505, 632698778835, 3255832730565, 16728131746145, 85826852897675, 439793834236745, 2251006269442815, 11509340056410735, 58790764269668805
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Comments

Also a(n) = Sum_{i=0..n} binomial(n,n-i) (2*i+1)$ where i$ denotes the swinging factorial of i (A056040).

Crossrefs

Programs

  • Maple
    a := proc(n) local i; add(binomial(n,i)/Beta(i+1,i+1), i=0..n) end:
  • Mathematica
    CoefficientList[Series[-Sqrt[x-1]/(5*x-1)^(3/2), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 21 2012 *)
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Sum[ Binomial[n, n-i]*sf[2*i+1], {i, 0, n}]; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Jul 26 2013 *)
    Table[Hypergeometric2F1[3/2, -n, 1, -4], {n, 0, 20}] (* Vladimir Reshetnikov, Apr 25 2016 *)

Formula

From Vaclav Kotesovec, Oct 21 2012: (Start)
G.f.: -sqrt(x-1)/(5*x-1)^(3/2).
Recurrence: n*a(n) = (6*n+1)*a(n-1) - 5*(n-1)*a(n-2).
a(n) ~ 4*5^(n-1/2)*sqrt(n)/sqrt(Pi).
(End)
a(n) = hypergeom([3/2, -n], [1], -4) = hypergeom([3/2, n+1], [1], 4/5)/(5*sqrt(5)). - Vladimir Reshetnikov, Apr 25 2016
E.g.f.: exp(3*x) * ((1 + 4*x) * BesselI(0,2*x) + 4 * x * BesselI(1,2*x)). - Ilya Gutkovskiy, Nov 19 2021
From Seiichi Manyama, Aug 22 2025: (Start)
a(n) = (1/4)^n * Sum_{k=0..n} 5^k * (2*k+1) * binomial(2*k,k) * binomial(2*(n-k),n-k)/(1-2*(n-k)).
a(n) = Sum_{k=0..n} (2*k+1) * binomial(2*k,k) * binomial(n,n-k).
a(n) = Sum_{k=0..n} (-1)^k * 5^(n-k) * binomial(2*k,k)/(1-2*k) * binomial(n,n-k). (End)

A163209 Catalan pseudoprimes: odd composite integers n=2*m+1 satisfying A000108(m) == (-1)^m * 2 (mod n).

Original entry on oeis.org

5907, 1194649, 12327121
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

Also, Wilson spoilers: composite n which divide A056040(n-1) - (-1)^floor(n/2). For the factorial function, a Wilson spoiler is a composite n that divides (n-1)! + (-1). Lagrange proved that no such n exists. For the swinging factorial (A056040), the situation is different.
Also, composite odd integers n=2*m+1 such that A000984(m) == (-1)^m (mod n).
Contains squares of A001220. In particular, a(2) = A001220(1)^2 = 1093^2 = 1194649 = A001567(274) and a(3) = A001220(2)^2 = 3511^2 = 12327121 = A001567(824).
See the Vardi reference for a binomial setup.
Aebi and Cairns 2008, page 9: a(4) either has more than 2 factors or is > 10^10. - Dana Jacobsen, May 27 2015
a(4) > 10^10. - Dana Jacobsen, Mar 03 2018

References

  • I. Vardi, Computational Recreations in Mathematica, 1991, p. 66.

Programs

Extensions

a(1) = 5907 = 3*11*179 was found by S. Skiena
Typo corrected Peter Luschny, Jul 25 2009
Edited by Max Alekseyev, Jun 22 2012

A163771 Triangle interpolating the swinging factorial (A056040) restricted to even indices with its binomial inverse. Same as interpolating the central trinomial coefficients (A002426) with the central binomial coefficients (A000984).

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 7, 10, 14, 20, 19, 26, 36, 50, 70, 51, 70, 96, 132, 182, 252, 141, 192, 262, 358, 490, 672, 924, 393, 534, 726, 988, 1346, 1836, 2508, 3432, 1107, 1500, 2034, 2760, 3748, 5094, 6930, 9438, 12870
Offset: 0

Views

Author

Peter Luschny, Aug 05 2009

Keywords

Comments

Triangle read by rows. For n >= 0, k >= 0 let T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*(2i)$ where i$ denotes the swinging factorial of i (A056040).
This is also the square array of central binomial coefficients A000984 in column 0 and higher (first: A051924, second, etc.) differences in subsequent columns, read by antidiagonals. - M. F. Hasler, Nov 15 2019

Examples

			Triangle begins
    1;
    1,   2;
    3,   4,   6;
    7,  10,  14,  20;
   19,  26,  36,  50,  70;
   51,  70,  96, 132, 182, 252;
  141, 192, 262, 358, 490, 672, 924;
From _M. F. Hasler_, Nov 15 2019: (Start)
The square array having central binomial coefficients A000984 in column 0 and higher differences in subsequent columns (col. 1 = A051924) starts:
     1   1    3    7    19    51 ...
     2   4   10   26    70   192 ...
     6  14   36   96   262   726 ...
    20  50  132  358   988  2760 ...
    70 182  490 1346  3748 10540 ...
   252 672 1836 5094 14288 40404 ...
  (...)
Read by falling antidiagonals this yields the same sequence. (End)
		

Crossrefs

Programs

  • Maple
    For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
    a := n -> DiffTria(k->swing(2*k),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[(-1)^(n - i)*Binomial[n - k, n - i]*sf[2*i], {i, k, n}]; Table[t[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

A163074 Swinging primes: primes which are within 1 of a swinging factorial (A056040).

Original entry on oeis.org

2, 3, 5, 7, 19, 29, 31, 71, 139, 251, 631, 3433, 12011, 48619, 51479, 51481, 2704157, 155117519, 280816201, 4808643121, 35345263801, 81676217699, 1378465288199, 2104098963721, 5651707681619, 94684453367401, 386971244197199, 1580132580471899, 1580132580471901
Offset: 1

Views

Author

Peter Luschny, Jul 21 2009

Keywords

Comments

Union of A163075 and A163076.

Examples

			3$ + 1 = 7 is prime, so 7 is in the sequence. (Here '$' denotes the swinging factorial function.)
		

Crossrefs

Programs

  • Maple
    # Seq with arguments <= n:
    a := proc(n) select(isprime,map(x -> A056040(x)+1,[$1..n]));
    select(isprime,map(x -> A056040(x)-1,[$1..n]));
    sort(convert(convert(%%,set) union convert(%,set),list)) end:
  • Mathematica
    Reap[Do[f = n!/Quotient[n, 2]!^2; If[PrimeQ[p = f - 1], Sow[p]]; If[PrimeQ[p = f + 1], Sow[p]], {n, 1, 45}]][[2, 1]] // Union (* Jean-François Alcover, Jun 28 2013 *)

Extensions

More terms from Jinyuan Wang, Mar 22 2020

A163075 Primes of the form k$ + 1. Here '$' denotes the swinging factorial function (A056040).

Original entry on oeis.org

2, 3, 7, 31, 71, 631, 3433, 51481, 2704157, 280816201, 4808643121, 35345263801, 2104098963721, 94684453367401, 1580132580471901, 483701705079089804581, 6892620648693261354601, 410795449442059149332177041, 2522283613639104833370312431401
Offset: 1

Views

Author

Peter Luschny, Jul 21 2009

Keywords

Examples

			Since 3$ = 4$ = 6 the prime 7 is listed, however only once.
		

Crossrefs

Cf. A056040, A088332, A163077 (arguments k), A163074, A163076.

Programs

  • Maple
    a := proc(n) select(isprime, map(x -> A056040(x)+1,[$1..n])) end:
  • Mathematica
    Reap[Do[f = n!/Quotient[n, 2]!^2; If[PrimeQ[p = f + 1], Sow[p]], {n, 1, 70}]][[2, 1]] // Union (* Jean-François Alcover, Jun 28 2013 *)

Extensions

More terms from Jinyuan Wang, Mar 22 2020

A163212 Wilson quotients (A007619) which are primes.

Original entry on oeis.org

5, 103, 329891, 10513391193507374500051862069
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

a(5) = A007619(137), a(6) = A007619(216), a(7) = A007619(381).
Same as A122696 without its initial term 2. - Jonathan Sondow, May 19 2013

Examples

			The quotient (720+1)/7 = 103 is a Wilson quotient and a prime, so 103 is a member.
		

Crossrefs

Programs

  • Maple
    # WQ defined in A163210.
    A163212 := n -> select(isprime,WQ(factorial,p->1,n)):
  • Mathematica
    Select[Table[p = Prime[n]; ((p-1)!+1)/p, {n, 1, 15}], PrimeQ] (* Jean-François Alcover, Jun 28 2013 *)
  • PARI
    forprime(p=2, 1e4, a=((p-1)!+1)/p; if(ispseudoprime(a), print1(a, ", "))) \\ Felix Fröhlich, Aug 03 2014

Formula

a(n) = A122696(n+1) = A007619(A225906(n)) = ((A050299(n+1)-1)!+1)/A050299(n+1). - Jonathan Sondow, May 19 2013

A163772 Triangle interpolating the swinging factorial (A056040) restricted to odd indices with its binomial inverse. Triangle read by rows. For n >= 0, k >= 0.

Original entry on oeis.org

1, 5, 6, 19, 24, 30, 67, 86, 110, 140, 227, 294, 380, 490, 630, 751, 978, 1272, 1652, 2142, 2772, 2445, 3196, 4174, 5446, 7098, 9240, 12012, 7869, 10314, 13510, 17684, 23130, 30228, 39468, 51480
Offset: 0

Views

Author

Peter Luschny, Aug 05 2009

Keywords

Examples

			Triangle begins:
     1;
     5,    6;
    19,   24,   30;
    67,   86,  110,  140;
   227,  294,  380,  490,  630;
   751,  978, 1272, 1652, 2142, 2772;
  2445, 3196, 4174, 5446, 7098, 9240, 12012;
		

Crossrefs

Programs

  • Maple
    For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
    a := n -> DiffTria(k->swing(2*k+1),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[ (-1)^(n-i)*Binomial[n-k, n-i]*sf[2*i+1], {i, k, n}]; Table[t[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} (-1)^(n-i)*binomial(n-k,n-i)*(2i+1)$ where i$ denotes the swinging factorial of i (A056040).

A163842 Triangle interpolating the swinging factorial (A056040) restricted to odd indices with its binomial transform. Same as interpolating the beta numbers 1/beta(n,n) (A002457) with (A163869). Triangle read by rows, for n >= 0, k >= 0.

Original entry on oeis.org

1, 7, 6, 43, 36, 30, 249, 206, 170, 140, 1395, 1146, 940, 770, 630, 7653, 6258, 5112, 4172, 3402, 2772, 41381, 33728, 27470, 22358, 18186, 14784, 12012, 221399, 180018, 146290, 118820, 96462, 78276, 63492, 51480
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Examples

			Triangle begins:
      1;
      7,     6;
     43,    36,    30;
    249,   206,   170,   140;
   1395,  1146,   940,   770,   630;
   7653,  6258,  5112,  4172,  3402,  2772;
  41381, 33728, 27470, 22358, 18186, 14784, 12012;
		

Crossrefs

Programs

  • Maple
    # Computes n rows of the triangle. For the functions 'SumTria' and 'swing' see A163840.
    a := n -> SumTria(k->swing(2*k+1),n,true);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; t[n_, k_] := Sum[Binomial[n-k, n-i]*sf[2*i+1], {i, k, n}]; Table[t[n, k], {n, 0, 7}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 28 2013 *)

Formula

T(n,k) = Sum_{i=k..n} binomial(n-k,n-i)*(2i+1)$ where i$ denotes the swinging factorial of i (A056040).

A163872 Inverse binomial transform of the beta numbers 1/beta(n+1,n+1) (A002457).

Original entry on oeis.org

1, 5, 19, 67, 227, 751, 2445, 7869, 25107, 79567, 250793, 786985, 2460397, 7667921, 23832931, 73902627, 228692115, 706407903, 2178511449, 6708684009, 20632428249, 63380014845, 194486530791, 596213956023, 1826103432573, 5588435470401, 17089296473655
Offset: 0

Views

Author

Peter Luschny, Aug 06 2009

Keywords

Comments

Also a(n) = sum {i=0..n} (-1)^(n-i) binomial(n,n-i) (2*i+1)$ where i$ denotes the swinging factorial of i (A056040).

Crossrefs

Cf. A163772.

Programs

  • Maple
    a := proc(n) local i; add((-1)^(n-i)*binomial(n,i)/Beta(i+1,i+1),i=0..n) end:
    seq(simplify((-1)^n*hypergeom([-n,3/2], [1], 4)),n=0..26); # Peter Luschny, Apr 26 2016
  • Mathematica
    CoefficientList[Series[Sqrt[x+1]/(1-3*x)^(3/2), {x, 0, 20}], x] (* Vaclav Kotesovec, Oct 21 2012 *)
    sf[n_] := With[{f = Floor[n/2]}, Pochhammer[f+1, n-f]/f!]; a[n_] := Sum[(-1)^(n-i)*Binomial[n, n-i]*sf[2*i+1], {i, 0, n}]; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Jul 26 2013 *)

Formula

O.g.f.: A(x)=1/(1-x*M(x))^3, M(x) - o.g.f. of A001006. a(n) = sum(k^3/n *sum(C(n,j)*C(j,2*j-n-k), j=0..n), k=1..n). - Vladimir Kruchinin, Sep 06 2010
Recurrence: n*a(n) = (2*n+3)*a(n-1) + 3*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 21 2012
a(n) ~ 4*3^(n-1/2)*sqrt(n)/sqrt(Pi). - Vaclav Kotesovec, Oct 21 2012
a(n) = (-1)^n*hypergeom([-n,3/2], [1], 4). - Peter Luschny, Apr 26 2016
From Seiichi Manyama, Aug 22 2025: (Start)
a(n) = (-1/4)^n * Sum_{k=0..n} (-3)^k * (2*k+1) * binomial(2*k,k) * binomial(2*(n-k),n-k)/(1-2*(n-k)).
a(n) = Sum_{k=0..n} (-1)^(n-k) * (2*k+1) * binomial(2*k,k) * binomial(n,n-k).
a(n) = Sum_{k=0..n} (-1)^k * 3^(n-k) * binomial(2*k,k)/(1-2*k) * binomial(n,n-k). (End)
Previous Showing 11-20 of 48 results. Next