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 71-80 of 91 results. Next

A078145 Length of period of continued fraction for square root of 1+n!.

Original entry on oeis.org

1, 2, 4, 0, 0, 40, 0, 153, 558, 3074, 4285, 22602, 180544, 766146, 766082, 524570, 9932193, 5193268, 763601450, 4284694240, 3059999982, 48742214702, 6354126960, 1975806716944, 929707144775
Offset: 1

Views

Author

Labos Elemer, Nov 25 2002

Keywords

Examples

			Period for sqrt(3!+1) = sqrt(7) = {1,1,1,4}, a(3) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Last[ContinuedFraction[Sqrt[1+n! ]]]], {n, 1, 14}]

Formula

a(n) = A003285(A038507(n)). - Michel Marcus, Sep 25 2019

Extensions

a(15)-a(20) from Vaclav Kotesovec, Aug 28 2019
a(21) from Chai Wah Wu, Sep 23 2019
a(22)-a(23) from Chai Wah Wu, Sep 25 2019
a(24)-a(25) from Chai Wah Wu, Oct 01 2019

A082995 Distance from n!+1 to next larger square.

Original entry on oeis.org

2, 1, 2, 0, 0, 8, 0, 80, 728, 224, 323, 39168, 82943, 176399, 215295, 3444735, 26167683, 114349224, 255004928, 1158920360, 11638526760, 42128246888, 191052974115, 97216010328, 2430400258224, 1553580508515, 4666092737475
Offset: 1

Views

Author

Jason Earls, May 29 2003

Keywords

Comments

The only known values of n such that n!+1 is a perfect square are 4, 5 and 7. Paul Leyland, et al. have found no other solutions for n <= 1 million (see link). For 1 <= n <= 11, n!+1 is within 1000 of being a square. Is there another n such that n!+1 <= "1000 away" from being a perfect square?

Examples

			a(5)=0 because 5!+1 is a square.
a(8)=80 because 8!+1 = 40321 and the next larger square is 40401, so 40401-40321 = 80.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Ceiling @ Sqrt[(f = n! + 1)]^2 - f; Array[a, 27] (* Amiram Eldar, Dec 14 2019 *)
  • PARI
    for(k=1,27,print1(ceil(sqrt(k!+1))^2-(k!+1),", ")) \\ Hugo Pfoertner, Dec 14 2019

A137244 a(n) = lcm_{k=0..n} (k! + 1).

Original entry on oeis.org

2, 2, 6, 42, 1050, 127050, 13086150, 65967282150, 2659866783570150, 13594579130827036650, 4484729304047661947505150, 179016047168539016473835519025150, 85748973198421705721932588223712809265150, 533960639770963461900374948788827304744234574385150
Offset: 0

Views

Author

Karl Levy, Mar 09 2008

Keywords

Comments

I came upon this sequence in an attempt to solve an open Erdős problem: Show that Sum_{k>=0} 1/(k!+1) is rational/irrational/transcendental.

Crossrefs

Programs

  • Mathematica
    With[{t=Range[0,20]!+1},Table[LCM@@Take[t,n],{n,Length[t]}]] (* Harvey P. Dale, Dec 21 2015 *)
  • PARI
    a(n) = {lc = 1; for (k=0, n, lc = lcm(lc, k!+1);); return (lc);} \\ Michel Marcus, Jul 25 2013

Formula

a(n) = lcm_{k=0..n} (k! + 1).

Extensions

More terms from Harvey P. Dale, Dec 21 2015

A166862 Primes p that divide n! + 1 for some n other than p-1.

Original entry on oeis.org

2, 7, 11, 19, 23, 29, 43, 47, 59, 61, 67, 71, 79, 83, 103, 109, 127, 131, 137, 139, 149, 163, 179, 191, 193, 199, 227, 233, 239, 251, 257, 263, 269, 271, 277, 293, 307, 311, 317, 347, 359, 367, 379, 383, 389, 397, 401, 419, 431, 443, 449, 461, 463, 467, 479
Offset: 1

Views

Author

Michael B. Porter, Oct 22 2009

Keywords

Comments

For n >= p, p is one of the factors of n!, so p cannot divide n! + 1. As a result, only 0 <= n <= p-2 needs to be searched.
For n = p-1, by Wilson's Theorem, (p-1)! = -1 (mod p), so p divides (p-1)! + 1.
Since by convention 0! = 1, 2 is included in the sequence as dividing 0!+1 = 2.
The standard heuristic suggests that the fraction of primes in this sequence is 1 - 1/e or about 63%. - Charles R Greathouse IV, Apr 17 2013

Examples

			11 is included in the sequence since 11 divides 5! + 1 = 121.
13 is not included in the sequence since the only n for which 13 divides n! + 1 is n = 12.
		

Crossrefs

Programs

  • PARI
    isA166862(n) = {local(r);r=0;for(i=0,n-2,if((i!+1)%n==0,r=1));r}
    
  • PARI
    is(p)=my(m=Mod(1,p)); for(k=2,p-2,m*=k; if(m==-1, return(isprime(p)))); p==2 \\ Charles R Greathouse IV, Apr 17 2013

A185387 Expansion of e.g.f. exp(x)+log(1/(1-x)).

Original entry on oeis.org

1, 2, 2, 3, 7, 25, 121, 721, 5041, 40321, 362881, 3628801, 39916801, 479001601, 6227020801, 87178291201, 1307674368001, 20922789888001, 355687428096001, 6402373705728001, 121645100408832001, 2432902008176640001, 51090942171709440001, 1124000727777607680001, 25852016738884976640001
Offset: 0

Views

Author

Vladimir Kruchinin, Feb 21 2011

Keywords

Comments

Apart from the offset, the same as A038507. - R. J. Mathar, Jun 07 2011

Crossrefs

Cf. A038507.

Programs

  • Magma
    [1] cat [(1+Factorial(n-1)): n in [1..20]]; // Vincenzo Librandi, Oct 04 2011
  • Mathematica
    Join[{1},Range[0,20]!+1] (* Harvey P. Dale, Jun 28 2011 *)
  • PARI
    Vec(serlaplace(exp(x)+log(1/(1-x)))) \\ Joerg Arndt, Mar 03 2011
    

Formula

a(n) = (n-1)!+1, n>0, a(0)=1.
From Sergei N. Gladkovskii, Jun 14 2012: (Start)
G.f.: 1 + x*G(0) where G(k) = 1 + k!/(1 - x/(x + (k!)/G(k+1))); (continued fraction).
E.g.f.: 1 + x*G(0) where G(k) = 1 + k!/(1 - x/(x + (k+2)*(k!)/G(k+1))); (continued fraction).
(End).

A217702 Decimal expansion of Sum_{n>=0} 1/(1+n!).

Original entry on oeis.org

1, 5, 2, 6, 0, 6, 8, 1, 3, 4, 4, 7, 3, 3, 3, 0, 8, 2, 4, 7, 7, 8, 0, 4, 7, 2, 2, 5, 1, 6, 2, 4, 3, 8, 4, 0, 5, 4, 4, 9, 7, 5, 4, 2, 4, 0, 4, 6, 6, 4, 6, 5, 6, 5, 0, 7, 5, 8, 3, 6, 5, 6, 5, 1, 6, 7, 9, 5, 7, 4, 7, 1, 1, 4, 7, 2, 0, 2, 5, 2, 3, 8, 8, 0, 1, 8, 1, 6, 0, 9, 7, 3, 1, 1, 7, 7, 3, 6, 3, 0
Offset: 1

Views

Author

Jean-François Alcover, Mar 20 2013

Keywords

Comments

Is there any known closed form for this sum?

Examples

			1.526068134473330824778047225162438405449754240466465650758365651679...
		

Crossrefs

Cf. A038507.

Programs

  • Mathematica
    digits = 100; NSum[1/(1 + n!), {n, 0, Infinity}, NSumTerms -> digits, WorkingPrecision -> digits+5] // RealDigits[#, 10, digits]& // First

A229554 a(n) = 7*n! + 1.

Original entry on oeis.org

8, 8, 15, 43, 169, 841, 5041, 35281, 282241, 2540161, 25401601, 279417601, 3353011201, 43589145601, 610248038401, 9153720576001, 146459529216001, 2489811996672001, 44816615940096001, 851515702861824001, 17030314057236480001, 357636595201966080001
Offset: 0

Views

Author

Vincenzo Librandi, Sep 30 2013

Keywords

Crossrefs

Cf. sequences of the type k*n!+1: A038507 (k=1), A052898 (k=2), A173324 (k=3), A173322 (k=4), A173319 (k=5), A173314 (k=6), this sequence (k=7).

Programs

  • Magma
    [7*Factorial(n)+1: n in [0..25]];
    
  • Magma
    [8] cat [n eq 1 select n+7 else n*Self(n-1)-n+1: n in [1..25]];
  • Mathematica
    Table[7 n! + 1, {n, 0, 25}]

Formula

a(0)=8, a(n) = n*a(n-1)-n+1.
E.g.f.: 7/(1-x)+exp(x). - Geoffrey Critzer, Sep 30 2013

A230459 Ordered by increasing m with k < m, a(n) is the n-th record value of gcd(k!+1, m!+1).

Original entry on oeis.org

2, 7, 71, 661, 733, 2371, 3529, 13499, 46549, 98101, 163517, 197933, 1924217, 3322441, 5370731
Offset: 1

Views

Author

James G. Merickel, Oct 19 2013

Keywords

Comments

The pairs (m,k) generating records are (1,0), (6,3), (9,7), (17,8), (89,51), (174,144), (349,228), (422,81), (650,406), (1415,1718), (1697,161), (1622,773), (1884,1219), (7003,2031) and (17057,660).
Heuristics in concert with a database of 'small' (less than, say, 10^12) prime factors of numbers of this kind would generate faster accurate results with near certainty, while any truly proving program is doomed to be relatively slow by comparison (and see following on a(15)).
Note: An auxiliary program employed a limit of 10^8--in lieu of a database--to generate the likely-but-not-certain value of a(15) shown last.

Examples

			a(1)=2, corresponding to m=1 and k=0.  7 is the first value other than 1 to be the greatest common divisor of two different numbers k!+1 and m!+1, where m is increasing and k is allowed to increase to m-1 for a given m (for m=6 and k=3, m!+1=7*103 and k!+1=7); so that a(2)=7.
		

Crossrefs

Programs

  • PARI
    {
    \\ The constant L here is arbitrary.\\
    \\ This does not generate a(1).\\
    rec=2;L=10000;F=vector(L);n=2;
    for(k=1,L,n--;n*=k;n++;F[k]=n);
    for(m=2,L,
      for(k=1,m-1,
        a=gcd(F[m],F[k]);if(a>rec,
          rec=a;print1(a": "m","k"\n"))))
    }

A277080 Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n that remain unchanged by reverse.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 0, 3, 0, 3, 0, 1, 1, 0, 12, 0, 66, 0, 220, 0, 495, 0, 792, 0, 924, 0, 792, 0, 495, 0, 220, 0, 66, 0, 12, 0, 1, 1, 0, 60, 0, 1770, 0, 34220, 0, 487635, 0, 5461512, 0, 50063860, 0, 386206920, 0, 2558620845, 0, 14783142660, 0, 75394027566
Offset: 0

Views

Author

Christian Bean, Sep 28 2016

Keywords

Comments

The reverse of a permutation is the reverse in one line notation. For example the reverse of 43521 is 12534.
T(n,k) is the number of size k bases of S_n which remain unchanged by reverse.

Examples

			For n = 4 and k = 2 the subsets that remain unchanged by reverse are {4321, 1234}, {1243, 3421}, {4231, 1324}, {1342, 2431}, {1423, 3241}, {1432, 2341}, {2134, 4312}, {3412, 2143}, {2314, 4132}, {3142, 2413}, {4213, 3124} and {4123, 3214} so T(4,2) = 12.
For n = 3 and k = 4 the subsets that remain unchanged by reverse are {231, 321, 132, 123}, {321, 213, 312, 123} and {231, 132, 312, 213} so T(3,4) = 3.
The triangle starts:
1, 1;
1, 1;
1, 0, 1;
1, 0, 3, 0, 3, 0, 1;
		

Crossrefs

Row lengths give A038507.

Programs

  • Sage
    def T(n,k):
        if k % 2 == 1:
            return 0
        return binomial( factorial(n)/2, k/2 )

Formula

T(n,k) = C(n!/2, k/2) if k is even and T(n,k) = 0 if k is odd.

A277083 Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n that remain unchanged by a rotation of 180 degrees.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 4, 3, 2, 1, 1, 8, 36, 120, 322, 728, 1428, 2472, 3823, 5328, 6728, 7728, 8092, 7728, 6728, 5328, 3823, 2472, 1428, 728, 322, 120, 36, 8, 1, 1, 8, 84, 504, 3178, 15512, 74788, 311144, 1252819, 4577328, 16087512, 52691408, 165911284
Offset: 0

Views

Author

Christian Bean, Sep 28 2016

Keywords

Comments

A permutation, p, can be thought of as a set of points (i, p(i)). If you plot all the points and rotate the picture by 180 degrees then you get a permutation back.
T(n,k) is the number of size k subsets of S_n that remain unchanged by a rotation of 180 degrees.

Examples

			For n = 3 and k = 3, the subsets unchanged by rotating 180 degrees are {213,132,123}, {231,312,123}, {321,132,213} and {321,231,312} so T(3,3) = 4.
Triangle starts:
1, 1;
1, 1;
1, 2, 1;
1, 2, 3, 4, 3, 2, 1;
		

Crossrefs

Row lengths give A038507.
Cf. A037223.

Formula

T(n,k) = Sum_( binomial( n! - R(n), i ) * binomial( R(n), k-2*i ) for i in [0..floor(k/2)] ) where R(n) = A037223(n).
Previous Showing 71-80 of 91 results. Next