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

A163211 Swinging Wilson quotients (A163210) which are primes.

Original entry on oeis.org

3, 23, 71, 757, 30671, 1383331, 245273927, 3362110459, 107752663194272623, 5117886516250502670227, 34633371587745726679416744736000996167729085703, 114326045625240879227044995173712991937709388241980425799
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

a(14)-a(18) certified prime by Primo 4.2.0. a(17) = A163210(569) = P1239, a(18) = A163210(787) = P1812. - Charles R Greathouse IV, Dec 11 2016

Examples

			The quotient (252+1)/11 = 23 is a swinging Wilson quotient and a prime, so 23 is a member.
		

Crossrefs

Programs

  • Maple
    A163211 := n -> select(isprime,A163210(n));
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; a[n_] := (p = Prime[n]; (sf[p - 1] + (-1)^Floor[(p + 2)/2])/p); Select[PrimeQ][Table[a[n], {n, 1, 100}]] (* G. C. Greubel, Dec 10 2016 *)
  • PARI
    sf(n)=n!/(n\2)!^2
    forprime(p=2,1e3, t=sf(p-1)\/p; if(isprime(t), print1(t", "))) \\ Charles R Greathouse IV, Dec 11 2016

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

A178904 This should be related to the Coxeter transformations of the posets of partitions in rectangular boxes of size m times n.

Original entry on oeis.org

1, -1, -1, 0, -1, 0, 0, 1, 1, 0, 0, -1, 1, -1, 0, 0, 1, -1, -1, 1, 0, 0, -1, 2, -3, 2, -1, 0, 0, 1, -3, 4, 4, -3, 1, 0, 0, -1, 3, -6, 8, -6, 3, -1, 0, 0, 1, -3, 9, -13, -13, 9, -3, 1, 0, 0, -1, 4, -11, 19, -23, 19, -11, 4, -1, 0, 0, 1, -5, 13, -27, 39, 39, -27, 13, -5, 1, 0, 0, -1, 5, -17, 38, -61, 71, -61, 38, -17, 5, -1, 0
Offset: 0

Views

Author

F. Chapoton, Jun 22 2010

Keywords

Comments

This table is symmetric: a(m,n)=a(n,m) for all m,n>=0.

Examples

			a(0,0) = 1, a(1,0) = a(0,1) = -1.
Triangle begins:
   1;
  -1, -1;
   0, -1,  0;
   0,  1,  1,  0;
   0, -1,  1, -1,  0;
   0,  1, -1, -1,  1,  0;
   0, -1,  2, -3,  2, -1, 0;
   ...
		

Crossrefs

Programs

  • Mathematica
    b[m_, n_] := (-1)^Max[m, n]*Binomial[m+n, n]; A[m_, n_] := DivisorSum[ n+m+1, b[Floor[m/#], Floor[n/#]]*MoebiusMu[#]&]/(m+n+1); Table[A[m-n, n], {m, 0, 12}, {n, 0, m}] // Flatten (* Jean-François Alcover, Feb 23 2017, adapted from Python *)
  • Sage
    def twisted_binomial(m, n):
        return (-1)**max(m, n) * binomial(m + n, n)
    def coefficients_A(m, n):
        return sum(twisted_binomial(m // d, n // d) * moebius(d)
               for d in divisors(m + n + 1)) / (m + n + 1)
    matrix(ZZ, 8, 8, coefficients_A)

Extensions

Terms a(82) onward added by G. C. Greubel, Dec 10 2017

A163213 Swinging Wilson remainders ((p-1)$ + (-1)^floor((p+2)/2))/p mod p, p prime. Here '$' denotes the swinging factorial function (A056040).

Original entry on oeis.org

1, 1, 1, 3, 1, 6, 9, 13, 12, 2, 19, 2, 5, 36, 6, 19, 43, 11, 47, 67, 39, 41, 70, 12, 17, 83, 88, 81, 25, 53, 91, 97, 106, 79, 43, 39, 7, 29, 73, 6, 79, 115
Offset: 1

Views

Author

Peter Luschny, Jul 24 2009

Keywords

Comments

If this is zero, p is a swinging Wilson prime.

Examples

			The swinging Wilson quotient related to the 5th prime is (252+1)/11=23, so the 5th term is 23 mod 11 = 1.
		

Crossrefs

Programs

  • Maple
    WR := proc(f,r,n) map(p->(f(p-1)+r(p))/p mod p,select(isprime,[$1..n])) end:
    A002068 := n -> WR(factorial,p->1,n);
    A163213 := n -> WR(swing,p->(-1)^iquo(p+2,2),n);
  • Mathematica
    sf[n_] := n!/Quotient[n, 2]!^2; a[n_] := (p = Prime[n]; Mod[(sf[p - 1] + (-1)^Floor[(p + 2)/2])/p, p]); Table[a[n], {n, 1, 42}] (* Jean-François Alcover, Jun 28 2013 *)
  • PARI
    sf(n)=n!/(n\2)!^2
    apply(p->sf(p-1)\/p%p, primes(100)) \\ Charles R Greathouse IV, Dec 11 2016

A178749 n*a(n) provides the Moebius transform of signed central binomial coefficients.

Original entry on oeis.org

1, -1, -1, 1, 1, -1, -3, 4, 8, -13, -23, 39, 71, -121, -229, 400, 757, -1354, -2559, 4625, 8799, -16021, -30671, 56316, 108166, -200047, -385210, 716429, 1383331, -2585173, -5003791, 9391680, 18214565, -34318117, -66674463, 126044208, 245273927, -465067981
Offset: 1

Views

Author

F. Chapoton, Jun 09 2010

Keywords

Comments

This should be related to the Coxeter transformation for the Tamari lattices.
The source sequence is 1, -1, -2, 3, 6, -10, -20, 35, 70, -126, ... (A001405). Its Mobius transform is 1, -2, -3, 4, 5, -6, -21, 32, 72, -130, -253, 468, 923, ... and division of each term through n generates a(n). - R. J. Mathar, Jul 23 2012

Examples

			G.f. = x - x^2 - x^3 + x^4 + x^5 - x^6 - 3*x^7 + 4*x^8 + 8*x^9 - 13*x^10 + ...
		

Crossrefs

Similar to A022553, A131868 and A178738.
Also related to A163210.

Programs

  • Maple
    with(numtheory):
    a:= n-> add(mobius(n/d)*[1$2, -1$2][1+irem(d, 4)]*
            binomial(d-1, iquo(d-1, 2)), d=divisors(n))/n:
    seq(a(n), n=1..50);  # Alois P. Heinz, Apr 05 2013
  • Mathematica
    a[ n_] := If[ n < 1, 0, DivisorSum[ n, MoebiusMu[ n/#] (-1)^Quotient[ #, 2] Binomial[ # - 1, Quotient[ # - 1, 2]] &] / n]; (* Michael Somos, Sep 14 2015 *)
  • PARI
    {a(n) = if( n<1, 0, sumdiv( n, d, moebius(n/d) * (-1)^(d\2) * binomial(d-1, (d-1)\2)) / n)}; /* Michael Somos, Dec 23 2014 */
  • Sage
    def lam(n):
        return (-1)**binomial(n, 2) * binomial(n - 1, (n - 1) // 2)
    def a(n):
        return sum(moebius(n // d) * lam(d) for d in divisors(n)) // n
    [a(n) for n in range(1, 20)]
    

A286033 a(n) = binomial(2*n-2, n-1) + (-1)^n.

Original entry on oeis.org

0, 3, 5, 21, 69, 253, 923, 3433, 12869, 48621, 184755, 705433, 2704155, 10400601, 40116599, 155117521, 601080389, 2333606221, 9075135299, 35345263801, 137846528819, 538257874441, 2104098963719, 8233430727601, 32247603683099, 126410606437753, 495918532948103
Offset: 1

Views

Author

Peter Luschny, May 13 2017

Keywords

Comments

An odd prime p divides a((p+1)/2) which gives A163210.

Crossrefs

Programs

  • Magma
    [Binomial(2*n-2, n-1) + (-1)^n: n in [1..30]]; // G. C. Greubel, Jul 14 2024
    
  • Maple
    a := n -> binomial(2*n-2, n-1) + (-1)^n: seq(a(n), n=1..27);
  • Mathematica
    a[n_] := Binomial[2n-2, n-1] + (-1)^n; a[Range[1,27]]
  • Maxima
    a(n):=-sum((-1)^k*binomial(2*n,n-k)*(fib(2*k+1)+fib(2*k-1)),k,1,n); /* Vladimir Kruchinin, Jan 18 2025 */
  • PARI
    a(n) = binomial(2*n-2, n-1) + (-1)^n \\ David A. Corneth, May 13 2017
    
  • SageMath
    def A286033(n): return binomial(2*n-2, n-1) + (-1)^n
    [A286033(n) for n in range(1,31)] # G. C. Greubel, Jul 14 2024
    

Formula

a(n) = A000984(n-1) + A033999(n). - David A. Corneth, May 13 2017
G.f.: -1 + x/sqrt(1 - 4*x) + 1/(1 + x). - Ilya Gutkovskiy, May 13 2017
D-finite with recurrence: -(n-1)*a(n) +2*(n-1)*a(n-1) +(7*n-17)*a(n-2) +2*(2*n-7)*a(n-3)=0. - R. J. Mathar, Jan 27 2020
a(n) = Sum_{k=1..n} (-1)^(k-1)*binomial(2*n, n-k)*A000032(2*k). - Vladimir Kruchinin, Jan 18 2025
Showing 1-6 of 6 results.