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-13 of 13 results.

A144535 Numerators of continued fraction convergents to sqrt(3)/2.

Original entry on oeis.org

0, 1, 6, 13, 84, 181, 1170, 2521, 16296, 35113, 226974, 489061, 3161340, 6811741, 44031786, 94875313, 613283664, 1321442641, 8541939510, 18405321661, 118973869476, 256353060613, 1657092233154, 3570537526921, 23080317394680, 49731172316281, 321467351292366
Offset: 0

Views

Author

N. J. A. Sloane, Dec 29 2008

Keywords

Examples

			0, 1, 6/7, 13/15, 84/97, 181/209, 1170/1351, 2521/2911, 16296/18817, 35113/40545, ...
		

Crossrefs

Bisections give A001570, A011945.

Programs

  • Magma
    I:=[0, 1, 6, 13]; [n le 4 select I[n] else 14*Self(n-2)-Self(n-4): n in [1..30]]; // Vincenzo Librandi, Dec 10 2013
    
  • Maple
    with(numtheory); Digits:=200: cf:=convert(evalf(sqrt(3)/2,confrac); [seq(nthconver(cf,i), i=0..100)];
  • Mathematica
    CoefficientList[Series[x (1 + 6 x - x^2)/((1 - 4 x + x^2) (1 + 4 x + x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 10 2013 *)
    Numerator[Convergents[Sqrt[3]/2,30]] (* or *) LinearRecurrence[{0,14,0,-1},{0,1,6,13},30] (* Harvey P. Dale, Feb 10 2014 *)
  • PARI
    Vec(x*(1+6*x-x^2)/((1-4*x+x^2)*(1+4*x+x^2)) + O(x^30)) \\ Colin Barker, Mar 27 2016

Formula

From Colin Barker, Apr 14 2012: (Start)
a(n) = 14*a(n-2) - a(n-4).
G.f.: x*(1 + 6*x - x^2)/((1 - 4*x + x^2)*(1 + 4*x + x^2)). (End)
a(n) = ((-(-2-sqrt(3))^n*(-3+sqrt(3)) + (2-sqrt(3))^n*(-3+sqrt(3)) - (3+sqrt(3))*((-2+sqrt(3))^n - (2+sqrt(3))^n)))/(8*sqrt(3)). - Colin Barker, Mar 27 2016
a(2*n) = 6*a(2*n-1) + a(2*n-2). a(2*n+1) = A003154(A101265(n+1)). - John Elias, Dec 10 2021

A179167 Place a(n) red and b(n) blue balls in an urn; draw 3 balls without replacement; Probability(3 red balls) = Probability(1 red and 2 blue balls); binomial(a(n),3) = binomial(a(n),1)*binomial(b(n),2).

Original entry on oeis.org

3, 4, 11, 37, 134, 496, 1847, 6889, 25706, 95932, 358019, 1336141, 4986542, 18610024, 69453551, 259204177, 967363154, 3610248436, 13473630587, 50284273909, 187663465046, 700369586272, 2613814880039, 9754889933881
Offset: 1

Views

Author

Paul Weisenhorn, Jun 30 2010

Keywords

Examples

			For n=4, a(4)=37; b(4)=21; binomial(37,3) = 7770;
binomial(37,1)*binomial(21,2) = 37*210 = 7770.
		

Crossrefs

b(n)=A101265(n).

Programs

  • Maple
    r:=sqrt(3): for n from 1 to 40 do
    a(n):=(6+(1+r)*(2+r)^(n-1)+(1-r)*(2-r)^(n-1))/4: end do:

Formula

a(n+2) = 4*a(n+1) - a(n) - 3;
a(n+3) = 5*(a(n+2) - a(n+1)) + a(n); r=sqrt(3);
a(n) = (6 + (1+r)*(2+r)^(n-1) + (1-r)*(2-r)^(n-1))/4;
a(n) = ceiling((6 + (1+r)*(2+r)^(n-1))/4).
From Colin Barker, Dec 11 2012: (Start)
a(n) = 5*a(n-1) - 5*a(n-2) + a(n-3) for n > 4.
G.f.: x*(x^3-6*x^2+11*x-3) / ((x-1)*(x^2-4*x+1)). (End)

A387123 Numbers k such that Sum_{i=1..r} (k-i) and Sum_{i=1..r} (k+i) are both triangular for some r with 1 <= r < k.

Original entry on oeis.org

2, 6, 9, 21, 24, 38, 50, 53, 65, 77, 90, 96, 104, 133, 147, 195, 201, 224, 247, 286, 324, 377, 450, 483, 553, 588, 605, 614, 713, 792, 901, 1014, 1029, 1043, 1066, 1074, 1155, 1274, 1349, 1575, 1784, 1885, 1920, 2034, 2057, 2109, 2279, 2312, 2342, 2622
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 17 2025

Keywords

Comments

For m >= 1, if k = m*(m+1)^2/2 then r = m, thus A006002 is a subsequence. For k >= 286 from A101265 or A101879, r = k-1.

Examples

			For k = 6: the least r = 5, T_i = 1 + 2 + 3 + 4 + 5 = 15, T_j = 7 + 8 + 9 + 10 + 11 = 45, both T_i and T_j are triangular numbers, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ[Sqrt[8*n + 1]]; q[k_] := Module[{r = 1, s1 = 0, s2 = 0}, While[s1 += k - r; s2 += k + r; r < k && (! triQ[s1] || ! triQ[s2]), r++]; 1 <= r < k]; Select[Range[3000], q] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    isok(k) = my(sm=0, sp=0); for (r=1, k-1, sm+=k-r; sp+=k+r; if (ispolygonal(sm, 3) && ispolygonal(sp, 3), return(r));); \\ Michel Marcus, Aug 17 2025
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A387123_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            if any(is_square(((k*r<<1)-r*(r+1)<<2)+1) and is_square(((k*r<<1)+r*(r+1)<<2)+1) for r in range(1,k)):
                yield k
    A387123_list = list(islice(A387123_gen(),50)) # Chai Wah Wu, Aug 21 2025
Previous Showing 11-13 of 13 results.