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

A005420 Largest prime factor of 2^n - 1.

Original entry on oeis.org

3, 7, 5, 31, 7, 127, 17, 73, 31, 89, 13, 8191, 127, 151, 257, 131071, 73, 524287, 41, 337, 683, 178481, 241, 1801, 8191, 262657, 127, 2089, 331, 2147483647, 65537, 599479, 131071, 122921, 109, 616318177, 524287, 121369, 61681, 164511353, 5419
Offset: 2

Views

Author

Keywords

Examples

			2^6 - 1 = 63 = 3*21 = 9*7, so a(6) = 7.
		

References

  • J. Brillhart et al., Factorizations of b^n +- 1. Contemporary Mathematics, Vol. 22, Amer. Math. Soc., Providence, RI, 2nd edition, 1985; and later supplements.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. similar sequences listed in A274906.
Cf. A337431 (a(n)=a(2n)), A359063 (a(n)=a(2n)=a(4n)), A359088.

Programs

  • Magma
    [Maximum(PrimeDivisors(2^n-1)): n in [2..45]]; // Vincenzo Librandi, Jul 13 2016
  • Mathematica
    a[n_] := a[n] = FactorInteger[2^n-1] // Last // First; Table[Print[{n, a[n]}, If[2^n-1 == a[n], " Mersenne prime", " "]]; a[n], {n, 2, 127}] (* Jean-François Alcover, Dec 11 2012 *)
    Table[FactorInteger[2^n - 1][[-1, 1]], {n, 2, 40}] (* Vincenzo Librandi, Jul 13 2016 *)
  • PARI
    for(n=2,44, v=factor(2^n-1)[,1]; print1(v[#v]", "));
    
  • PARI
    a(n) = vecmax(factor(2^n-1)[,1]); \\ Michel Marcus, Dec 15 2022
    

Formula

a(n) = a(2n) iff a(n) > A002587(n). See A337431. - Thomas Ordowski, Jan 07 2014
a(n) = A006530(A000225(n)). - Vincenzo Librandi, Jul 13 2016
a(n) = 2^n-1 = A000225(n) iff n is a Mersenne exponent (A000043). - Bernard Schott, Dec 11 2022

Extensions

Description corrected by Michael Somos, Feb 24 2002
More terms from Rick L. Shepherd, Aug 22 2002
Incorrect comments removed by Michel Marcus, Dec 15 2022

A272363 Number of ways to group the first 2*n natural numbers into n pairs (xi,yi) with yi>xi, and such that the 2*n numbers xi+yi and xi-yi are all different.

Original entry on oeis.org

1, 1, 0, 2, 12, 64, 220, 1886, 16346, 142420, 1302106, 14467384, 177079358
Offset: 0

Views

Author

Michel Marcus, Apr 27 2016

Keywords

Examples

			For n=3, ((1,5), (2,3), (4,6)) is an instance of such grouping. ((2,3), (1,5), (4,6)) is considered to be the same grouping. The other one is ((1,3), (2,6), (4,5)). So a(3) = 2.
		

Crossrefs

Programs

  • PARI
    okperm(vp, n) = {for (k=1, n-1, if (vp[k] > vp[k+1], return (0));); for (k=1, n, if (vp[k+n] <= vp[k], return (0));); 1;}
    a(n) = {nb = 0; nn = 2*n; for (j=0, nn!-1, vp = numtoperm(nn, j); if (okperm(vp, n), vs = vector(n, k, vp[k]+vp[k+n]); vd = vector(n, k, vp[k]-vp[k+n]); if (#vs + #vd == #Set(concat(vs, vd)), nb++););); nb;}
    
  • Python
    from sympy.utilities.iterables import multiset_partitions
    def A272363(n):
        return 1 if n == 0 else sum(1 for p in multiset_partitions(list(range(1,2*n+1)),n) if max(len(d) for d in p) == 2 and len(set([sum(d) for d in p]))+len(set([abs(d[0]-d[1]) for d in p])) == 2*n) # Chai Wah Wu, Oct 08 2018

Formula

a(n) >= A002968(n). - Altug Alkan, Oct 05 2018
a(n) <= A060963(n). - Chai Wah Wu, Oct 08 2018

Extensions

a(0), a(7)-a(10) from Alois P. Heinz, Oct 05 2018
a(11)-a(12) from Giovanni Resta, Oct 11 2018

A320129 Number of ways to group the first 2*n natural numbers into n pairs (xi, yi) such that the n numbers xi + yi are all different.

Original entry on oeis.org

1, 1, 2, 10, 55, 412, 3736, 40518, 505486, 7145031, 112844566, 1970286922, 37676184205
Offset: 0

Views

Author

Altug Alkan, Oct 06 2018

Keywords

Examples

			For n = 2, a(2) = 2 since {(1,3), (2,4)} and {(1,2), (3,4)} are corresponding sets. {(2,4), (1,3)} and {(3,1), (4,2)} are considered to be the same grouping with {(1,3), (2,4)}.
		

Crossrefs

Programs

  • PARI
    okperm(vp, n) = {for (k=1, n-1, if (vp[k] > vp[k+1], return (0)); ); for (k=1, n, if (vp[k+n] <= vp[k], return (0)); ); 1; }
    a(n) = if(n==0, 1, {nb = 0; nn = 2*n; for (j=0, nn!-1, vp = numtoperm(nn, j); if (okperm(vp, n), vs = vector(n, k, vp[k]+vp[k+n]); if (#vs == #Set(concat(vs)), nb++); ); ); nb; } ) \\ after Michel Marcus at A272363
    
  • Python
    from sympy.utilities.iterables import multiset_partitions
    def A320129(n):
        return 1 if n == 0 else sum(1 for p in multiset_partitions(list(range(1,2*n+1)),n) if max(len(d) for d in p) == 2 and len(set(sum(d) for d in p)) == n) # Chai Wah Wu, Oct 08 2018

Formula

a(n) >= A272363(n).

Extensions

a(11)-a(12) from Giovanni Resta, Oct 09 2018

A007631 Number of solutions to non-attacking reflecting queens problem.

Original entry on oeis.org

1, 1, 0, 0, 2, 4, 0, 2, 10, 32, 38, 140, 496, 1186, 3178, 16792, 82038, 289566, 1139874, 5914118, 33800010, 142337180, 721286448, 4384569864
Offset: 0

Views

Author

Keywords

Comments

a(n) is the number of ways to pair the natural numbers from 1 to n with those between n+1 and 2*n into n pairs (xi,yi) such that the 2*n numbers yi+i and yi-i are all different. - Michel Marcus, Apr 27 2016

Examples

			For n = 4, ((1,7), (2,5), (3,8), (4,6)) is an instance of such grouping. ((2,5), (1,7), (3,8), (4,6)) is considered to be the same grouping.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    a(n) = {nb = 0; for (j=0, n!-1, vp = numtoperm(n, j); vb = vector(n, k, vp[k]+n); vs = vector(n, k, vb[k]+k); vd = vector(n, k, vb[k]-k); if (#vs + #vd == #Set(concat(vs, vd)), nb++); ); nb; } \\ Michel Marcus,  Apr 27 2016

Extensions

a(18)-a(21) from Sean A. Irvine, Jan 13 2018
a(0)-a(3) prepended by Michel Marcus, Oct 03 2018
a(22) from Sean A. Irvine, Oct 04 2018
a(23) from Sean A. Irvine, Oct 07 2018

A320168 Number of ways to group the first 2*n positive integers into n pairs (xi, yi) with xi < yi, and such that the n numbers (yi mod xi) are all different.

Original entry on oeis.org

1, 1, 2, 2, 7, 12, 22, 26, 85, 226, 717, 1695, 5071, 14275, 47405, 176747, 638329, 2166516
Offset: 0

Views

Author

Altug Alkan, Oct 07 2018

Keywords

Comments

How does a(n+1)/a(n) behave as n increases?

Examples

			a(3) = 2 because {(1,3), (2,5), (4,6)} and {(1,5), (2,3), (4,6)} are corresponding sets.
a(4) = 7 because {(1,6), (2,5), (3,8), (4,7)}, {(1,3), (2,7), (4,6), (5,8)}, {(1,7), (2,3), (4,6), (5,8)}, {(1,3), (2,5), (4,7), (6,8)}, {(1,5), (2,3), (4,7), (6,8)}, {(1,2), (3,7), (4,6), (5,8)}, {(1,2), (3,8), (4,7), (5,6)} are corresponding sets.
		

Crossrefs

Extensions

a(13)-a(17) from Rémy Sigrist, Oct 07 2018
Showing 1-5 of 5 results.