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

A101686 a(n) = Product_{i=1..n} (i^2 + 1).

Original entry on oeis.org

1, 2, 10, 100, 1700, 44200, 1635400, 81770000, 5315050000, 435834100000, 44019244100000, 5370347780200000, 778700428129000000, 132379072781930000000, 26078677338040210000000, 5893781078397087460000000, 1514701737148051477220000000
Offset: 0

Views

Author

Ralf Stephan, Dec 13 2004

Keywords

Comments

Sum of all coefficients in Product_{k=0..n} (x + k^2).
Row sums of triangle of central factorial numbers (A008955).
"HANOWA" is a matrix whose eigenvalues lie on a vertical line. It is an N X N matrix with 2 X 2 blocks with identity matrices in the upper left and lower right blocks and diagonal matrices containing the first N integers in the upper right and lower left blocks. In MATLAB, the following code generates the sequence... for n=0:2:TERMS*2 det(gallery('hanowa',n)) end. - Paul Max Payton, Mar 31 2005
Cilleruelo shows that a(n) is a square only for n = 0 and 3. - Charles R Greathouse IV, Aug 27 2008
a(n) = A231530(n)^2 + A231531(n)^2. - Stanislav Sykora, Nov 10 2013

References

  • Edmund Landau, Handbuch der Lehre von der Verteilung der Primzahlen, Chelsea Publishing, NY 1953, pp. 559-561, Section 147. - N. J. A. Sloane, May 29 2014

Crossrefs

Equals 2 * A051893(n+1), n>0. Cf. A156648.

Programs

  • Maple
    p := n -> mul(x^2+1, x=0..n):
    seq(p(i), i=0..14); # Gary Detlefs, Jun 03 2010
  • Mathematica
    Table[Product[k^2+1,{k,0,n}],{n,0,20}] (* Vaclav Kotesovec, Nov 11 2013 *)
    Table[Pochhammer[I, n + 1] Pochhammer[-I, n + 1], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 25 2015 *)
    Table[Abs[Pochhammer[1 + I, n]]^2, {n, 0, 20}] (* Vaclav Kotesovec, Oct 16 2016 *)
  • PARI
    a(n)=prod(k=1,n,k^2+1) \\ Charles R Greathouse IV, Aug 27 2008
    
  • PARI
    {a(n)=if(n==0, 1, 1-polcoeff(sum(k=0, n-1, a(k)*x^k/prod(j=1, k+1, 1+j^2*x+x*O(x^n))), n))} \\ Paul D. Hanna, Jan 07 2013
    
  • Python
    from math import prod
    def A101686(n): return prod(i**2+1 for i in range(1,n+1)) # Chai Wah Wu, Feb 22 2024

Formula

G.f.: 1/(1-x) = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1 + k^2*x). - Paul D. Hanna, Jan 07 2013
G.f.: 1 + x*(G(0) - 1)/(x-1) where G(k) = 1 - ((k+1)^2+1)/(1-x/(x - 1/G(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Jan 15 2013
a(n) ~ (n!)^2 * sinh(Pi)/Pi. - Vaclav Kotesovec, Nov 11 2013
From Vladimir Reshetnikov, Oct 25 2015: (Start)
a(n) = Gamma(n+1+i)*Gamma(n+1-i)*sinh(Pi)/Pi.
a(n) ~ 2*exp(-2*n)*n^(2*n+1)*sinh(Pi).
G.f. for 1/a(n): hypergeom([1], [1-i, 1+i], x).
E.g.f. for a(n)/n!: hypergeom([1-i, 1+i], [1], x), where i=sqrt(-1).
D-finite with recurrence: a(0) = 1, a(n) = (n^2+1)*a(n-1). (End)
a(n+3)/a(n+2) - 2 a(n+2)/a(n+1) + a(n+1)/a(n) = 2. - Robert Israel, Oct 25 2015
a(n) = A003703(n+1)^2 + A009454(n+1)^2. - Vladimir Reshetnikov, Oct 15 2016
a(n) = A105750(n)^2 + A105751(n)^2. - Ridouane Oudra, Dec 15 2021

Extensions

More terms from Charles R Greathouse IV, Aug 27 2008
Simpler definition from Gary Detlefs, Jun 03 2010
Entry revised by N. J. A. Sloane, Dec 22 2012
Minor edits by Vaclav Kotesovec, Mar 13 2015

A009454 Expansion of e.g.f. sin(log(1+x)).

Original entry on oeis.org

0, 1, -1, 1, 0, -10, 90, -730, 6160, -55900, 549900, -5864300, 67610400, -839594600, 11186357000, -159300557000, 2416003824000, -38894192662000, 662595375078000, -11911522255750000, 225382826562400000
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[Sin[Log[1+x]], {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Jan 24 2015 *)
    FullSimplify[Table[-((-1)^n*(Gamma[1 + I]*Gamma[-I + n] + Gamma[1 - I]*Gamma[I + n])*Sinh[Pi]) / (2*Pi), {n, 0, 20}]] (* Vaclav Kotesovec, Jan 24 2015 *)
    Table[-(-1)^n Re[Pochhammer[1+I, n-1]], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 13 2016 *)
  • Maxima
    sum(stirling1(n,2*k+1)*(-1)^(k),k,0,n/2) /* Vladimir Kruchinin, Aug 03 2010 */
    
  • Python
    from sympy.functions.combinatorial.numbers import stirling
    def A009454(n): return sum(stirling(n,(k<<1)+1,kind=1,signed=True)*(-1 if k&1 else 1) for k in range(n+1>>1)) # Chai Wah Wu, Feb 22 2024

Formula

a(n) = Sum_{k=0..n-1} (-1)^k*T(n-1, k)*cos(Pi*(n-k-1)/2); T(n, k) = abs(A008276(n, k)). - Paul Barry, Apr 18 2005
abs(a(n)) = abs(Re(Product_{k=1..n-1} (k+I))) with I^2 = -1. - Yalcin Aktar, Jul 02 2005
a(n+2) = -(2n+1)*a(n+1)-(n^2+1)*a(n), a(0)=0, a(1)=1. - Remy Lachaud (pacifik31(AT)aol.com), Dec 25 2005
a(n) = Sum_{k=0..n/2} Stirling1(n,2k+1)*(-1)^k. - Vladimir Kruchinin, Aug 03 2010
a(n) = Im(gamma(i+1)/gamma(i+1-n)). The real part is A003703. - Colin Beveridge, Jul 30 2024

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997

A231531 Imaginary part of Product_{k = 1..n} (k + i), i = sqrt(-1).

Original entry on oeis.org

0, 1, 3, 10, 40, 190, 1050, 6620, 46800, 365300, 3103100, 28269800, 271627200, 2691559000, 26495469000, 238131478000, 1394099824000, -15194495654000, -936096296850000, -29697351895900000, -819329864480400000, -21683886333440500000, -570263312237604700000, -15145164178973569000000, -409583160925827252000000
Offset: 0

Views

Author

Stanislav Sykora, Nov 10 2013

Keywords

Comments

Extension of factorial(n) to factim(n,m) defined by the recurrence a(0)=1, a(n)=a(n-1)*(n+m*i). Hence n! = factim(n,0), while the current sequence shows the imaginary parts of factim(n,1). The real parts are in A231530 and squares of magnitudes are in A101686.
From Peter Bala, Jun 01 2023: (Start)
Compare with A105751(n) = the imaginary part of Product_{k = 0..n} (1 + k*sqrt(-1)). Moll (2012) studied the prime divisors of the terms of A105750 - the real part of Product_{k = 0..n} (1 + k*sqrt(-1)) - and divided the primes into three types. Calculation suggests that a similar division holds in this case.
Type 1: the prime p does not divide any element of the sequence. It appears that for this sequence, unlike in A105750, there are no type 1 primes; i.e., every prime p divides some term of the sequence.
Type 2: primes p such that the p-adic valuation v_p(a(n)) has asymptotically linear behavior. An example is given below.
We conjecture that the set of type 2 primes consists of p = 2 and all primes of the form p == 1 (mod 4). See A002144.
Moll's conjecture 5.5 about type 2 primes extends to this sequence and takes the form:
(i) the 2-adic valuation v_2(a(n)) ~ n/4 as n -> oo.
(ii) for a type 2 prime p, the p-adic valuation v_p(a(n)) ~ n/(p - 1) as n -> oo.
Type 3: primes p such that the sequence of p-adic valuations {v_p(a(n)) : n >= 0} exhibits an oscillatory behavior (this phrase is not precisely defined). An example is given below.
We conjecture that the set of type 3 primes is A002145, primes of the form 4*k + 3. (End)

Examples

			factim(5,1) = -90+190*i. Hence a(5) = 190.
From _Peter Bala_, Jun 01 2023: (Start)
Asymptotic linearity for the type 2 prime p = 5: the sequence of 5-adic valuations [ v_5(a(n)) : n = 1..100] = [0, 0, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 5, 5, 5, 6, 5, 6, 6, 7, 6, 6, 7, 7, 7, 8, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 11, 11, 11, 13, 11, 12, 12, 13, 12, 12, 13, 13, 13, 14, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 18, 19, 18, 18, 18, 19, 19, 19, 20, 19, 20, 21, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 24, 25, 24, 24, 24, 25, 25, 25].
Note that v_5(a(100)) = 25 = 100/(5 - 1), in line with Moll's conjecture 5.5 above.
Oscillatory behavior for the type 3 prime p = 3: the sequence of 3-adic valuations [ v_3(a(n)) : n = 1..100] = [0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 3, 0, 0, 0, 3, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 3, 0, 0, 0, 3, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 4, 0, 0, 0, 4, 0, 2, 0, 0, 0, 2, 0, 1, 0, 0, 0, 1, 0, 2, 0, 0]. It appears that v_3(a(n)) = 0 unless n == 0 or 2 (mod 6). (End)
		

Crossrefs

Cf. A231530 (real parts), A101686 (squares of magnitudes), A003703, A105750, A105751.
See A242651, A242652 for a pair of similar sequences.

Programs

  • Maple
    seq(simplify(-sinh(Pi)*Im(I!*(n-I)!)/Pi), n=0..19); # Peter Luschny, Oct 23 2015
  • Mathematica
    Table[Im[Pochhammer[1+I, n]], {n, 0, 20}]
    Table[Sum[(-1)^(n+k) StirlingS1[n+1, 2k], {k, 0, (n+1)/2}], {n, 0, 20}] (* Vladimir Reshetnikov, Oct 22 2015 *)
  • PARI
    Factim(nmax, m)={local(a, k); a=vector(nmax); a[1]=1+0*I;
      for (k=2, nmax, a[k]=a[k-1]*(k-1+m*I); ); return(a); }
    a = Factim(1000,1); imag(a)
    
  • PARI
    t(n) = if( n<0, 0, n! * polcoeff(cos(log(1+x+x*O(x^n))), n));
    vector(50, n, n--; (-1)^n*t(n+1)) \\ Altug Alkan, Oct 22 2015
    
  • Python
    from sympy.functions.combinatorial.numbers import stirling
    def A231531(n): return sum(stirling(n+1,k<<1,kind=1)*(1 if k&1 else -1) for k in range((n+1>>1)+1)) # Chai Wah Wu, Feb 22 2024

Formula

From Vladimir Reshetnikov, Oct 22 2015: (Start)
a(n) = Im((1+i)_n) = -Re(Gamma(i)*Gamma(n+1-i))*sinh(Pi)/Pi, where (a)_n is the Pochhammer symbol, i=sqrt(-1).
a(n) = (-1)^n*A003703(n+1).
E.g.f.: sin(log(1-x))/(x-1). (End)
P-recursive: a(n) = (2*n - 1)*a(n-1) - (n^2 - 2*n + 2)*a(n-2) with a(0) = 0 and a(1) = 1. - Peter Bala, Jun 01 2023

A370551 a(n) is the numerator of the real part of Product_{k=1..n} (1 + i/k) where i is the imaginary unit.

Original entry on oeis.org

1, 1, 0, -5, -3, -73, -11, -2795, -3055, -58643, -2561, -4197973, -614635, -61269445, -3871801, -1495930487, -23794993, -26949145375, -1677354925, -1013112936505, -30432904645, -459074207581145, -2099373575975, -6497000065206625, -11053607615333933, -239235470859971731
Offset: 1

Views

Author

Hugo Pfoertner, Feb 22 2024

Keywords

Examples

			   n  A370551(n)      A370553(n)
           / A370552(n)     / A370554(n)
   1      1/1             +1/1     *i
   2      1/2             +3/2     *i
   3      0/1             +5/3     *i
   4     -5/12            +5/3     *i
   5     -3/4            +19/12    *i
   6    -73/72           +35/24    *i
   7    -11/9           +331/252   *i
   8  -2795/2016         +65/56    *i
   9  -3055/2016      +18265/18144 *i
  10 -58643/36288      +4433/5184  *i
		

Crossrefs

Programs

  • PARI
    a370551(n) = numerator(real(prod(k=1, n, 1+I/k)))
    
  • Python
    from math import factorial, gcd
    from sympy.functions.combinatorial.numbers import stirling
    def A370551(n): return (a:=sum(stirling(n+1,(k<<1)+1,kind=1)*(-1 if k&1 else 1) for k in range((n>>1)+1)))//gcd(a,factorial(n)) # Chai Wah Wu, Feb 22 2024

Formula

a(n) = numerator of A231530(n)/n!. - Chai Wah Wu, Feb 22 2024

A370552 a(n) is the denominator of the real part of Product_{k=1..n} (1 + i/k) where i is the imaginary unit.

Original entry on oeis.org

1, 2, 1, 12, 4, 72, 9, 2016, 2016, 36288, 1512, 2395008, 342144, 33530112, 2095632, 804722688, 12773376, 14485008384, 905313024, 550430318592, 16679706624, 254298807189504, 1177309292544, 3694024778121216, 6380588253118464, 140372941568606208, 2506659670867968
Offset: 1

Views

Author

Hugo Pfoertner, Feb 22 2024

Keywords

Examples

			See A370551.
		

Crossrefs

Programs

  • PARI
    a370552(n) = denominator(real(prod(k=1, n, 1+I/k)))
    
  • Python
    from math import factorial, gcd
    from sympy.functions.combinatorial.numbers import stirling
    def A370552(n): return (a:=factorial(n))//gcd(a,sum(stirling(n+1,(k<<1)+1,kind=1)*(-1 if k&1 else 1) for k in range((n>>1)+1))) # Chai Wah Wu, Feb 22 2024

Formula

a(n) = denominator of A231530(n)/n!. - Chai Wah Wu, Feb 22 2024

A231532 Decimal expansion of the real part of Sum_{n=0..inf}(1/c_n), c_0=1, c_n=c_(n-1)*(n+I).

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Nov 10 2013

Keywords

Comments

Consider an extension of exp(x) to an intriguing function, expim(x,y), defined by the power series Sum_{n=0..inf}(x^n/c_n), where c_0 = 1, c_n = c_(n-1)*(n+y*I), so that exp(x) = expim(x,0). The current sequence regards the real part of expim(1,1). The decimal expansion of the imaginary part is in A231533 and that of the absolute value in A231534.

Examples

			1.59154781473285195733677988...
		

Crossrefs

Cf. A231533 (imaginary part), A231534 (absolute value), and A231530, A231531 (respectively, the real and imaginary parts of the expansion coefficient's denominators).

Programs

  • PARI
    Expim(x,y)={local (c,k,lastval,val);c = 1.0+0.0*I;lastval = c;k = 1; while (k,c*=x/(k + y*I);val = lastval + c;if (val==lastval, break);   lastval = val;k += 1;);return (val);}
    real(Expim(1,1))

Formula

real(Sum_{n=0..inf}(1/(A231530(n)+A231531(n)*I))).

A231533 Decimal expansion of the negative imaginary part of Sum_{n=0..inf}(1/c_n), c_0=1, c_n=c_(n-1)*(n+I).

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Nov 10 2013

Keywords

Comments

Consider an extension of exp(x) to an intriguing function, expim(x,y), defined by the power series Sum_{n=0..inf}(x^n/c_n), where c_0 = 1, c_n = c_(n-1)*(n+y*I), so that exp(x) = expim(x,0). The current sequence regards the negative imaginary part of the complex expim(1,1). The decimal expansion of the real part is in A231532 and that of the absolute value in A231534.

Examples

			-0.92856077732184558666720293...
		

Crossrefs

Cf. A231532, A231534, and A231530, A231531 (respectively the real and imaginary parts of the expansion coefficient's denominators).

Programs

  • PARI
    Expim(x,y)={local (c,k,lastval,val);c = 1.0+0.0*I;lastval = c;k = 1; while (k,c*=x/(k + y*I);val = lastval + c;if (val==lastval, break);   lastval = val;k += 1;);return (val);}
    imag(Expim(1,1))

Formula

imag(Sum_{n=0..inf}(1/(A231530(n)+A231531(n)*I))).

A231534 Decimal expansion of the absolute value of Sum_{n=0..inf}(1/c_n), c_0=1, c_n=c_(n-1)*(n+I).

Original entry on oeis.org

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

Views

Author

Stanislav Sykora, Nov 10 2013

Keywords

Comments

Consider an extension of exp(x) to an intriguing function, expim(x,y), defined by the power series Sum_{n=0..inf}(x^n/c_n), where c_0 = 1, c_n = c_(n-1)*(n+y*I), so that exp(x) = expim(x,0). The current sequence regards the absolute value of expim(1,1). The decimal expansions of the real and imaginary parts of expim(1,1) are in A231532 and A231533, respectively.

Examples

			1.8426202983147305389585438...
		

Crossrefs

Cf. A231532 (real part), A231533 (imaginary part), and A231530, A231531 (respectively, the real and imaginary parts of the expansion coefficient's denominators)

Programs

  • PARI
    Expim(x, y)={local (c, k, lastval, val); c = 1.0+0.0*I; lastval = c; k = 1; while (k, c*=x/(k + y*I); val = lastval + c; if (val==lastval, break);   lastval = val; k += 1; ); return (val); }
    abs(Expim(1, 1))

Formula

abs(Sum_{n=0..inf}(1/(A231530(n)+A231531(n)*I))).

A230126 Smallest value of k such that Sum_{j=1..k} arctan(1/j) > n*Pi/2.

Original entry on oeis.org

1, 4, 17, 82, 396, 1905, 9165, 44088, 212082, 1020218, 4907734, 23608545, 113568371, 546318080, 2628050766, 12642178765, 60814914995
Offset: 0

Views

Author

James G. Merickel, Oct 10 2013

Keywords

Comments

Equivalently, integers k such that (1+i)*(2+i)*...*(k+i) is not in the same quadrant of the complex plane that (1+i)*(2+i)*...*(k-1+i) is in (if one of these numbers lies on the real or imaginary axis, it is taken to be in the quadrant immediately clockwise from it).
The only time that (1+i)*(2+i)*...*(k+i) lies on the real or imaginary axis is when k = 3, which follows from a result of Cilleruelo (see links). - Nathaniel Johnston, Dec 27 2013
The ratio between successive terms quickly approaches exp(Pi/2), which can be proved using the Taylor series of the arctangent function and the (basic) definition of Euler's constant.

Crossrefs

Cf. A042972 (exp(Pi/2)), A231530, A231531.

Programs

  • PARI
    {
    a=1;s=0;S=Pi/2;
    while(1,s+=atan(1/a);if(s>S,
    S+=Pi/2;print(a));a++)
    }

Extensions

a(17) added by James G. Merickel, Oct 14 2013
Showing 1-9 of 9 results.