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 61-70 of 263 results. Next

A074066 Zigzag modulo 3.

Original entry on oeis.org

1, 4, 3, 2, 7, 6, 5, 10, 9, 8, 13, 12, 11, 16, 15, 14, 19, 18, 17, 22, 21, 20, 25, 24, 23, 28, 27, 26, 31, 30, 29, 34, 33, 32, 37, 36, 35, 40, 39, 38, 43, 42, 41, 46, 45, 44, 49, 48, 47, 52, 51, 50, 55, 54, 53, 58, 57, 56, 61, 60, 59, 64, 63, 62, 67, 66, 65, 70, 69
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 17 2002

Keywords

Comments

Take natural numbers, exchange trisections starting with 2 and 4.

Crossrefs

Programs

  • Haskell
    a074066 n = a074066_list !! (n-1)
    a074066_list = 1 : xs where xs = 4 : 3 : 2 : map (+ 3) xs
    -- Reinhard Zumkeller, Feb 21 2011
  • Mathematica
    a[n_] := n + Mod[n, 3]*(3*Mod[n, 3] - 5); a[1] = 1; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Nov 04 2011 *)
    Join[{1},Flatten[Reverse/@Partition[Range[2,73],3]]] (* Harvey P. Dale, Feb 17 2012 *)

Formula

a(1)=1; for n>0: a(3*n-1) = 3*n+1, a(3*n) = 3*n, a(3*n+1) = 3*n-1.
a(a(n))=n (self-inverse permutation); for n>1: a(n) = n iff n == 0 modulo 3.
For n > 1: a(n) = 3*floor(n/3) + (n mod 3)^2 * (-1)^(n mod 3); a(1)=1.
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 5. - Chai Wah Wu, May 25 2016
For n > 1, a(n) = n - (4/sqrt(3))*sin(2*n*Pi/3). - Wesley Ivan Hurt, Sep 29 2017
g.f.: x + x^2*(4-x-x^2+x^3) / ( (1+x+x^2)*(x-1)^2 ). - R. J. Mathar, May 22 2019
Sum_{n>=1} (-1)^(n+1)/a(n) = log(2) (A002162). - Amiram Eldar, Dec 24 2023

A092486 Take natural numbers, exchange first and third quadrisection.

Original entry on oeis.org

3, 2, 1, 4, 7, 6, 5, 8, 11, 10, 9, 12, 15, 14, 13, 16, 19, 18, 17, 20, 23, 22, 21, 24, 27, 26, 25, 28, 31, 30, 29, 32, 35, 34, 33, 36, 39, 38, 37, 40, 43, 42, 41, 44, 47, 46, 45, 48, 51, 50, 49, 52, 55, 54, 53, 56, 59, 58, 57, 60, 63, 62, 61, 64, 67, 66, 65, 68, 71, 70, 69, 72
Offset: 0

Views

Author

Ralf Stephan, Apr 04 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Flatten[Partition[Range[80],4]/.{a_,b_,c_,d_}->{c,b,a,d}] (* Harvey P. Dale, Aug 12 2012 *)
  • PARI
    { f="b092486.txt"; for (n=0, 5000, a0=4*n + 3; a1=a0 - 1; a2=a1 - 1; a3=a0 + 1; write(f, 4*n, " ", a0); write(f, 4*n+1, " ", a1); write(f, 4*n+2, " ", a2); write(f, 4*n+3, " ", a3); ); } \\ Harry J. Smith, Jun 21 2009

Formula

G.f.: (3-4*x+3*x^2)/((1+x^2)*(1-x)^2).
a(4n) = 4n+3, a(4n+1) = 4n+2, a(4n+2) = 4n+1, a(4n+3) = 4n+4.
a(n) = n+1+i^n+(-i)^n, where i is the imaginary unit. - Bruno Berselli, Feb 08 2011
From Wesley Ivan Hurt, May 09 2021: (Start)
a(n) = 2*a(n-1)-2*a(n-2)+2*a(n-3)-a(n-4).
a(n) = 1 + n + 2*cos(n*Pi/2). (End)
Sum_{n>=0} (-1)^n/a(n) = log(2) (A002162). - Amiram Eldar, Nov 28 2023

A166711 Permutation of the integers: two positives, one negative.

Original entry on oeis.org

0, 1, 2, -1, 3, 4, -2, 5, 6, -3, 7, 8, -4, 9, 10, -5, 11, 12, -6, 13, 14, -7, 15, 16, -8, 17, 18, -9, 19, 20, -10, 21, 22, -11, 23, 24, -12, 25, 26, -13, 27, 28, -14, 29, 30, -15, 31, 32, -16, 33, 34, -17, 35, 36, -18, 37, 38, -19, 39, 40, -20, 41, 42, -21, 43, 44, -22, 45, 46
Offset: 0

Views

Author

Jaume Oliver Lafont, Oct 18 2009

Keywords

Comments

Setting m=2 in
log(m) = Sum_{n>0} (n mod m - (n-1) mod m)/n [1]
yields the sum
log(2) = (1 -1/2) +(1/3 -1/4) +(1/5 -1/6)+...
Substituting every -1/d by 1/d - 2/d we obtain
log(2) = (1+1/2-1)+(1/3+1/4-1/2)+(1/5+1/6-1/3)+...
a(n) is the sequence of denominators of this modified sum with unit numerators, so
Sum_{k>0} 1/a(k) = log(2)
Substituting -1/d by -2/d + 1/d would yield another permutation (one positive, one negative, one positive) with the same sum of inverses.
Similar sequences (m positives, one negative) may be obtained for the logarithm of any integer m>0. A001057 is the case m=1, with sum of inverses log(1).
Equation [1] is a result of expanding log( Sum_{0<=k<=m-1} x^k ) at x=1 (see comment to A061347.)

Crossrefs

Cf. A001057, A002162, A038608. Signed and shifted version of A009947.

Programs

  • Mathematica
    LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 1, 2, -1, 3, 4}, 100] (* G. C. Greubel, May 24 2016 *)
    Join[{0},With[{nn=50},Riffle[Range[nn],Range[-1,-nn/2,-1],3]]] (* Harvey P. Dale, May 15 2023 *)
  • PARI
    a(n)=(2*(n+1)\3)*(1-3/2*!(n%3))
    
  • PARI
    a(n)=if(n>=0,[ -n\3, 2*(n\3)+1, 2*(n\3)+2][n%3+1]) \\ Jaume Oliver Lafont, Nov 14 2009

Formula

G.f.: (x*(1+2*x-x^2+x^3)/((1-x)^2*(1+x+x^2)^2)).
a(0)=0, a(1)=1, a(2)=2, a(3)=-1, a(4)=3, a(5)=4, a(n)=2*a(n-3)-a(n-6), n>=6.
a(n) = (n+1)/3 +2*A049347(n)/3 -(-1)^n*A076118(n+1). - R. J. Mathar, Oct 30 2009

Extensions

Corrected by Jaume Oliver Lafont, Oct 22 2009
frac keyword removed by Jaume Oliver Lafont, Nov 02 2009

A210593 Decimal expansion of the series limit of Sum_{k>=1} (-1)^k*log(k)/k^2.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Mar 23 2012

Keywords

Comments

First derivative of the Dirichlet eta-function eta(s) at s=2.
Phatisena et al. misspell "Euler" and provide the wrong sign and an invalid 7th digit.

Examples

			0.101316578163504501886002882212242183659384776374911163334294247196204...
		

Crossrefs

Cf. A073002, A013661, A002162, A091812 (s=1), A375506 (s=3/2), A349220 (s=3), A349252 (s=4).

Programs

  • Maple
    1/2*log(2)*Zeta(2)+Zeta(1,2)/2 ; evalf(%) ;
  • Mathematica
    N[(1/12)*Pi^2*(Log[4] - 12*Log[Glaisher] + Log[Pi] + EulerGamma), 105] // RealDigits // First (* Jean-François Alcover, Feb 05 2013 *)
  • PARI
    (log(2)*zeta(2)+zeta'(2))/2 \\ Charles R Greathouse IV, Mar 28 2012

Formula

Decimal expansion of (log(2)*zeta(2) + zeta'(2)) / 2.

Extensions

Extended to 105 digits by Jean-François Alcover, Feb 05 2013

A242024 Decimal expansion of Sum_{n>=1} (-1)^(n+1)*6/(n*(n+1)*(n+2)).

Original entry on oeis.org

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

Views

Author

Richard R. Forberg, Aug 11 2014

Keywords

Comments

The sum of the reciprocals of binomial(n,3) for n >= 3 (or A000292(n), for n >= 1) with alternating signs.
Also see A242023.

Examples

			0.8177661667193437130067854...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[Chop[Sum[N[(-1)^(n+1)*6/(n*(n+1)*(n+2)),150],{n,1,Infinity}]], 10,120][[1]] (* Harvey P. Dale, Jun 02 2016 *)
    RealDigits[12*Log[2] - 15/2, 10, 120][[1]] (* Amiram Eldar, Jun 20 2023 *)
  • PARI
    12*log(2) - 15/2 \\ Michel Marcus, Aug 13 2014
    
  • PARI
    sumalt(n=1, (-1)^(n + 1)*6/(n*(n + 1)*(n + 2))) \\ Michel Marcus, Aug 14 2014

Formula

Equals 12*log(2) - 15/2.

Extensions

Prior Mathematica program replaced by Harvey P. Dale, Jun 02 2016

A256128 Decimal expansion of the third Malmsten integral: int_{x=1..infinity} log(log(x))/(1 - x + x^2) dx, negated.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			-0.671719601885874542354405069288779884008802066219356...
		

Crossrefs

Cf. A115252 (first Malmsten integral), A256127 (second Malmsten integral), A256129 (fourth Malmsten integral), A073005 (Gamma(1/3)), A002162 (log 2), A002391 (log 3), A053510 (log Pi), A002194 (sqrt 3).

Programs

  • Maple
    evalf(Pi*(7*log(2)+8*log(Pi)-3*log(3)-12*log(GAMMA(1/3)))/(3*sqrt(3)),120); # Vaclav Kotesovec, Mar 17 2015
  • Mathematica
    RealDigits[Pi*(7*Log[2]+8*Log[Pi]-3*Log[3]-12*Log[Gamma[1/3]])/(3*Sqrt[3]),10,105][[1]] (* Vaclav Kotesovec, Mar 17 2015 *)
  • PARI
    Pi*(7*log(2)+8*log(Pi)-3*log(3)-12*log(gamma(1/3)))/(3*sqrt(3)) \\ Michel Marcus, Mar 18 2015

Formula

Equals integral_{x=0..1} log(log(1/x))/(1 - x + x^2) dx.
Equals integral_{x=0..infinity} log(x)/(1 - 2*cosh(x)) dx.
Equals Pi*(7*log(2) + 8*log(Pi) - 3*log(3) - 12*log(Gamma(1/3)))/(3*sqrt(3)).

A274181 Decimal expansion of Phi(1/2, 2, 2), where Phi is the Lerch transcendent.

Original entry on oeis.org

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

Views

Author

Johannes W. Meijer and N. H. G. Baken, Jun 17 2016, Jul 08 2016

Keywords

Comments

The exponential integral distribution is defined by p(x, m, n, mu) = ((n+mu-1)^m * x^(mu-1) / (mu-1)!) * E(x, m, n), see A163931 and the Meijer link. The moment generating function of this probability distribution function is M(a, m, n, mu) = Sum_{k>=0}(((mu+k-1)!/((mu-1)!*k!)) * ((n+mu-1) / (n+mu+k-1))^m * a^k).
In the special case that mu=1 we get p(x, m, n, mu=1) = n^m * E(x, m, n) and M(a, m, n, mu=1) = n^m * Phi(a, m, n), with Phi the Lerch transcendent. If n=1 and mu=1 we get M(a, m, n=1, mu=1) = polylog(m, a)/a = Li_m(a)/a.

Examples

			0.32896210586005002361062528063872043497679389922...
		

References

  • William Feller, An introduction to probability theory and its applications, Vol. 1. p. 285, 1968.

Crossrefs

Cf. A163931, A002162 (Phi(1/2, 1, 1)/2), A076788 (Phi(1/2, 2, 1)/2), A112302, A008276.

Programs

  • Maple
    Digits := 101; c := evalf(LerchPhi(1/2, 2, 2));
  • Mathematica
    N[HurwitzLerchPhi[1/2, 2, 2], 25] (* G. C. Greubel, Jun 19 2016 *)
  • PARI
    Pi^2/3 - 2*log(2)^2 - 2 \\ Altug Alkan, Jul 08 2016
    
  • PARI
    lerchphi(.5,2,2) \\ Charles R Greathouse IV, Jan 30 2025
    
  • Python
    from mpmath import mp, lerchphi
    mp.dps=102
    print([int(d) for d in list(str(lerchphi(1/2, 2, 2))[2:-1])]) # Indranil Ghosh, Jul 04 2017

Formula

Equals Phi(1/2, 2, 2) with Phi the Lerch transcendent.
Equals Sum_{k>=0}(1/((2+k)^2*2^k)).
Equals 4 * polylog(2, 1/2) - 2.
Equals Pi^2/3 - 2*log(2)^2 - 2.
Equals Integral_{x=0..oo} x*exp(-x)/(exp(x)-1/2) dx. - Amiram Eldar, Aug 24 2020

A016643 Decimal expansion of log(20).

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			2.995732273553990993435223576142540775676601622989028230154007910460966...
		

References

  • Milton Abramowitz and Irene A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 2.

Crossrefs

Cf. A016448 (continued fraction).

Programs

  • Mathematica
    RealDigits[Log[20], 10, 150][[1]] (* Stefan Steinerberger, Apr 09 2006 *)
  • PARI
    default(realprecision, 20080); x=log(20); for (n=1, 20000, d=floor(x); x=(x-d)*10; write("b016643.txt", n, " ", d)); \\ Harry J. Smith, May 17 2009, corrected May 20 2009

Formula

Equals A002162 + A002392. - R. J. Mathar, Aug 13 2024

Extensions

More terms from Stefan Steinerberger, Apr 09 2006

A048784 a(n) = tau(binomial(2*n,n)), where tau = number of divisors (A000005).

Original entry on oeis.org

1, 2, 4, 6, 8, 18, 24, 32, 48, 48, 48, 128, 96, 192, 384, 480, 384, 768, 1152, 1536, 2304, 2048, 2048, 3840, 3456, 4608, 6144, 3840, 8192, 20480, 10240, 12288, 18432, 36864, 36864, 49152, 24576, 32768, 98304, 92160, 73728, 245760, 262144
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A048784 := proc(n)
        numtheory[tau](binomial(2*n,n)) ;
    end proc:
    seq(A048784(n),n=0..30) ; # R. J. Mathar, Jul 12 2024
  • Mathematica
    f[n_] := DivisorSigma[0, Binomial[2 n, n]]; Table[f@n, {n, 0, 42}] (* Robert G. Wilson v, Apr 08 2009 *)
  • PARI
    fv(n,p)=my(s);while(n\=p,s+=n);s
    a(n)=my(s=1);forprime(p=2,2*n,s*=fv(2*n,p)-2*fv(n,p)+1);s \\ Charles R Greathouse IV, Aug 21 2013

Formula

a(n) = A000005(A000984(n)). - Michel Marcus, Aug 21 2013
log(a(n)) = log(2) * (pi(2*n)-pi(n)) + log(2) * (n/log(n)) * Sum_{k=0..T} c_k/log(n)^k + O(n/log(n)^(T+2)) for any T >= 0, where c_k = Sum_{m>=1} Integral_{m+1/2..m+1} log(t)^m/t^2 dt. In particular for T = 0, log(a(n)) = 2 * log(2)^2 * (n/log(n)) + O(n/log(n)^2) (Fedorov, 2013). - Amiram Eldar, Dec 10 2024

A067882 Factorial expansion of log(2) = Sum_{n>=1} a(n)/n!.

Original entry on oeis.org

0, 1, 1, 0, 3, 1, 0, 3, 6, 2, 5, 4, 6, 11, 4, 11, 5, 12, 3, 5, 13, 2, 22, 6, 22, 13, 20, 7, 1, 0, 1, 20, 2, 6, 4, 1, 18, 14, 35, 2, 11, 31, 16, 19, 42, 36, 41, 0, 14, 31, 25, 43, 4, 13, 34, 53, 50, 57, 2, 30, 12, 25, 45, 24, 2, 39, 57, 51, 30, 41, 65, 15, 9, 55, 23, 4, 35, 18, 77, 43
Offset: 1

Views

Author

Benoit Cloitre, Mar 10 2002

Keywords

Examples

			log(2) = 0 + 1/2! + 1/3! + 0/4! + 3/5! + 1/6! + 0/7! + 3/8! + 6/9! + ...
		

Crossrefs

Cf. A002162 (decimal expansion), A016730 (continued fraction).
Cf. A322334 (log(3)), A322333 (log(5)), A068460 (log(7)), A068461 (log(11)).

Programs

  • Magma
    SetDefaultRealField(RealField(250)); [Floor(Log(2))] cat [Floor(Factorial(n)*Log(2)) - n*Floor(Factorial((n-1))*Log(2)) : n in [2..80]]; // G. C. Greubel, Nov 26 2018
    
  • Mathematica
    With[{b = Log[2]}, Table[If[n == 1, Floor[b], Floor[n!*b] - n*Floor[(n - 1)!*b]], {n, 1, 100}]] (* G. C. Greubel, Nov 26 2018 *)
  • PARI
    default(realprecision, 250); b = log(2); for(n=1, 80, print1(if(n==1, floor(b), floor(n!*b) - n*floor((n-1)!*b)), ", ")) \\ G. C. Greubel, Nov 26 2018
    
  • Sage
    def A067882(n):
        if (n==1): return floor(log(2))
        else: return expand(floor(factorial(n)*log(2)) - n*floor(factorial(n-1)*log(2)))
    [A067882(n) for n in (1..80)] # G. C. Greubel, Nov 26 2018

Formula

a(n) = floor(n!*log(2)) - n*floor((n-1)!*log(2)).
Previous Showing 61-70 of 263 results. Next