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.

A123901 a(n) = (n+3)/gcd(d(n), d(n+2)) where d(n) = cancellation factor in reducing Sum_{k=0..n} 1/k! to lowest terms.

Original entry on oeis.org

3, 4, 5, 3, 7, 4, 9, 1, 11, 6, 13, 7, 3, 8, 17, 9, 19, 2, 21, 11, 23, 12, 5, 1, 27, 14, 29, 3, 31, 16, 33, 17, 7, 18, 37, 19, 3, 4, 41, 21, 43, 22, 9, 23, 47, 24, 49, 5, 51, 2, 53, 27, 11, 28, 57, 29, 59, 6, 61, 31, 63, 32, 1, 33, 67, 34, 69, 7, 71, 36, 73, 1, 15, 38, 77, 3, 79, 8, 81
Offset: 0

Views

Author

Jonathan Sondow, Oct 18 2006

Keywords

Examples

			a(5) = 4 because (5+3)/gcd(d(5),d(7)) = 8/gcd(2,20) = 8/2 = 4.
		

Crossrefs

Programs

  • Mathematica
    (A[n_] := If[n==0,1,n*A[n-1]+1]; d[n_] := GCD[A[n],n! ]; Table[(n+3)/GCD[d[n],d[n+2]], {n,0,79}])
    (* Second program, faster: *)
    Table[(n + 3)/Apply[GCD, Map[GCD[#!, Floor[E*#!] - Boole[# == 0]] &, n + {0, 2}]], {n, 0, 78}] (* Michael De Vlieger, Jul 12 2017 *)
  • PARI
    A000522(n) = sum(k=0, n, binomial(n, k)*k!); \\ This function from Joerg Arndt, Dec 14 2014
    A093101(n) = gcd(n!,A000522(n));
    m1=m2=1; for(n=0,4096,m=m1; m1=m2; m2 = A093101(n+2); m124781 = gcd(m,m2); write("b093101.txt", n, " ", m); write("b124781.txt", n, " ", m124781); write("b123901.txt", n, " ", (n+3)/m124781)); \\ Antti Karttunen, Jul 12 2017

Formula

a(n) = (n+3)/A124781(n) = (n+3)/gcd(A093101(n),A093101(n+2)) where A093101(n) = gcd(n!,1+n+n(n-1)+...+n!).