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.

A124780 a(n) = gcd(A(n), A(n+2)) where A(n) = A000522(n) = Sum_{k=0..n} n!/k!.

Original entry on oeis.org

1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 13, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 5, 26, 1, 2, 1, 10, 1, 2, 1, 2, 5, 2, 37, 2, 13, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 26, 1, 2, 5, 2, 1, 2, 1, 10, 1, 2, 1, 2, 65, 2, 1, 2, 1, 10, 1, 2, 1, 74, 5, 2, 1, 26, 1, 10, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 13, 2, 1, 2, 5, 2, 1, 2, 1
Offset: 0

Views

Author

Jonathan Sondow, Nov 07 2006

Keywords

Comments

a(n) divides n+3 because A(n+2) = (n+2)(n+1)*A(n) + n+3.

Examples

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

Crossrefs

Programs

  • Mathematica
    (A[n_] := Sum[n!/k!, {k, 0, n}]; Table[GCD[A[n],A[n+2]], {n,0,100}])
    GCD[#[[1]],#[[3]]]&/@Partition[Table[Sum[n!/k!,{k,0,n}],{n,0,100}],3,1] (* Harvey P. Dale, Jun 14 2022 *)
  • PARI
    A000522(n) = sum(k=0, n, binomial(n, k)*k!); \\ This function from Joerg Arndt, Dec 14 2014
    A124780(n) = gcd(A000522(n),A000522(n+2)); \\ Antti Karttunen, Jul 07 2017

Formula

a(n) = gcd(A000522(n), A000522(n+2)) = (n+3)/A124782(n)