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

A061354 Numerator of Sum_{k=0..n} 1/k!.

Original entry on oeis.org

1, 2, 5, 8, 65, 163, 1957, 685, 109601, 98641, 9864101, 13563139, 260412269, 8463398743, 47395032961, 888656868019, 56874039553217, 7437374403113, 17403456103284421, 82666416490601, 6613313319248080001, 69439789852104840011
Offset: 0

Views

Author

Amarnath Murthy, Apr 28 2001

Keywords

Comments

p divides a(p-1) for prime p = {2, 5, 13, 37, 463, ...} which apparently coincides with A064384(n) = {2, 5, 13, 37, 463, ...} Primes p such that p divides 0!-1!+2!-3!+...+(-1)^{p-1}(p-1)!. - Alexander Adamchuk, Jun 14 2007
GCD(a(n), a(n+2)) = A124779(n) is either 1 or a prime 2, 5, 13, 37, 463, ... = A064384. - Jonathan Sondow, Jun 12 2007
For proofs of Adamchuk's and my Comments, see the link "The Taylor series for e ...". - Jonathan Sondow, Jun 18 2007

Examples

			1, 2, 5/2, 8/3, 65/24, 163/60, 1957/720, 685/252, ...
		

Crossrefs

Cf. A061355 (denominators), A093101, A064384, A064384, A124779, A129924.

Programs

  • Mathematica
    exp[n_]:=Apply[Plus,1/Range[0,n]!];Numerator[Table[exp[n],{n,0,21}]]  (* Geoffrey Critzer, May 05 2013 *)
    A061354[n_] := Numerator[Sum[1/k!, {k, 0, n}]]; Array[A061354, 22, 0] (* JungHwan Min, Nov 08 2016 *)
    Accumulate[1/Range[0,30]!]//Numerator (* Harvey P. Dale, Apr 13 2018 *)
  • PARI
    { default(realprecision, 500); e=exp(1); for (n=0, 200, a=numerator(floor(n!*e)/n!); if (n==0, a=1); write("b061354.txt", n, " ", a) ) } \\ Harry J. Smith, Jul 21 2009

Formula

a(n) = A000522(n)/A093101(n).
Numerators of floor(n!*exp(1))/n!, n>=1. Numerators of coefficients in expansion of exp(x)/(1-x). - Vladeta Jovovic, Aug 11 2002
a(n) = (1+n+n(n-1)+...+n!)/GCD(n!,1+n+n(n-1)+...+n!). - Jonathan Sondow, Aug 18 2006

A064384 Primes p such that p divides 0!-1!+2!-3!+...+(-1)^{p-1}(p-1)!.

Original entry on oeis.org

2, 5, 13, 37, 463
Offset: 1

Views

Author

Kevin Buzzard (buzzard(AT)ic.ac.uk), Sep 28 2001

Keywords

Comments

If p is in the sequence then p divides 0!-1!+2!-3!+...+(-1)^N N! for all sufficiently large N. Naive heuristics suggest that the sequence should be infinite but very sparse.
Same as the terms > 1 in A124779. - Jonathan Sondow, Nov 09 2006
A prime p is in the sequence if and only if p|A(p-1), where A(0) = 1 and A(n) = n*A(n-1)+1 = A000522(n). - Jonathan Sondow, Dec 22 2006
Also, a prime p is in this sequence if and only if p divides A061354(p-1). - Alexander Adamchuk, Jun 14 2007
Michael Mossinghoff has calculated that 2, 5, 13, 37, 463 are the only terms up to 150 million. - Jonathan Sondow, Jun 12 2007

Examples

			5 is in the sequence because 5 is prime and it divides 0!-1!+2!-3!+4!=20.
		

References

  • R. K. Guy, Unsolved Problems in Theory of Numbers, Springer-Verlag, Third Edition, 2004, B43.

Crossrefs

Programs

  • Mathematica
    Select[Select[Range[500], PrimeQ], (Mod[Sum[(-1)^(p - 1)*p!, {p, 2, # - 1}], #] == 0) &] (* Julien Kluge, Feb 13 2016 *)
    a[0] = 1; a[n_] := a[n] = n*a[n - 1] + 1; Select[Select[Range[500], PrimeQ], (Mod[a[# - 1], #] == 0) &] (* Julien Kluge, Feb 13 2016 with the sequence approach suggested by Jonathan Sondow *)
    Select[Prime[Range[500]],Divisible[AlternatingFactorial[#]-1,#]&] (* Harvey P. Dale, Jan 08 2021 *)
  • PARI
    A=1;for(n=1,1000,if(isprime(n),if(Mod(A,n)==0,print(n)));A=n*A+1) \\ Jonathan Sondow, Dec 22 2006

Extensions

Edited by Max Alekseyev, Mar 05 2011

A124779 a(n) = gcd(A(n), A(n+2))/gcd(d(n), d(n+2)) where A(n) = Sum_{k=0..n} n!/k! and d(n) = gcd(A(n), n!).

Original entry on oeis.org

1, 2, 5, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 37, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Jonathan Sondow, Nov 07 2006

Keywords

Comments

The next term > 1 is a(460) = 463. The primes 2, 5, 13, 37, 463 are the only terms > 1 up to n = 600000. If a(n) > 1 with n > 1, then a(n) = n+3 is prime. This uses A(n+2) = (n+2)(n+1)*A(n) + n+3. The terms > 1 are A064384 = primes p such that p divides 0!-1!+2!-3!+...+(-1)^{p-1}(p-1)!. The proof uses (n-1)!/(n-k-1)! = (n-1)(n-2)...(n-k) == (-1)^k k! (mod n). Cf. Cloitre's comment in A064383.
An integer p > 1 is in the sequence if and only if p is prime and p|A(p-1), where A(0) = 1 and A(n) = n*A(n-1)+1 for n > 0. - Jonathan Sondow, Dec 22 2006
Michael Mossinghoff has calculated that there are only five primes in the sequence up to 150 million. Heuristics suggest it contains infinitely many. - Jonathan Sondow, Jun 12 2007

Examples

			a(2) = gcd(A(2), A(4))/gcd(d(2), d(4)) = gcd(5, 65)/gcd(1, 1) = 5/1 = 5.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, Springer-Verlag, 3rd edition, 2004, B43.

Crossrefs

A(n) = A000522, d(n) = A093101, gcd(A(n), A(n+2)) = A124780, gcd(d(n), d(n+2)) = A124781, (n+3)/gcd(A(n), A(n+2)) = A124782, (n+3)/gcd(d(n), d(n+2)) = A123901. Cf. A061354, A061355, A123899, A123900.
Cf. A129924.

Programs

  • Mathematica
    (A[n_] := Sum[n!/k!, {k, 0, n}]; d[n_] := GCD[A[n],n! ]; Table[GCD[A[n],A[n+2]]/GCD[d[n],d[n+2]], {n,0,100}])
  • PARI
    A124779(n)={my(An=A000522(n),A2=A000522(n+2));gcd(An, A2)/gcd([An,n!,A2,(n+2)!])} \\ M. F. Hasler, Jun 04 2019

Formula

a(n) = A124780(n)/A124781(n) = A124782(n)/A123901(n).
a(n) = gcd(A(n), A(n+2))/gcd(A(n), A(n+2), n!) where A(n)=1+n+n(n-1)+...+n!. - Jonathan Sondow, Nov 10 2006
a(n) = gcd(N(n), N(n+2)), where N(n) = A061354(n) = numerator of Sum[1/k!,{k,0,n}]. - Jonathan Sondow, Jun 12 2007

A064383 Integers n >= 1 such that n divides 0!-1!+2!-3!+4!-...+(-1)^{n-1}(n-1)!.

Original entry on oeis.org

1, 2, 4, 5, 10, 13, 20, 26, 37, 52, 65, 74, 130, 148, 185, 260, 370, 463, 481, 740, 926, 962, 1852, 1924, 2315, 2405, 4630, 4810, 6019, 9260, 9620, 12038, 17131, 24076, 30095, 34262, 60190, 68524, 85655, 120380, 171310, 222703, 342620, 445406, 890812, 1113515
Offset: 1

Views

Author

Kevin Buzzard (buzzard(AT)ic.ac.uk), Sep 28 2001

Keywords

Comments

If a is in the sequence, then so are all its positive divisors. If a and b are coprime and in the sequence, then so is their product. Hence in extending the sequence, one may as well just look for primes in the sequence (and then check powers of these primes). Heuristically one might expect a very sparse but infinite set of primes in the sequence, but the largest one I know is p=463 and I've searched up to 600000. This sequence was brought to my attention by David Loeffler.
Also, n such that A000522(n)==1 (mod n^2). - Benoit Cloitre, Apr 15 2003
The primes in this sequence are the same as the terms > 1 in A124779. - Jonathan Sondow, Nov 09 2006
Also, n such that n|A(n-1), where A(0) = 1 and A(k) = k*A(k-1)+1 = A000522(k) for k > 0. - Jonathan Sondow, Dec 22 2006
Michael Mossinghoff has calculated that 2, 5, 13, 37, 463 are the only primes in the sequence up to 150 million. - Jonathan Sondow, Jun 12 2007

Examples

			4 is in the sequence because 4 divides 0!-1!+2!-3!=1-1+2-6=-4.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 3rd ed., Springer-Verlag, 2004, B43.

Crossrefs

Programs

  • Mathematica
    s = 0; Do[ s = s + (-1)^(n)(n)!; If[ Mod[ s, n + 1 ] == 0, Print[ n + 1 ] ], {n, 0, 600000} ]
    Divisors[4454060] (* From Formula above *) (* Harvey P. Dale, Aug 09 2012 *)

Formula

Up to n=600000, these are just the divisors of 4*5*13*37*463.

Extensions

More terms from Sean A. Irvine, Jul 02 2023
Showing 1-4 of 4 results.