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
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)
-
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);
-
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 *)
-
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
-
# 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:
-
@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
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
-
a := proc(n) local i; add(binomial(n,i)/Beta(i+1,i+1), i=0..n) end:
-
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 *)
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
- I. Vardi, Computational Recreations in Mathematica, 1991, p. 66.
-
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:
WS := proc(f,r,n) select(p->(f(p-1)+r(p)) mod p = 0,[$2..n]);
select(q -> not isprime(q),%) end:
A163209 := n -> WS(swing,p->(-1)^iquo(p+2,2),n);
-
v(n,p)=my(s); n*=2; while(n\=p, s+=n%2); s
is(n)=if(n%2==0,return(0)); my(m=Mod(1,n),a=n\2); fordiv(n,d,if(isprime(d) && v(a,d), return(0))); forprime(p=2,a, m*=p^v(a,p)); forprime(p=a+1,n,m*=p); m==(-1)^a
forcomposite(n=4,2e7, if(is(n), print1(n", "))) \\ Charles R Greathouse IV, Mar 06 2015
-
# Reasonable for isolated values, slow for the sequence:
use ntheory ":all";
sub is { my $m = ($[0]-1)>>1; (binomial($m<<1,$m) % $[0]) == (($m&1) ? $_[0]-1 : 1); }
foroddcomposites { say if is($) } 2e7; # _Dana Jacobsen, May 03 2015
-
# Much faster for sequential testing:
use Math::GMPz; use ntheory ":all"; { my($c,$l)=(Math::GMPz->new(1),1); sub catalan { while ($[0] > $l) { $l++; $c *= 4*$l-2; Math::GMPz::Rmpz_divexact_ui($c,$c,$l+1); } $c; } } my $m; foroddcomposites { $m = ($-1)>>1; say if (catalan($m) % $) == (($m&1) ? $-2 : 2); } 2e7; # Dana Jacobsen, May 03 2015
a(1) = 5907 = 3*11*179 was found by S. Skiena
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
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)
-
For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
a := n -> DiffTria(k->swing(2*k),n,true);
-
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
3$ + 1 = 7 is prime, so 7 is in the sequence. (Here '$' denotes the swinging factorial function.)
-
# 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:
-
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 *)
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
Since 3$ = 4$ = 6 the prime 7 is listed, however only once.
-
a := proc(n) select(isprime, map(x -> A056040(x)+1,[$1..n])) end:
-
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 *)
A163212
Wilson quotients (A007619) which are primes.
Original entry on oeis.org
5, 103, 329891, 10513391193507374500051862069
Offset: 1
The quotient (720+1)/7 = 103 is a Wilson quotient and a prime, so 103 is a member.
- Peter Luschny, Die schwingende Fakultät und Orbitalsysteme, August 2011.
- Peter Luschny, Swinging Primes.
- Jonathan Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, in Proceedings of CANT 2011, arXiv:1110.3113 [math.NT], 2011-2012.
- Jonathan Sondow, Lerch Quotients, Lerch Primes, Fermat-Wilson Quotients, and the Wieferich-non-Wilson Primes 2, 3, 14771, Combinatorial and Additive Number Theory, CANT 2011 and 2012, Springer Proc. in Math. & Stat., vol. 101 (2014), pp. 243-255.
-
# WQ defined in A163210.
A163212 := n -> select(isprime,WQ(factorial,p->1,n)):
-
Select[Table[p = Prime[n]; ((p-1)!+1)/p, {n, 1, 15}], PrimeQ] (* Jean-François Alcover, Jun 28 2013 *)
-
forprime(p=2, 1e4, a=((p-1)!+1)/p; if(ispseudoprime(a), print1(a, ", "))) \\ Felix Fröhlich, Aug 03 2014
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
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;
-
For the functions 'DiffTria' and 'swing' see A163770. Computes n rows of the triangle.
a := n -> DiffTria(k->swing(2*k+1),n,true);
-
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 *)
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
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;
-
# Computes n rows of the triangle. For the functions 'SumTria' and 'swing' see A163840.
a := n -> SumTria(k->swing(2*k+1),n,true);
-
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 *)
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
-
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
-
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 *)
Comments