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.

User: R. K. Guy

R. K. Guy's wiki page.

R. K. Guy has authored 425 sequences. Here are the ten most recent ones:

A259472 Coefficients in an asymptotic expansion of A003319(n)/n! in falling factorials.

Original entry on oeis.org

1, -2, -1, -4, -19, -110, -745, -5752, -49775, -476994, -5016069, -57462828, -712732987, -9521244982, -136356161873, -2084860795232, -33907076207495, -584602069590058, -10652917092110429, -204604743619641620, -4131502481607654739, -87507494737954740126
Offset: 0

Author

N. J. A. Sloane, Jul 03 2015, following a suggestion from R. K. Guy, Apr 29 1974

Keywords

Examples

			A003319(n) / n! ~ 1 - 2/n - 1/(n*(n-1)) - 4/(n*(n-1)*(n-2)) - 19/(n*(n-1)*(n-2)*(n-3)) - 110/(n*(n-1)*(n-2)*(n-3)*(n-4)) - 745/(n*(n-1)*(n-2)*(n-3)*(n-4)*(n-5)) -  ... [coefficients are A259472]
A003319(n) / n! ~ 1 - 2/n - 1/n^2 - 5/n^3 - 32/n^4 - 253/n^5 - 2381/n^6 - ... [coefficients are A260503]
		

Programs

  • Mathematica
    CoefficientList[Series[1/Sum[k! * x^k, {k, 0, 20}]^2, {x, 0, 20}], x] (* Vaclav Kotesovec, Aug 03 2015 *)
    CoefficientList[Assuming[Element[x,Reals], Series[E^(2/x) * x^2 / ExpIntegralEi[1/x]^2, {x,0,25}]], x] (* Vaclav Kotesovec, Aug 03 2015 *)

Formula

From Vaclav Kotesovec, Aug 12 2015: (Start)
G.f.: (1/Sum(k! x^k))^2.
Expansion of (1-g(x))^2, where g(x) is the g.f. of A003319.
a(n) ~ -2*n! * (1 - 3/n - 4/n^3 - 33/n^4 - 283/n^5 - 2785/n^6 - 31291/n^7 - 395360/n^8 - 5544754/n^9 - 85427259/n^10), for coefficients see A261214.
For n>0, a(n) = A059439(n) - 2*A003319(n).
For n>0, a(n) = Sum_{k=1..n} A260503(k) * Stirling1(n-1, k-1).
(End)

Extensions

More terms from Vaclav Kotesovec, Aug 01 2015
New name from Vaclav Kotesovec, Aug 12 2015
Entry revised by Vaclav Kotesovec, Aug 12 2015

A242497 Sides of (Heronian) triangles where sides are consecutive integers and area is an integer.

Original entry on oeis.org

3, 4, 5, 13, 14, 15, 51, 52, 53, 193, 194, 195, 723, 724, 725, 2701, 2702, 2703, 10083, 10084, 10085, 37633, 37634, 37635, 140451, 140452, 140453, 524173, 524174, 524175, 1956243, 1956244, 1956245, 7300801, 7300802, 7300803, 27246963, 27246964, 27246965
Offset: 1

Author

Keywords

Comments

Let the edge lengths of the triangle be 2x-1, 2x, 2x+1 so that area = sqrt{3x * x * (x-1) * (x+1)} and we need x^2 - 1 to be of shape 3y^2. That is, x/y is an even rank convergent to the continued fraction of sqrt(3) and x is A001075.
The intermediate length sides are given by A003500(n), n >= 1. Note that A003500(0) = 2 corresponds to the degenerate (Heronian) triangle with sides {1, 2, 3} and area 0. - Daniel Forgues, May 28 2014

References

  • Nakane Genkei (Nakane the Elder), Shichijo Beki Yenshiki, 1691.

Crossrefs

A016064 is the main entry for this sequence.

Programs

  • Mathematica
    LinearRecurrence[{-1,-1,4,4,4,-1,-1,-1},{3,4,5,13,14,15,51,52},40] (* Harvey P. Dale, May 04 2021 *)
  • PARI
    Vec((-3*x^7 - 5*x^6 - 6*x^5 + 4*x^4 + 10*x^3 + 12*x^2 + 7*x + 3)/(x^8 + x^7+ x^6 - 4*x^5 - 4*x^4 - 4*x^3 + x^2 + x + 1)+O(x^99))

Formula

G.f.: (-3*x^7 - 5*x^6 - 6*x^5 + 4*x^4 + 10*x^3 + 12*x^2 + 7*x + 3)/ ((1+x+x^2)*(1-4*x^3+x^6)). - R. J. Mathar, May 30 2023

A214525 a(n) = 7*a(n-1) - 23*a(n-2) + 49*a(n-3) - 49*a(n-4) with a(0)=0, a(1)=1, a(2)=7, a(3)=19.

Original entry on oeis.org

0, 1, 7, 19, 21, 4, 133, 937, 2667, 3439, 2128, 20569, 132867, 392743, 596869, 647596, 3539109, 19881229, 60254719, 106198903, 158297664, 643809889, 3117087967, 9564827611, 19050869061, 34555674196, 119658973525, 507648339217, 1561117435059, 3421971910543
Offset: 0

Author

N. J. A. Sloane, Aug 07 2012, based on a posting to the Sequence Fans Mailing List by R. K. Guy, Jul 29 2009

Keywords

Comments

This is a divisibility sequence.
It factors over the Eisenstein-Jacobi integers into two 2nd order sequences (with w^3 = 1): 0, 1, w+3, 3w+5, 4w+5, 2, -12w-1, -29w+3, ... and its conjugate (replace w by w^2). The relation for this is a(n) = (w+3)a(n-1) - (2w+3)a(n-2).

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 0, a[1] == 1, a[2] == 7, a[3] == 19, a[n] == 7 a[n - 1] - 23 a[n - 2] + 49 a[n - 3] - 49 a[n - 4]}, a[n], {n, 0, 29}] (* Bruno Berselli, Aug 08 2012 *)
    LinearRecurrence[{7,-23,49,-49},{0,1,7,19},30] (* Harvey P. Dale, Jan 02 2023 *)

Formula

G.f.: x*(1-7*x^2) /(1-7*x+23*x^2-49*x^3+49*x^4). - Bruno Berselli, Aug 08 2012

Extensions

a(9) corrected by Bruno Berselli, Aug 08 2012

A212804 Expansion of (1 - x)/(1 - x - x^2).

Original entry on oeis.org

1, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155, 165580141, 267914296, 433494437, 701408733, 1134903170, 1836311903, 2971215073, 4807526976
Offset: 0

Author

N. J. A. Sloane, May 27 2012, following a suggestion from R. K. Guy

Keywords

Comments

A variant of the Fibonacci number A000045.
Number of compositions of n into parts >= 2. - Joerg Arndt, Aug 13 2012
From Petros Hadjicostas, Jan 08 2019: (Start)
For n >= 0, a(n) is the number of unmarked circular binary words (necklaces) of length n+1 with exactly one occurrence of the pattern 00 (provided we allow the strings of length 1, i.e., 0 and 1, to wrap around themselves on a circle to form strings of length 2). See the comments for array A320341.
Using MacMahon's bijection between necklaces and cyclic compositions, we conclude that a(n) is also the number of (unmarked) cyclic compositions of n+1 with exactly one 1.
Removing the single 1 from each cyclic composition of n+1, we get all linear compositions of n with each part >= 2, which is what is stated above by Joerg Arndt. (End)

Examples

			From _Petros Hadjicostas_, Jan 08 2019: (Start)
For n = 6, we have a(6) = 5. The binary necklaces of length n+1 = 7 with exactly one occurrence of 00 are as follows: 0011111, 0010111, 0011011, 0011101, and 0010101.
The corresponding cyclic compositions of n+1 = 7 with exactly one 1 (under MacMahon's bijection) are as follows: 1+6, 1+2+4, 1+3+3, 1+4+2, 1+2+2+2.
Of course, removing the 1 from the cyclic composition, we get a (linear) composition of n = 6 with parts >= 2 (as stated above by _Joerg Arndt_): 6, 2+4, 3+3, 4+2, 2+2+2. (For linear compositions, 2+4 is not the same as 4+2.) (End)
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 84.

Crossrefs

Cf. A000045, A105809 (alternating row sums).
Column k=1 of A320341.

Programs

Formula

G.f.: 1/(1 - (Sum_{k >= 2} x^k)). - Joerg Arndt, Aug 13 2012
a(n) = Fibonacci(n+1) - Fibonacci(n). - Arkadiusz Wesolowski, Oct 29 2012
G.f.: 1 - x*Q(0) where Q(k) = 1 - (1 + x)/(1 - x/(x - 1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Mar 06 2013
G.f.: 3*x^3/(3*x - Q(0)) - x^2 + 1, where Q(k) = 1 - 1/(4^k - x*16^k/(x*4^k - 1/(1 + 1/(2*4^k - 4*x*16^k/(2*x*4^k + 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 21 2013
G.f.: G(0)*(1 - x)/(2 - x), where G(k) = 1 + 1/(1 - (x*(5*k - 1))/((x*(5*k + 4)) - 2/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Jun 15 2013
G.f.: 1 + Q(0)*x^2/2, where Q(k) = 1 + 1/(1 - x*(2*k + 1 + x)/( x*(2*k + 2 + x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 29 2013
a(n) = Sum_{k=0..n} (C(k, n-k) - C(k, n-k-1)). - Peter Luschny, Oct 01 2014
a(n) = (2^(-1-n)*((1 - sqrt(5))^n*(1 + sqrt(5)) + (-1 + sqrt(5))*(1 + sqrt(5))^n))/sqrt(5). - Colin Barker, Sep 25 2016
a(n) = A000045(n-1), n >= 1. - R. J. Mathar, Apr 14 2018
E.g.f.: exp((1 - sqrt(5))*x/2)*(3 + sqrt(5) + 2*exp(sqrt(5)*x))/(5 + sqrt(5)). - Stefano Spezia, Mar 09 2025

A171099 a(n) = number of solutions (x,y) (with 0 <= x <= y) to x*(x+1)/2 + y*(y+1)/2 = n!.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Sep 24 2010, based on a posting by R. K. Guy to the Sequence Fans Mailing List, Sep 10 2010

Keywords

Examples

			Initial solutions: (x,y,n) = (0,1,0), (0,1,1), (1,1,2), (0,3,3), (2,2,3), (2,6,4), (0,15,5), (5,14,5), (45,89,7), (89,269,8), (210,825,9), (760,2610,10), (1770,2030,10), none for n = 11 or 12, one for n = 13 (71504,85680,13) (found by _Ed Pegg Jr_), etc.
		

Crossrefs

Cf. A000161, A152089 (n for which no solutions exist), A180590 (n for which solutions exist).

Formula

a(n) = A000161(8*n! + 2). - Max Alekseyev, Dec 12 2011

Extensions

Corrected and extended (with data from Georgi Guninski, at the suggestion of N. J. A. Sloane) by D. S. McNeil, Sep 26 2010

A171064 G.f.: -x*(x-1)*(1+x)/(1-x-7*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 7, 15, 64, 175, 631, 1905, 6433, 20224, 66529, 212625, 692119, 2226799, 7217728, 23284815, 75343591, 243328225, 786800449, 2542156800, 8217744577, 26556314401, 85835882791, 277405671375, 896595420736, 2897714688751
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=7 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 7]; [n le 4 select I[n] else Self(n-1) + 7*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 7*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
    LinearRecurrence[{1,7,1,-1},{0,1,1,7},30] (* Harvey P. Dale, Nov 15 2020 *)

Formula

a(n) = +a(n-1) +7*a(n-2) +a(n-3) -a(n-4).
The roots (r1..r4) of the characteristic polynomials for this "family" of sequences have the following form (not simplified) for k= 1,2,3,4,5,6.... r1=(sqrt(4*k+10+2*sqrt(4*k+9))+sqrt(4*k-6+2*sqrt(4*k+9)))/4. r2=(sqrt(4*k+10+2*sqrt(4*k+9))-sqrt(4*k-6+2*sqrt(4*k+9)))/4. r3=(-sqrt(4*k+10-2*sqrt(4*k+9))-sqrt(4*k-6-2*sqrt(4*k+9)))/4. r4=(-sqrt(4*k+10-2*sqrt(4*k+9))+sqrt(4*k-6-2*sqrt(4*k+9)))/4. For k=1,2,3, r3 and r4 are complex . Closed-form (not simplified) is as follows for all k (note:for k1-k3 set r3 and r4 =0 and round a(n) to nearest integer): a(n)=sqrt(4*k+9)/(4*k+9)*(((r1)^n+(r2)^n)-((r3)^n+(r4)^n)). [Tim Monahan, Sep 17 2011]

A171065 G.f. -x*(x-1)*(1+x)/(1-x-8*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 8, 17, 81, 224, 881, 2737, 9928, 32481, 113761, 380800, 1313441, 4441121, 15215688, 51677297, 176530481, 600723424, 2049428881, 6980069457, 23799693448, 81088954561, 276417142721, 941948403200, 3210574806081
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=8 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).
This is the case P1 = 1, P2 = -10, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 31 2014

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6). A100047.

Programs

  • Magma
    I:=[0, 1, 1, 8]; [n le 4 select I[n] else Self(n-1) + 8*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 8*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
    LinearRecurrence[{1,8,1,-1},{0,1,1,8},30] (* Harvey P. Dale, Dec 27 2017 *)

Formula

a(n)= +a(n-1) +8*a(n-2) +a(n-3) -a(n-4).
From Peter Bala, Mar 31 2014: (Start)
a(n) = ( T(n,alpha) - T(n,beta) )/(alpha - beta), where alpha = (1 + sqrt(41))/4 and beta = (1 - sqrt(41))/4 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, 5/2; 1, 1/2].
a(n) = U(n-1,i*(1 + sqrt(2))/2)*U(n-1,i*(1 + sqrt(2))/2), where U(n,x) denotes the Chebyshev polynomial of the second kind.
See the remarks in A100047 for the general connection between Chebyshev polynomials and 4th-order linear divisibility sequences. (End)

A171066 G.f. -x*(x-1)*(1+x)/(1-x-9*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 9, 19, 100, 279, 1189, 3781, 14661, 49600, 184141, 641421, 2333629, 8240959, 29700900, 105561739, 378777169, 1350292761, 4835148121, 17260998400, 61748847081, 220582688041, 788748162049, 2818480203099, 10076047502500
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=9 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 9]; [n le 4 select I[n] else Self(n-1) + 9*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 9*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)

Formula

a(n)= +a(n-1) +9*a(n-2) +a(n-3) -a(n-4)

A171067 G.f. -x*(x-1)*(1+x)/((x^2+3*x+1)*(x^2-4*x+1)).

Original entry on oeis.org

0, 1, 1, 10, 21, 121, 340, 1561, 5061, 20890, 72721, 285121, 1028160, 3931201, 14425201, 54480250, 201635301, 756931801, 2813339860, 10529812921, 39218508021, 146573045290, 546474598561, 2040893746561, 7612994269440
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=10 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 10]; [n le 4 select I[n] else Self(n-1) + 10*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/((x^2 + 3*x + 1)*(x^2 - 4*x + 1)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
    LinearRecurrence[{1,10,1,-1},{0,1,1,10},30] (* Harvey P. Dale, Dec 24 2017 *)

Formula

a(n)= +a(n-1) +10*a(n-2) +a(n-3) -a(n-4).
a(n)= -(-1)^n*A005248(n)/7 + 2*A001075(n)/7.

A171068 G.f. -x*(x-1)*(1+x)/(1-x-11*x^2-x^3+x^4).

Original entry on oeis.org

0, 1, 1, 11, 23, 144, 407, 2003, 6601, 28897, 103104, 425569, 1582009, 6337475, 24062039, 94930704, 364368599, 1426330907, 5505254161, 21464332033, 83084090112, 323270665729, 1253154734833, 4870751815931, 18895640474711
Offset: 0

Author

R. J. Mathar, at the request of R. K. Guy, Sep 03 2010

Keywords

Comments

The member k=11 of a family of sequences starting 0,1,1,k with recurrence a(n) = a(n-1)+k*a(n-2)+a(n-3)-a(n-4).

Crossrefs

Cf. A116201 (k=1), A105309 (k=2), A152090 (k=3), A007598 (k=4), A005178 (k=5), A003757 (k=6).

Programs

  • Magma
    I:=[0, 1, 1, 11]; [n le 4 select I[n] else Self(n-1) + 11*Self(n-2) + Self(n-3) - Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 19 2012
  • Mathematica
    CoefficientList[Series[-x*(x - 1)*(1 + x)/(1 - x - 11*x^2 - x^3 + x^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)

Formula

a(n)= +a(n-1) +11*a(n-2) +a(n-3) -a(n-4).