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 11-20 of 20 results.

A160444 Expansion of g.f.: x^2*(1 + x - x^2)/(1 - 2*x^2 - 2*x^4).

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 6, 10, 16, 28, 44, 76, 120, 208, 328, 568, 896, 1552, 2448, 4240, 6688, 11584, 18272, 31648, 49920, 86464, 136384, 236224, 372608, 645376, 1017984, 1763200, 2781184, 4817152, 7598336, 13160704, 20759040, 35955712, 56714752
Offset: 1

Views

Author

Willibald Limbrunner (w.limbrunner(AT)gmx.de), May 14 2009

Keywords

Comments

This sequence is the case k=3 of a family of sequences with recurrences a(2*n+1) = a(2*n) + a(2*n-1), a(2*n+2) = k*a(2*n-1) + a(2*n), a(1)=0, a(2)=1. Values of k, for k >= 0, are given by A057979 (k=0), A158780 (k=1), A002965 (k=2), this sequence (k=3). See "Family of sequences for k" link for other connected sequences.
It seems that the ratio of two successive numbers with even, or two successive numbers with odd, indices approaches sqrt(k) for these sequences as n-> infinity.
This algorithm can be found in a historical figure named "Villardsche Figur" of the 13th century. There you can see a geometrical interpretation.

Crossrefs

Programs

  • Magma
    I:=[0,1,1,1]; [n le 4 select I[n] else 2*(Self(n-2) +Self(n-4)): n in [1..40]]; // G. C. Greubel, Feb 18 2023
    
  • Mathematica
    LinearRecurrence[{0,2,0,2}, {0,1,1,1}, 40] (* G. C. Greubel, Feb 18 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A160444
        if (n<5): return ((n+1)//3)
        else: return 2*(a(n-2) + a(n-4))
    [a(n) for n in range(1, 41)] # G. C. Greubel, Feb 18 2023

Formula

a(n) = 2*a(n-2) + 2*a(n-4).
a(2*n+1) = A002605(n).
a(2*n) = A026150(n-1).

Extensions

Edited by R. J. Mathar, May 14 2009

A111015 Primes in A002535.

Original entry on oeis.org

11, 31, 601, 10711, 45281, 3245551, 4057691201, 87818089575031, 813086055916584907683448771376472778745411281, 16071419731004292876206308878779566599797733387541964081866111137961, 2259503969983505641049567911781316556859822340375755577282633545849516496717511
Offset: 1

Views

Author

Cino Hilliard, Oct 02 2005

Keywords

Comments

Original name: Starting with the fraction 1/1, this sequence gives the prime numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 10 times bottom to get the new top.
Conjecture: Starting with 1/1, there are infinitely many primes in the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 2k times bottom to get the new top, for k>=1.
a(12) has 5304 digits and is not included here. - Bill McEachen, Jan 22 2023
a(12) = A002535(8563) = 1.0733...*10^5303. - Amiram Eldar, Jun 30 2024

Examples

			The raw ratios begin 1/1, 11/2, 31/13, 161/44, 601/205, ... = A002535/A002534. Among the numerators, 11, 31, and 601 are primes and are the first three terms here.
		

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.

Crossrefs

Programs

  • Mathematica
    Select[Numerator/@NestList[(10Denominator[#]+Numerator[#])/ (Denominator[#]+ Numerator[#])&,1/1,200],PrimeQ] (* Harvey P. Dale, Sep 15 2011 *)
    Select[LinearRecurrence[{2, 9}, {1, 1}, 150], PrimeQ] (* Amiram Eldar, Jun 30 2024 *)
  • PARI
    \\ k=mult,typ=1 num,2 denom. output prime num or denom
    primenum(n,k,typ) = {local(a,b,x,tmp,v); a=1;b=1; for(x=1,n, tmp=b; b=a+b; a=k*tmp+a; if(typ==1,v=a,v=b); if(isprime(v), print1(v, ", "); ) ); print(); print(a/b+.)}
    primenum(100, 10, 1)
    
  • Python
    from sympy import isprime
    from itertools import islice
    from fractions import Fraction
    def agen(): # generator of terms
        f = Fraction(1, 1)
        while True:
            n, d = f.numerator + 10*f.denominator, f.numerator + f.denominator
            if isprime(n): yield n
            f = Fraction(n, d)
    print(list(islice(agen(), 11))) # Michael S. Branicky, Jan 23 2023

Formula

Given t(0)=1, b(0)=1 then for i = 1, 2, ..., t(i)/b(i) = (t(i-1) + 10*b(i-1)) /(t(i-1) + b(i-1)), and sequence consists of the t(i) that are prime.

Extensions

a(11) from Michel Marcus, Jan 23 2023
Name simplified by Sean A. Irvine, Feb 25 2023

A123007 Expansion of x*(1+x)/(1 -2*x -9*x^2).

Original entry on oeis.org

1, 3, 15, 57, 249, 1011, 4263, 17625, 73617, 305859, 1274271, 5301273, 22070985, 91853427, 382345719, 1591372281, 6623856033, 27570062595, 114754829487, 477640222329, 1988073910041, 8274909821043, 34442484832455
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 23 2006

Keywords

Crossrefs

Cf. A002534.

Programs

  • Magma
    [n le 2 select 3^(n-1) else 2*Self(n-1) +9*Self(n-2): n in [1..30]]; // G. C. Greubel, Jul 12 2021
    
  • Mathematica
    M:= {{0, 3}, {3, 2}}; v[1]= {1, 1}; v[n_]:= v[n]= M.v[n-1];
    Table[v[n][[1]], {n,30}]
    Rest[CoefficientList[Series[(x(x+1))/(1-2x-9x^2),{x,0,30}],x]] (* or *) LinearRecurrence[{2,9},{1,3},30] (* Harvey P. Dale, Aug 07 2015 *)
  • Sage
    [(3*i)^(n-2)*(3*i*chebyshev_U(n-1, -i/3) + chebyshev_U(n-2, -i/3)) for n in [1..30]] # G. C. Greubel, Jul 12 2021

Formula

From Philippe Deléham, Oct 18 2006: (Start)
a(n) = 2*a(n-1) + 9*a(n-2) for n > 2.
G.f.: x*(1+x)/(1 -2*x -9*x^2). (End)
a(n) = A002534(n) + A002534(n-1). - R. J. Mathar, Sep 17 2013
a(n) = (3*i)^(n-2)*(3*i*chebyshev_U(n-1, -i/3) + chebyshev_U(n-2, -i/3)). - G. C. Greubel, Jul 12 2021

Extensions

Definition replaced with the Deléham formula by R. J. Mathar, Sep 17 2013

A123008 Expansion of x*(1 + 3*x)/(1 - 2*x - 25*x^2).

Original entry on oeis.org

1, 5, 35, 195, 1265, 7405, 46435, 277995, 1716865, 10383605, 63688835, 386967795, 2366156465, 14406507805, 87966927235, 536096549595, 3271366280065, 19945146300005, 121674449601635, 741977556703395, 4525816353447665
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 23 2006

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 5^(n-1) else 2*Self(n-1) + 25*Self(n-2): n in [1..31]]; // G. C. Greubel, Jul 13 2021
    
  • Mathematica
    M:= {{0, 5}, {5, 2}}; v[1] = {1, 1}; v[n_]:= v[n]= M.v[n-1];
    Table[v[n][[1]], {n, 30}]
  • Sage
    [(5*i)^(n-2)*(3*chebyshev_U(n-2, -i/5) + 5*i*chebyshev_U(n-1, -i/5)) for n in (1..30)] # G. C. Greubel, Jul 13 2021

Formula

From Colin Barker, Oct 19 2012: (Start)
a(n) = 2*a(n-1) + 25*a(n-2) for n>2.
G.f.: x*(1+3*x)/(1-2*x-25*x^2). (End)
a(n) = (5*i)^(n-2)*(3*ChebyshevU(n-2, -i/5) + 5*i*ChebyshevU(n-1, -i/5)). - G. C. Greubel, Jul 13 2021

Extensions

Sequence edited by Joerg Arndt and Colin Barker, Oct 19 2012

A123009 Expansion of x*(1 + 5*x)/(1 - 2*x - 49*x^2).

Original entry on oeis.org

1, 7, 63, 469, 4025, 31031, 259287, 2039093, 16783249, 133482055, 1089343311, 8719307317, 70816436873, 568878932279, 4607763271335, 37090594224341, 299961588744097, 2417362294480903, 19532842437422559, 157516437304409365
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Sep 23 2006

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 7^(n-1) else 2*Self(n-1) + 25*Self(n-2): n in [1..31]]; // G. C. Greubel, Jul 13 2021
    
  • Mathematica
    M:= {{0, 7}, {7, 2}}; v[1]= {1, 1}; v[n_]:= v[n]= M.v[n-1];
    Table[v[n][[1]], {n, 30}]
  • Sage
    [(7*i)^(n-2)*(5*chebyshev_U(n-2, -i/7) + 7*i*chebyshev_U(n-1, -i/7)) for n in (1..30)] # G. C. Greubel, Jul 13 2021

Formula

From Colin Barker, Oct 19 2012: (Start)
a(n) = 2*a(n-1) + 49*a(n-2) for n>2.
G.f.: x*(1 +5*x)/(1 -2*x -49*x^2). (End)
a(n) = (7*i)^(n-2)*(5*ChebyshevU(n-2, -i/7) + 7*i*ChebyshevU(n-1, -i/7)). - G. C. Greubel, Jul 13 2021

Extensions

Sequence edited by Joerg Arndt and Colin Barker, Oct 19 2012

A143685 Pascal-(1,9,1) array.

Original entry on oeis.org

1, 1, 1, 1, 11, 1, 1, 21, 21, 1, 1, 31, 141, 31, 1, 1, 41, 361, 361, 41, 1, 1, 51, 681, 1991, 681, 51, 1, 1, 61, 1101, 5921, 5921, 1101, 61, 1, 1, 71, 1621, 13151, 29761, 13151, 1621, 71, 1, 1, 81, 2241, 24681, 96201, 96201, 24681, 2241, 81, 1, 1, 91, 2961, 41511, 239241, 460251, 239241, 41511, 2961, 91, 1
Offset: 0

Views

Author

Paul Barry, Aug 28 2008

Keywords

Examples

			Square array begins as:
  1,  1,    1,     1,      1,       1,        1, ... A000012;
  1, 11,   21,    31,     41,      51,       61, ... A017281;
  1, 21,  141,   361,    681,    1101,     1621, ...
  1, 31,  361,  1991,   5921,   13151,    24681, ...
  1, 41,  681,  5921,  29761,   96201,   239241, ...
  1, 51, 1101, 13151,  96201,  460251,  1565301, ...
  1, 61, 1621, 24681, 239241, 1565301,  7272861, ...
Antidiagonal triangle begins as:
  1;
  1,  1;
  1, 11,    1;
  1, 21,   21,     1;
  1, 31,  141,    31,     1;
  1, 41,  361,   361,    41,     1;
  1, 51,  681,  1991,   681,    51,    1;
  1, 61, 1101,  5921,  5921,  1101,   61,  1;
  1, 71, 1621, 13151, 29761, 13151, 1621, 71, 1;
		

Crossrefs

Pascal (1,m,1) array: A123562 (m = -3), A098593 (m = -2), A000012 (m = -1), A007318 (m = 0), A008288 (m = 1), A081577 (m = 2), A081578 (m = 3), A081579 (m = 4), A081580 (m = 5), A081581 (m = 6), A081582 (m = 7), A143683 (m = 8), this sequence (m = 9).

Programs

  • Magma
    A143685:= func< n,k,q | (&+[Binomial(k, j)*Binomial(n-j, k)*q^j: j in [0..n-k]]) >;
    [A143685(n,k,9): k in [0..n], n in [0..12]]; // G. C. Greubel, May 29 2021
    
  • Mathematica
    Table[Hypergeometric2F1[-k, k-n, 1, 10], {n,0,12}, {k,0,n}]//Flatten (* Jean-François Alcover, May 24 2013 *)
  • Sage
    flatten([[hypergeometric([-k, k-n], [1], 10).simplify() for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 29 2021

Formula

Square array: T(n, k) = T(n, k-1) + 9*T(n-1, k-1) + T(n-1, k) with T(n, 0) = T(0, k) = 1.
Number triangle: T(n,k) = Sum_{j=0..n-k} binomial(n-k,j)*binomial(k,j)*10^j.
Riordan array (1/(1-x), x*(1+9*x)/(1-x)).
T(n, k) = Hypergeometric2F1([-k, k-n], [1], 10). - Jean-François Alcover, May 24 2013
Sum_{k=0..n} T(n, k) = A002534(n+1). - G. C. Greubel, May 29 2021

A231774 Triangular array read by rows: row n shows the coefficients of the polynomial u(n) = c(0) + c(1)*x + ... + c(n)*x^(n) which is the numerator of the n-th convergent of the continued fraction [k, k, k, ... ], where k = (x + 1)/(x + 2).

Original entry on oeis.org

2, 1, 5, 6, 2, 9, 19, 13, 3, 29, 72, 69, 30, 5, 65, 213, 278, 182, 60, 8, 181, 682, 1084, 928, 451, 118, 13, 441, 1975, 3795, 4065, 2625, 1023, 223, 21, 1165, 5868, 13015, 16590, 13290, 6852, 2221, 414, 34, 2929, 16697, 42404, 63020, 60435, 38799, 16682
Offset: 1

Views

Author

Clark Kimberling, Nov 13 2013

Keywords

Comments

Sum of numbers in row n: A002534(n). Left edge: A006131. Right edge: A000045 (Fibonacci numbers).

Examples

			First 3 rows:
2 ... 1
5 ... 6 .... 2
9 ... 19 ... 13 ... 3
First 3 polynomials:  2 + x, 5 + 6*x + 2*x^2, 9 + 19*x + 13*x^2 + 3*x^3.
		

Crossrefs

Programs

  • Mathematica
    t[n_] := t[n] = Table[(x + 1)/(x + 2), {k, 0, n}];
    b = Table[Factor[Convergents[t[n]]], {n, 0, 10}];
    p[x_, n_] := p[x, n] = Last[Expand[Numerator[b]]][[n]];
    u = Table[p[x, n], {n, 1, 10}]
    v = CoefficientList[u, x]; Flatten[v]

A231775 Triangular array read by rows: row n shows the coefficients of the polynomial u(n) = c(0) + c(1)*x + ... + c(n)*x^(n) which is the denominator of the n-th convergent of the continued fraction [k, k, k, ... ], where k = (x + 1)/(x + 2).

Original entry on oeis.org

2, 1, 2, 3, 1, 10, 17, 10, 2, 18, 47, 45, 19, 3, 58, 173, 210, 129, 40, 5, 130, 491, 769, 642, 302, 76, 8, 362, 1545, 2850, 2940, 1830, 687, 144, 13, 882, 4391, 9565, 11925, 9315, 4671, 1469, 265, 21, 2330, 12901, 31898, 46195, 43170, 26994, 11294, 3049, 482
Offset: 1

Views

Author

Clark Kimberling, Nov 13 2013

Keywords

Comments

Sum of numbers in row n: 3*A002534(n). Left edge: 2*A006131. Right edge: A000045 (Fibonacci numbers).

Examples

			First 3 rows:
2 .... 1
2 .... 3 .... 1
10 ... 17 ... 10 ... 2
First 3 polynomials:  2 + x, 2 + 3*x + x^2, 10 + 17*x + 10*x^2 + 2*x^3.
		

Crossrefs

Programs

  • Mathematica
    t[n_] := t[n] = Table[(x + 1)/(x + 2), {k, 0, n}];
    b = Table[Factor[Convergents[t[n]]], {n, 0, 10}];
    p[x_, n_] := p[x, n] = Last[Expand[Denominator[b]]][[n]];
    u = Table[p[x, n], {n, 1, 10}]
    v = CoefficientList[u, x]; Flatten[v]

A094726 Let M = the 2 X 2 matrix [ 0 3 / 3 2]. Take (M^n * [1 1])/3 = [p q]; then a(n) = p.

Original entry on oeis.org

1, 5, 19, 83, 337, 1421, 5875, 24539, 101953, 424757, 1767091, 7356995, 30617809, 127448573, 530457427, 2207952011, 9190020865, 38251609829, 159213407443, 662691303347, 2758303273681, 11480828277485, 47786386018099
Offset: 1

Views

Author

Gary W. Adamson, May 23 2004

Keywords

Examples

			a(6) = 1421 since (M^n * [1 1])/3 = [1421 q].
		

Crossrefs

Cf. A002534.

Programs

  • Mathematica
    a[n_] := (MatrixPower[{{0, 3}, {3, 2}}, n].{{1}, {1}})[[1, 1]]/3; Table[ a[n], {n, 22}] (* Robert G. Wilson v, Jun 05 2004 *)

Formula

From Colin Barker, Nov 08 2012: (Start)
a(n) = 2*a(n-1)+9*a(n-2).
G.f.: -x*(3*x+1)/(9*x^2+2*x-1). (End)

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 05 2004

A292847 a(n) is the smallest odd prime of the form ((1 + sqrt(2*n))^k - (1 - sqrt(2*n))^k)/(2*sqrt(2*n)).

Original entry on oeis.org

5, 7, 101, 11, 13, 269, 17, 19, 509, 23, 709, 821, 29, 31, 46957, 55399, 37, 168846239, 41, 43, 9177868096974864412935432937651459122761, 47, 485329129, 2789, 53, 3229, 3461, 59, 61, 1563353111, 139237612541, 67, 5021, 71, 73, 484639, 6221, 79, 6869, 83, 7549
Offset: 1

Views

Author

XU Pingya, Sep 24 2017

Keywords

Examples

			For k = {1, 2, 3, 4, 5}, ((1 + sqrt(6))^k - (1 - sqrt(6))^k)/(2*sqrt(6)) = {1, 2, 9, 28, 101}. 101 is odd prime, so a(3) = 101.
		

Crossrefs

Programs

  • Mathematica
    g[n_, k_] := ((1 + Sqrt[n])^k - (1 - Sqrt[n])^k)/(2Sqrt[n]);
    Table[k = 3; While[! PrimeQ[Expand@g[2n, k]], k++]; Expand@g[2n, k], {n, 41}]
  • PARI
    g(n,k) = ([0,1;2*n-1,2]^k*[0;1])[1,1]
    a(n) = for(k=3,oo,if(ispseudoprime(g(n,k)),return(g(n,k)))) \\ Jason Yuen, Apr 12 2025

Formula

When 2*n + 3 = p is prime, a(n) = p.
Previous Showing 11-20 of 20 results.