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.

A220466 a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1.

Original entry on oeis.org

1, 3, 2, 10, 3, 7, 4, 36, 5, 11, 6, 26, 7, 15, 8, 136, 9, 19, 10, 42, 11, 23, 12, 100, 13, 27, 14, 58, 15, 31, 16, 528, 17, 35, 18, 74, 19, 39, 20, 164, 21, 43, 22, 90, 23, 47, 24, 392, 25, 51, 26, 106, 27, 55, 28, 228, 29, 59, 30, 122, 31, 63, 32, 2080, 33, 67, 34, 138, 35
Offset: 1

Views

Author

Johannes W. Meijer, Dec 24 2012

Keywords

Comments

The a(n) appeared in the analysis of A220002, a sequence related to the Catalan numbers.
The first Maple program makes use of a program by Peter Luschny for the calculation of the a(n) values. The second Maple program shows that this sequence has a beautiful internal structure, see the first formula, while the third Maple program makes optimal use of this internal structure for the fast calculation of a(n) values for large n.
The cross references lead to sequences that have the same internal structure as this sequence.

Crossrefs

Cf. A000027 (the natural numbers), A000120 (1's-counting sequence), A000265 (remove 2's from n), A001316 (Gould's sequence), A001511 (the ruler function), A003484 (Hurwitz-Radon numbers), A003602 (a fractal sequence), A006519 (highest power of 2 dividing n), A007814 (binary carry sequence), A010060 (Thue-Morse sequence), A014577 (dragon curve), A014707 (dragon curve), A025480 (nim-values), A026741, A035263 (first Feigenbaum symbolic sequence), A037227, A038712, A048460, A048896, A051176, A053381 (smooth nowhere-zero vector fields), A055975 (Gray code related), A059134, A060789, A060819, A065916, A082392, A085296, A086799, A088837, A089265, A090739, A091512, A091519, A096268, A100892, A103391, A105321 (a fractal sequence), A109168 (a continued fraction), A117973, A129760, A151930, A153733, A160467, A162728, A181988, A182241, A191488 (a companion to Gould's sequence), A193365, A220466 (this sequence).

Programs

  • Haskell
    -- Following Ralf Stephan's recurrence:
    import Data.List (transpose)
    a220466 n = a006519_list !! (n-1)
    a220466_list = 1 : concat
       (transpose [zipWith (-) (map (* 4) a220466_list) a006519_list, [2..]])
    -- Reinhard Zumkeller, Aug 31 2014
  • Maple
    # First Maple program
    a := n -> 2^padic[ordp](n, 2)*(n+1)/2 : seq(a(n), n=1..69); # Peter Luschny, Dec 24 2012
    # Second Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 4^p*(n-1)  + 2^(p-1)*(1+2^p) od: od: seq(a(n), n=1..nmax);
    # Third Maple program
    nmax:=69: for p from 0 to ceil(simplify(log[2](nmax))) do n:=2^p: n1:=1: while n <= nmax do a(n) := 4^p*(n1-1)+2^(p-1)*(1+2^p): n:=n+2^(p+1): n1:= n1+1: od: od:  seq(a(n), n=1..nmax);
  • Mathematica
    A220466 = Module[{n, p}, p = IntegerExponent[#, 2]; n = (#/2^p + 1)/2; 4^p*(n - 1) + 2^(p - 1)*(1 + 2^p)] &; Array[A220466, 50] (* JungHwan Min, Aug 22 2016 *)
  • PARI
    a(n)=if(n%2,n\2+1,4*a(n/2)-2^valuation(n/2,2)) \\ Ralf Stephan, Dec 17 2013
    

Formula

a((2*n-1)*2^p) = 4^p*(n-1) + 2^(p-1)*(1+2^p), p >= 0 and n >= 1. Observe that a(2^p) = A007582(p).
a(n) = ((n+1)/2)*(A060818(n)/A060818(n-1))
a(n) = (-1/64)*(q(n+1)/q(n))/(2*n+1) with q(n) = (-1)^(n+1)*2^(4*n-5)*(2*n)!*A060818(n-1) or q(n) = (1/8)*A220002(n-1)*1/(A098597(2*n-1)/A046161(2*n))*1/(A008991(n-1)/A008992(n-1))
Recurrence: a(2n) = 4a(n) - 2^A007814(n), a(2n+1) = n+1. - Ralf Stephan, Dec 17 2013

A220002 Numerators of the coefficients of an asymptotic expansion in even powers of the Catalan numbers.

Original entry on oeis.org

1, 5, 21, 715, -162877, 19840275, -7176079695, 1829885835675, -5009184735027165, 2216222559226679575, -2463196751104762933637, 1679951011110471133453965, -5519118103058048675551057049, 5373485053345792589762994345215, -12239617587594386225052760043303511
Offset: 0

Views

Author

Peter Luschny, Dec 27 2012

Keywords

Comments

Let N = 4*n+3 and A = sum_{k>=0} a(k)/(A123854(k)*N^(2*k)) then
C(n) ~ 8*4^n*A/(N*sqrt(N*Pi)), C(n) = (4^n/sqrt(Pi))*(Gamma(n+1/2)/ Gamma(n+2)) the Catalan numbers A000108.
The asymptotic expansion of the Catalan numbers considered here is based on the Taylor expansion of square root of the sine cardinal. This asymptotic series involves only even powers of N, making it more efficient than the asymptotic series based on Stirling's approximation to the central binomial which involves all powers (see for example: D. E. Knuth, 7.2.1.6 formula (16)). The series is discussed by Kessler and Schiff but is included as a special case in the asymptotic expansion given by J. L. Fields for quotients Gamma(x+a)/Gamma(x+b) and discussed by Y. L. Luke (p. 34-35), apparently overlooked by Kessler and Schiff.

Examples

			With N = 4*n+3 the first few terms of A are A = 1 + 5/(4*N^2) + 21/(32*N^4) + 715/(128*N^6) - 162877/(2048*N^8) + 19840275/(8192*N^10). With this A C(n) = round(8*4^n*A/(N*sqrt(N*Pi))) for n = 0..39 (if computed with sufficient numerical precision).
		

References

  • Donald E. Knuth, The Art of Computer Programming, Volume 4, Fascicle 4: Generating All Trees—History of Combinatorial Generation, 2006.
  • Y. L. Luke, The Special Functions and their Approximations, Vol. 1. Academic Press, 1969.

Crossrefs

The logarithmic version is A220422. Appears in A193365 and A220466.
Cf. A220412.

Programs

  • Maple
    A220002 := proc(n) local s; s := n -> `if`(n > 0, s(iquo(n,2))+n, 0);
    (-1)^n*mul(4*i+2, i = 1..2*n)*2^s(iquo(n,2))*coeff(taylor(sqrt(sin(x)/x), x,2*n+2), x, 2*n) end: seq(A220002(n), n = 0..14);
    # Second program illustrating J. L. Fields expansion of gamma quotients.
    A220002 := proc(n) local recF, binSum, swing;
    binSum := n -> add(i,i=convert(n,base,2));
    swing := n -> n!/iquo(n, 2)!^2;
    recF := proc(n, x) option remember; `if`(n=0, 1, -2*x*add(binomial(n-1,2*k+1)*bernoulli(2*k+2)/(2*k+2)*recF(n-2*k-2,x),k=0..n/2-1)) end: recF(2*n,-1/4)*2^(3*n-binSum(n))*swing(4*n+1) end:
  • Mathematica
    max = 14; CoefficientList[ Series[ Sqrt[ Sinc[x]], {x, 0, 2*max+1}], x^2][[1 ;; max+1]]*Table[ (-1)^n*Product[ (2*k+1), {k, 1, 2*n}], {n, 0, max}] // Numerator (* Jean-François Alcover, Jun 26 2013 *)
  • Sage
    length = 15; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
    def A005187(n): return A005187(n//2) + n if n > 0 else 0
    def A220002(n):
        P = mul(4*i+2 for i in (1..2*n)) << A005187(n//2)
        return (-1)^n*P*T.coefficient(x, 2*n)
    [A220002(n) for n in range(length)]
    
  • Sage
    # Second program illustrating the connection with the Euler numbers.
    def A220002_list(n):
        S = lambda n: sum((4-euler_number(2*k))/(4*k*x^(2*k)) for k in (1..n))
        T = taylor(exp(S(2*n+1)),x,infinity,2*n-1).coefficients()
        return [t[0].numerator() for t in T][::-1]
    A220002_list(15)

Formula

Let [x^n]T(f(x)) denote the coefficient of x^n in the Taylor expansion of f(x) then r(n) = (-1)^n*prod_{i=1..2n}(2i+1)*[x^(2*n)]T(sqrt(sin(x)/x)) is the rational coefficient of the asymptotic expansion (in N=4*n+3) and a(n) = numerator(r(n)) = r(n)*2^(3*n-bs(n)), where bs(n) is the binary sum of n (A000120).
Also a(n) = numerator([x^(2*n)]T(exp(S))) where S = sum_{k>=1}((4-E(2*k))/ (4*k)*x^(2*k)) and E(n) the Euler numbers A122045.
Also a(n) = sf(4*n+1)*2^(3*n-bs(n))*F_{2*n}(-1/4) where sf(n) is the swinging factorial A056040, bs(n) the binary sum of n and F_{n}(x) J. L. Fields' generalized Bernoulli polynomials A220412.
In terms of sequences this means
r(n) = (-1)^n*A103639(n)*A008991(n)/A008992(n),
a(n) = (-1)^n*A220371(n)*A008991(n)/A008992(n).
Note that a(n) = r(n)*A123854(n) and A123854(n) = 2^A004134(n) = 8^n/2^A000120(n).
Formula from Johannes W. Meijer:
a(n) = d(n+1)*A098597(2*n+1)*(A008991(n)/A008992(n)) with d(1) = 1 and
d(n+1) = -4*(2*n+1)*A161151(n)*d(n),
d(n+1) = (-1)^n*2^(-1)*(2*(n+1))!*A060818(n)*A048896(n).

A008992 Denominators of coefficients in expansion of sqrt(sin(x)/x) (even powers only).

Original entry on oeis.org

1, 12, 1440, 24192, 29030400, 5677056, 4649508864000, 100429391462400, 39023992111104000, 100609855353520128000, 8632325589332026982400000, 6946127879462505676800000, 3060839851788186207387648000000
Offset: 0

Views

Author

Keywords

Crossrefs

Numerators are in A008991.
Appears in A220002 and A220466.

Programs

  • Maple
    A008992 := n -> denom(coeff(taylor(sqrt(sin(x)/x), x, 2*n+2), x, 2*n)): seq(A008992(n),  n=0..12); # Johannes W. Meijer, Feb 10 2013
  • Mathematica
    Denominator[CoefficientList[Series[Sqrt[Sin[x]/x], {x, 0, 50}], x][[1 ;; -1 ;; 2]]] (* G. C. Greubel, Jul 21 2018 *)
  • Sage
    length = 12; T = taylor(sqrt(sin(x)/x),x,0,2*length+2)
    [T.coefficient(x,2*n).denominator() for n in (0..length)]
    # Peter Luschny, Dec 13 2012

A117017 Decimal expansion of (sine of 1 radian)^(1/2).

Original entry on oeis.org

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

Views

Author

Mohammad K. Azarian, Apr 15 2006

Keywords

Examples

			0.917317275978108081904271835360260308316831382531234230407306783565563168854...
		

Crossrefs

Cf. A049469.

Programs

  • Mathematica
    RealDigits[Sqrt[Sin[1]],10,120][[1]] (* Harvey P. Dale, Sep 29 2023 *)

Formula

A117017 = Sum_{n>=0} A008991(n)/A008992(n). - Johannes W. Meijer, Feb 10 2013

Extensions

Offset corrected by Mohammad K. Azarian, Dec 11 2008
Showing 1-4 of 4 results.