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.

Previous Showing 21-30 of 39 results. Next

A055975 First differences of A003188 (decimal equivalent of the Gray Code).

Original entry on oeis.org

1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, 16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, 32, 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, -16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, 64, 1, 2, -1, 4, 1, -2, -1, 8, 1, 2, -1, -4, 1, -2, -1, 16, 1, 2, -1, 4, 1, -2, -1, -8, 1, 2, -1, -4, 1, -2, -1, -32, 1, 2, -1, 4
Offset: 1

Views

Author

Alford Arnold, Jul 22 2000

Keywords

Comments

Multiplicative with a(2^e) = 2^e, a(p^e) = (-1)^((p^e-1)/2) otherwise. - Mitch Harris, May 17 2005
a(A091072(n)) > 0; a(A091067(n)) < 0. - Reinhard Zumkeller, Apr 28 2012
In the binary representation of n, clear everything left of the least significant 1 bit, and negate if the bit left of it was set originally. - Ralf Stephan, Aug 23 2013
This sequence is the trace of n in the minimal alternating binary representation of n (defined at A256696). - Clark Kimberling, Apr 07 2015

Examples

			Since A003188 is 0, 1,  3, 2, 6,  7,  5, 4, 12, 13, 15, 14, 10, ...,
sequence begins  1, 2, -1, 4, 1, -2, -1, 8,  1,  2, -1,  4, ... .
		

Crossrefs

Cf. A003188, A006519 (unsigned), A007814.
MASKTRANSi transform of A053644 (conjectural).

Programs

  • Haskell
    a055975 n = a003188 n - a003188 (n-1)
    a055975_list = zipWith (-) (tail a003188_list) a003188_list
    -- Reinhard Zumkeller, Apr 28 2012
    
  • Maple
    nmax:=100: 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) := (-1)^(n+1)*2^p od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 27 2013
  • Mathematica
    f[n_]:=BitXor[n,Floor[n/2]];Differences[Array[f,120,0]] (* Harvey P. Dale, Jul 18 2011, applying Robert G. Wilson v's program from A003188 *)
  • PARI
    a(n)=((-1)^((n/2^valuation(n,2)-1)/2)*2^valuation(n,2)) \\ Ralf Stephan
    
  • Python
    def A055975(n): return (n^(n>>1))-((n-1)^(n-1>>1)) # Chai Wah Wu, Jun 29 2022

Formula

a(2n) = 2a(n), a(2n+1) = (-1)^n. G.f. sum(k>=0, 2^k*t/(1+t^2), t=x^2^k). a(n) = 2^A007814(n) * (-1)^((n/2^A007814(n)-1)/2). - Ralf Stephan, Oct 29 2003
a((2*n-1)*2^p) = (-1)^(n+1)*2^p, p >= 0. - Johannes W. Meijer, Jan 27 2013

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Sep 05 2000

A088837 Numerator of sigma(2*n)/sigma(n). Denominator see in A038712.

Original entry on oeis.org

3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 63, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 127, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 63, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 255, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3, 7, 3, 63, 3, 7, 3, 15, 3, 7, 3, 31, 3, 7, 3, 15, 3
Offset: 1

Views

Author

Labos Elemer, Nov 04 2003

Keywords

Comments

In general sigma(2^k*n) / sigma(n) = ((2^k*n) XOR (2^k*n-1)) / (n XOR (n-1)), see link. Jon Maiga, Dec 10 2018

Crossrefs

Programs

  • Maple
    nmax:=93: 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) := 2^(p+2)-1 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 09 2013
  • Mathematica
    k=2; Table[Numerator[DivisorSigma[1, k*n]/DivisorSigma[1, n]], {n, 1, 128}]
    Table[BitXor[2*n, 2*n - 1], {n, 128}] (* Jon Maiga, Dec 10 2018 *)
  • PARI
    A088837(n) = numerator(sigma(n<<1)/sigma(n)); \\ Antti Karttunen, Nov 01 2018

Formula

a(n) = 4*2^A007814(n)-1 = 4*A006519(n)-1 = A059159(n)-1 = 2*A038712(n) + 1.
a((2*n-1)*2^p) = 2^(p+2)-1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 09 2013
a(n) = (2n) XOR (2n-1). - Jon Maiga, Dec 10 2018
From Amiram Eldar, Jan 06 2023: (Start)
a(n) = numerator(A062731(n)/A000203(n)).
Sum_{k=1..n} a(k) ~ (log_2(n) + (gamma-1)/log(2) + 1)*2*n, where gamma is Euler's constant (A001620).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k)/A038712(k) = A065442 + 1 = 2.606695... . (End).

A117973 a(n) = 2^(wt(n)+1), where wt() = A000120().

Original entry on oeis.org

2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32, 32, 64, 8, 16, 16, 32, 16, 32, 32, 64, 16, 32, 32, 64, 32, 64, 64, 128, 4, 8, 8, 16, 8, 16, 16, 32, 8, 16, 16, 32, 16, 32
Offset: 0

Views

Author

Eric W. Weisstein, Apr 06 2006

Keywords

Comments

Denominator of Zeta'(-2n).
If Gould's sequence A001316 is written as a triangle, this is what the rows converge to. In other words, let S_0 = [2], and construct S_{n+1} by following S_n with 2*S_n. Then this is S_{oo}. - N. J. A. Sloane, May 30 2009
In A160464 the coefficients of the ES1 matrix are defined. This matrix led to the discovery that the successive differences of the ES1[1-2*m,n] coefficients for m = 1, 2, 3, ..., are equal to the values of Zeta'(-2n), see also A094665 and A160468. - Johannes W. Meijer, May 24 2009

Examples

			-zeta(3)/(4*Pi^2), (3*zeta(5))/(4*Pi^4), (-45*zeta(7))/(8*Pi^6), (315*zeta(9))/(4*Pi^8), (-14175*zeta(11))/(8*Pi^10), ...
		

Crossrefs

Programs

  • Maple
    S := [2]; S := [op(S), op(2*S)]; # repeat ad infinitum! - N. J. A. Sloane, May 30 2009
    a := n -> 2^(add(i,i=convert(n,base,2))+1); # Peter Luschny, May 02 2009
  • Mathematica
    Denominator[(2*n)!/2^(2*n + 1)]

Formula

For n>=0, a(n) = 2 * A001316(n). - N. J. A. Sloane, May 30 2009
For n>0, a(n) = 4 * A048896(n). - Peter Luschny, May 02 2009
a(0) = 2; for n>0, write n = 2^i + j where 0 <= j < 2^i; then a(n) = 2*a(j).
a((2*n+1)*2^p-1) = 2^(p+1) * A001316(n), p >= 0. - Johannes W. Meijer, Jan 28 2013

Extensions

Entry revised by N. J. A. Sloane, May 30 2009

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).

A160467 a(n) = 1 if n is odd; otherwise, a(n) = 2^(k-1) where 2^k is the largest power of 2 that divides n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 16, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 32, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 16
Offset: 1

Views

Author

Johannes W. Meijer, May 24 2009, Jun 28 2011

Keywords

Comments

Fifth factor of the row sums A160466 of the Eta triangle A160464.
From Peter Luschny, May 31 2009: (Start)
Let odd(n) be the characteristic function of the odd numbers (A000035) and sigma(n) the number of 1's in binary expansion of n (A000120). Then a(n) = 2^(sigma(n-1) - sigma(n) + odd(n)).
Let B_{n} be the Bernoulli number. Then this sequence is also
a(n) = denominator(4*(4^n-1)*B_{2*n}/n). (End)

Crossrefs

Programs

  • Maple
    nmax:=96: p:= floor(log[2](nmax)): for n from 1 to nmax do a(n):=1 end do: for q from 1 to p do for n from 1 to nmax do if n mod 2^q = 0 then a(n):= 2^(q-1) end if: end do: end do: seq(a(n), n=1..nmax);
    From Peter Luschny, May 31 2009: (Start)
    a := proc(n) local sigma; sigma := proc(n) local i; add(i,i=convert(n,base,2)) end; 2^(sigma(n-1)-sigma(n)+`if`(type(n,odd),1,0)) end: seq(a(n), n=1..96);
    a := proc(n) denom(4*(4^n-1)*bernoulli(2*n)/n) end: seq(a(n), n=1..96); (End)
  • Mathematica
    a[n_] := If[OddQ[n], 1, 2^(IntegerExponent[n, 2] - 1)]; Array[a, 100] (* Amiram Eldar, Jul 02 2020 *)
  • PARI
    A160467(n) = 2^max(valuation(n,2)-1,0); \\ Antti Karttunen, Nov 18 2017, after Max Alekseyev's Feb 09 2011 formula.
    
  • Python
    def A160467(n): return max(1,(n&-n)>>1) # Chai Wah Wu, Jul 08 2022

Formula

a(n) = A026741(n)/A000265(n). - Paul Curtz, Apr 18 2010
a(n) = 2^max(A007814(n) - 1, 0). - Max Alekseyev, Feb 09 2011
a((2*n-1)*2^p) = A011782(p), p >= 0 and n >= 1. - Johannes W. Meijer, Jan 25 2013
a(n) = (1 + A140670(n))/2. - Antti Karttunen, Nov 18 2017
From Amiram Eldar, Dec 31 2022: (Start)
Dirichlet g.f.: zeta(s)*(2^s-2+1/2^s)/(2^s-2).
Sum_{k=1..n} a(k) ~ (1/(4*log(2)))*n*log(n) + (5/8 + (gamma-1)/(4*log(2)))*n, where gamma is Euler's constant (A001620). (End)
a(n) = A006519(n)/gcd(n,2). - Ridouane Oudra, Feb 08 2025
a(n) = A000010(A006519(n)). - Ridouane Oudra, Jul 27 2025

Extensions

Keyword mult added by Max Alekseyev, Feb 09 2011
Name changed by Antti Karttunen, Nov 18 2017

A181988 If n is odd, a(n) = (n+1)/2; if n is even, a(n) = a(n/2) + A003602(n).

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 4, 5, 6, 6, 6, 7, 8, 8, 5, 9, 10, 10, 9, 11, 12, 12, 8, 13, 14, 14, 12, 15, 16, 16, 6, 17, 18, 18, 15, 19, 20, 20, 12, 21, 22, 22, 18, 23, 24, 24, 10, 25, 26, 26, 21, 27, 28, 28, 16, 29, 30, 30, 24, 31, 32, 32, 7, 33, 34, 34, 27, 35, 36
Offset: 1

Views

Author

David Spies, Apr 04 2012

Keywords

Comments

The original definition was "Interleaved multiples of the positive integers".
This sequence is A_1 where A_k = Interleave(k*counting,A_(k+1)).
Show your friends the first 15 terms and see if they can guess term number 16. (If you want to be fair, you might want to show them A003602 first.) - David Spies, Sep 17 2012

Crossrefs

Programs

  • Haskell
    interleave (hdx : tlx) y = hdx : interleave y tlx
    oeis003602 = interleave [1..] oeis003602
    oeis181988 = interleave [1..] (zipWith (+) oeis003602 oeis181988)
    
  • Maple
    nmax:=70: 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) := n*(p+1) od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jan 21 2013
  • Python
    from itertools import count
    def interleave(A):
        A1=next(A)
        A2=interleave(A)
        while True:
            yield next(A1)
            yield next(A2)
    def multiples(k):
        return (k*i for i in count(1))
    interleave(multiples(k) for k in count(1))
    
  • Python
    def A181988(n): return (m:=(n&-n).bit_length())*((n>>m)+1) # Chai Wah Wu, Jul 12 2022
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A181988 n) (if (even? n) (+ (A003602 n) (A181988 (/ n 2))) (A003602 n)))
    ;; Antti Karttunen, Jan 19 2016

Formula

a((2*n-1)*2^p) = n*(p+1), p >= 0.
a(n) = A001511(n)*A003602(n). - L. Edson Jeffery, Nov 21 2015. (Follows directly from above formula.) - Antti Karttunen, Jan 19 2016

Extensions

Definition replaced by a formula provided by David Spies, Sep 17 2012. N. J. A. Sloane, Nov 22 2015

A053381 Maximal number of linearly independent smooth nowhere-zero vector fields on a (2n+1)-sphere.

Original entry on oeis.org

1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 11, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 15, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 9, 1, 3, 1, 7, 1, 3, 1, 8, 1, 3, 1, 7, 1, 3, 1, 11, 1, 3, 1, 7, 1, 3
Offset: 0

Views

Author

Warren D. Smith, Jan 06 2000

Keywords

Comments

The corresponding terms for a 2n-sphere are all 0 ("you can't comb the hair on a billiard ball"). The "3" and "7" come from the quaternions and octonions.
b(n) = a(n-1): b(2^e) = ((e+1) idiv 4) + 2^((e+1) mod 4) - 1, b(p^e) = 1, p>2. - Christian G. Bower, May 18 2005
a(n-1) is multiplicative. - Christian G. Bower, Jun 03 2005

Crossrefs

For another version see A003484. Cf. A189995, A001676.

Programs

  • C
    int MaxLinInd(int n){ /* Returns max # linearly indep smooth nowhere zero * vector fields on S^{n-1}, n=1,2,... */ int b,c,d,rho; b = 0; while((n & 1)==0){ n /= 2; b++; } c = b & 3; d = (b - c)/4; rho = (1 << c) + 8*d; return( rho - 1); }
    
  • C
    int MaxLinInd(int n) { int b = _builtin_ctz(n); return (1<<b%4) + b/4*8 - 1; } /* _Jeremy Tan, Apr 09 2021 */
  • Maple
    with(numtheory): for n from 1 to 601 by 2 do c := irem(ifactors(n+1)[2,1,2],4): d := iquo(ifactors(n+1)[2,1,2],4): printf(`%d,`, 2^c+8*d-1) od:
    nmax:=101: A047530 := proc(n): ceil(n/4) + 2*ceil((n-1)/4) + 4*ceil((n-2)/4) + ceil((n-3)/4) end: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 0 to ceil(nmax/(p+2))+1 do A053381((2*n+1)*2^p-1) := A047530(p+1): od: od: seq(A053381(n), n=0..nmax); # Johannes W. Meijer, Jun 07 2011, revised Jan 29 2013
  • Mathematica
    a[n_] := Module[{b, c, d, rho, n0}, n0 = 2*n; b = 0; While[BitAnd[n0, 1] == 0, n0 /= 2; b++]; c = BitAnd[b, 3]; d = (b - c)/4; rho = 2^c + 8*d; Return[rho - 1]]; Table[a[n], {n, 1, 102}] (* Jean-François Alcover, May 16 2013, translated from C *)

Formula

Let f(n) be the number of linearly independent smooth nowhere-zero vector fields on an n-sphere. Then f(n) = 2^c + 8d - 1 where n+1 = (2a+1) 2^b and b = c+4d and 0 <= c <= 3. f(n) = 0 if n is even.
a((2*n+1)*2^p-1) = A047530(p+1), p >= 0 and n >= 0. a(2*n) = 1, n >= 0, and a(2^p-1) = A047530(p+1), p >= 0. - Johannes W. Meijer, Jun 07 2011
a(n) = A209675(n+1) - 1. - Reinhard Zumkeller, Mar 11 2012
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 10/3. - Amiram Eldar, Nov 29 2022

Extensions

More terms from James Sellers, Jun 01 2000

A085296 Runs of zeros in Catalan sequence modulo 3: consecutive occurrences of binomial(2*k,k)/(k+1) == 0 (mod 3).

Original entry on oeis.org

3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 363, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 1092, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 363, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3, 3279, 3, 12, 3, 39, 3, 12, 3, 120, 3, 12, 3, 39, 3, 12, 3
Offset: 1

Views

Author

Paul D. Hanna, Jun 24 2003

Keywords

Comments

When we prepend a '1' to the Catalan sequence modulo 3, the only nonzero digit strings are {1,1,1,2,2,2} and {2,2,2,1,1,1}; see A085297 for the occurrences of these digit strings.

Crossrefs

Programs

  • Maple
    nmax:=79: 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) := (3^(p+2)-3)/2 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 11 2013
  • Mathematica
    Map[If[First@ # == 0, Length@ #, Nothing] &, SplitBy[Array[Mod[CatalanNumber@ #, 3] &, 10^4], # == 0 &]] (* Michael De Vlieger, Nov 02 2018 *)
  • PARI
    A085296(n) = if(n%2,3,3*(1+A085296(n/2))); \\ Antti Karttunen, Nov 01 2018

Formula

a(2*n-1) = 3, a(2*n) = 3*(a(n)+1), for n >= 1.
a(n) = (9 * 3^A007814(n) - 1) / 2 - 1. - Ralf Stephan, Oct 10 2003
From Johannes W. Meijer, Feb 11 2013: (Start)
a((2*n-1)*2^p) = (3^(p+2)-3)/2, p >= 0 and n >= 1. Observe that a(2^p) = A029858(p+2).
a(2^(p+3)*n + 2^(p+2) - 1) = a(2^(p+2)*n + 2^(p+1) - 1) for p >= 0 and n >= 1. (End)

A008991 Numerators of coefficients in expansion of sqrt(sin(x)/x) (even powers only).

Original entry on oeis.org

1, -1, 1, -1, -67, -1, -64397, -113249, -3679787, -810304169, -6040635661561, -428305999661, -16827172241810597, -5620292762592913, -1550760014054450957, -4168373361283100017, -8551022502876237590534947
Offset: 0

Views

Author

Keywords

Crossrefs

Denominators are in A008992.
Appears in A220002 and A220466.

Programs

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

Formula

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

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
Previous Showing 21-30 of 39 results. Next