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.

Showing 1-9 of 9 results.

A173115 a(n) = -(sin(2*n*arccos(sqrt(3))))^2.

Original entry on oeis.org

0, 24, 2400, 235224, 23049600, 2258625624, 221322261600, 21687323011224, 2125136332838400, 208241673295152024, 20405558846592060000, 1999536525292726728024, 195934173919840627286400
Offset: 0

Views

Author

Artur Jasinski, Feb 10 2010

Keywords

Crossrefs

Programs

  • Mathematica
    Table[ -Round[N[Sin[2 n ArcCos[Sqrt[3]]]^2, 100]], {n, 0, 20}]
    OR
    Table[Round[N[ -1/2 + (1/4) (49 + 20 Sqrt[6])^n + (1/4) (49 - 20 Sqrt[6])^n]], {n, 0, 6}]
    OR
    Clear[a]; a[n_] := a[n] = 99 a[n - 1] - 99 a[n - 2] + a[n - 3]; a[0] = 0; a[1] = 24; a[2] = 2400; Table[a[n], {n, 0, 10}]
  • PARI
    a(n)=([0,1,0;0,0,1;1,-99,99]^n*[0;24;2400])[1,1] \\ Charles R Greathouse IV, Jun 11 2015

Formula

a(n) = 99*a(n-1) - 99*a(n-2) + a(n-3), n > 2.
Binet formula: a(n) = -1/2 + (1/4)(49 + 20*sqrt(6))^n + (1/4)(49 - 20*sqrt(6))^n.
a(n) = 24*A108741(n).
From R. J. Mathar, Aug 23 2012: (Start)
G.f.: -24*x*(1+x) / ( (x-1)*(x^2-98*x+1) ).
a(n) = A132596(2n). (End)

A322699 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where A(n,k) is 1/2 * (-1 + Sum_{j=0..k} binomial(2*k,2*j)*(n+1)^(k-j)*n^j).

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 8, 2, 0, 0, 49, 24, 3, 0, 0, 288, 242, 48, 4, 0, 0, 1681, 2400, 675, 80, 5, 0, 0, 9800, 23762, 9408, 1444, 120, 6, 0, 0, 57121, 235224, 131043, 25920, 2645, 168, 7, 0, 0, 332928, 2328482, 1825200, 465124, 58080, 4374, 224, 8, 0
Offset: 0

Views

Author

Seiichi Manyama, Dec 23 2018

Keywords

Examples

			Square array begins:
   0, 0,   0,    0,      0,       0,        0, ...
   0, 1,   8,   49,    288,    1681,     9800, ...
   0, 2,  24,  242,   2400,   23762,   235224, ...
   0, 3,  48,  675,   9408,  131043,  1825200, ...
   0, 4,  80, 1444,  25920,  465124,  8346320, ...
   0, 5, 120, 2645,  58080, 1275125, 27994680, ...
   0, 6, 168, 4374, 113568, 2948406, 76545000, ...
		

Crossrefs

Columns 0-5 give A000004, A001477, A033996, A322675, A322677, A322745.
Main diagonal gives A322746.
Cf. A173175 (A(n,2*n)), A322790.

Programs

  • Mathematica
    Unprotect[Power]; 0^0 := 1; Protect[Power]; Table[(-1 + Sum[Binomial[2 k, 2 j] (# + 1)^(k - j)*#^j, {j, 0, k}])/2 &[n - k], {n, 0, 9}, {k, n, 0, -1}] // Flatten (* Michael De Vlieger, Jan 01 2019 *)
    nmax = 9; row[n_] := LinearRecurrence[{4n+3, -4n-3, 1}, {0, n, 4n(n+1)}, nmax+1]; T = Array[row, nmax+1, 0]; A[n_, k_] := T[[n+1, k+1]];
    Table[A[n-k, k], {n, 0, nmax}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jan 06 2019 *)
  • Ruby
    def ncr(n, r)
      return 1 if r == 0
      (n - r + 1..n).inject(:*) / (1..r).inject(:*)
    end
    def A(k, n)
      (0..n).map{|i| (0..k).inject(-1){|s, j| s + ncr(2 * k, 2 * j) * (i + 1) ** (k - j) * i ** j} / 2}
    end
    def A322699(n)
      a = []
      (0..n).each{|i| a << A(i, n - i)}
      ary = []
      (0..n).each{|i|
        (0..i).each{|j|
          ary << a[i - j][j]
        }
      }
      ary
    end
    p A322699(10)

Formula

sqrt(A(n,k)+1) + sqrt(A(n,k)) = (sqrt(n+1) + sqrt(n))^k.
sqrt(A(n,k)+1) - sqrt(A(n,k)) = (sqrt(n+1) - sqrt(n))^k.
A(n,0) = 0, A(n,1) = n and A(n,k) = (4*n+2) * A(n,k-1) - A(n,k-2) + 2*n for k > 1.
A(n,k) = (T_{k}(2*n+1) - 1)/2 where T_{k}(x) is a Chebyshev polynomial of the first kind.
T_1(x) = x. So A(n,1) = (2*n+1-1)/2 = n.

A233450 Numbers n such that 3*T(n)+1 is a square, where T = A000217.

Original entry on oeis.org

0, 1, 6, 15, 64, 153, 638, 1519, 6320, 15041, 62566, 148895, 619344, 1473913, 6130878, 14590239, 60689440, 144428481, 600763526, 1429694575, 5946945824, 14152517273, 58868694718, 140095478159, 582740001360, 1386802264321, 5768531318886, 13727927165055
Offset: 1

Views

Author

Bruno Berselli, Dec 10 2013

Keywords

Comments

For n>1, partial sums of A080872 starting from A080872(1).

Examples

			153 is in the sequence because 3*153*154/2+1 = 188^2.
		

Crossrefs

Sequence A129444 gives n+1.
Cf. A000217, A080872, A129445 (square roots of 3*A000217(a(n))+1), A132596 (numbers m such that 3*A000217(m) is a square).
Cf. numbers m such that k*A000217(m)+1 is a square: A006451 for k=1; m=0 for k=2; this sequence for k=3; A001652 for k=4; A129556 for k=5; A001921 for k=6.

Programs

  • Mathematica
    LinearRecurrence[{1, 10, -10, -1, 1}, {0, 1, 6, 15, 64}, 30]

Formula

G.f.: x^2*(1 + 5*x - x^2 - x^3) / ((1 - x)*(1 - 10*x^2 + x^4)).
a(n) = a(n-1) +10*a(n-2) -10*a(n-3) -a(n-4) +a(n-5) for n>5, a(1)=0, a(2)=1, a(3)=6, a(4)=15, a(5)=64.
a(n) = -1/2 + ( (-3*(-1)^n + 2*sqrt(6))*(5 + 2*sqrt(6))^floor(n/2) - (3*(-1)^n + 2*sqrt(6))*(5 - 2*sqrt(6))^floor(n/2) )/12.

A098297 Member r=12 of the family of Chebyshev sequences S_r(n) defined in A092184.

Original entry on oeis.org

0, 1, 12, 121, 1200, 11881, 117612, 1164241, 11524800, 114083761, 1129312812, 11179044361, 110661130800, 1095432263641, 10843661505612, 107341182792481, 1062568166419200, 10518340481399521, 104120836647576012
Offset: 0

Views

Author

Wolfdieter Lang, Oct 18 2004

Keywords

Crossrefs

Programs

  • GAP
    a:=[0,1,12];; for n in [4..30] do a[n]:=11*a[n-1]-11*a[n-2]+ a[n-3]; od; a; # G. C. Greubel, May 24 2019
  • Magma
    I:=[0,1,12]; [n le 3 select I[n] else 11*Self(n-1)-11*Self(n-2) + Self(n-3): n in [1..30]]; // G. C. Greubel, May 24 2019
    
  • Mathematica
    LinearRecurrence[{11,-11,1}, {0,1,12}, 30] (* G. C. Greubel, May 24 2019 *)
  • PARI
    my(x='x+O('x^30)); concat([0], Vec(x*(1+x)/((1-x)*(1-10*x+x^2)))) \\ G. C. Greubel, May 24 2019
    
  • Sage
    (x*(1+x)/((1-x)*(1-10*x+x^2))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 24 2019
    

Formula

a(n) = (T(n, 5)-1)/4 with Chebyshev's polynomials of the first kind evaluated at x=5: T(n, 5) = A001079(n) = ((5 + 2*sqrt(6))^n + (5 - 2*sqrt(6))^n)/2.
a(n) = 10*a(n-1) - a(n-2) + 2, n >= 2, a(0)=0, a(1)=1.
a(n) = 11*a(n-1) - 11*a(n-2) + a(n-3), n >= 3, a(0)=0, a(1)=1, a(2)=12.
G.f.: x*(1+x)/((1-x)*(1-10*x+x^2)) = x*(1+x)/(1-11*x+11*x^2-x^3) (from the Stephan link, see A092184).
a(n) = A132596(n) / 2. - Peter Bala, Dec 31 2012

A175497 Numbers k with the property that k^2 is a product of two distinct triangular numbers.

Original entry on oeis.org

0, 6, 30, 35, 84, 180, 204, 210, 297, 330, 546, 840, 1170, 1189, 1224, 1710, 2310, 2940, 2970, 3036, 3230, 3900, 4914, 6090, 6930, 7134, 7140, 7245, 7440, 8976, 10710, 12654, 14175, 14820, 16296, 16380, 17220, 19866, 22770, 25172, 25944, 29103
Offset: 1

Views

Author

Zak Seidov, May 30 2010

Keywords

Comments

From Robert G. Wilson v, Jul 24 2010: (Start)
Terms in the i-th row are products contributed with a factor A000217(i):
(1) 0, 6, 35, 204, 1189, 6930, 40391, 235416, 1372105, 7997214, 46611179, ...
(2) 30, 297, 2940, 29103, 288090, 2851797, 28229880, ...
(3) 84, 1170, 16296, 226974, 3161340, ...
(4) 180, 3230, 57960, 1040050, 18662940, ...
(5) 330, 7245, 159060, 3492075, 76666590, ...
(6) 546, 14175, 368004, 9553929, ...
(7) 840, 25172, 754320, 22604428, ...
(8) 210, 1224, 7134, 41580, 242346, 1412496, 8232630, 47983284, ...
(9) 1710, 64935, 2465820, 93636225, ...
(10) 2310, 96965, 4070220, ...
(11) 3036, 139590, 6418104, ...
(12) 3900, 194922, 9742200, ...
(13) 4914, 265265, 14319396, ...
(14) 6090, 353115, 20474580, ...
(15) 7440, 461160, 28584480, ...
(End)
Numbers m with property that m^2 is a product of two distinct triangular numbers T(i) and T(j) such that i and j are in the same row of the square array A(n, k) defined in A322699. - Onur Ozkan, Mar 17 2023

Crossrefs

From Robert G. Wilson v, Jul 24 2010: (Start)
A001109 (with the exception of 1), A011945, A075848 and A055112 are all proper subsets.
Many terms are in common with A147779.
Cf. A152005 (two distinct tetrahedral numbers).

Programs

  • Maple
    isA175497 := proc(n)
        local i,Ti,Tj;
        if n = 0 then
            return true;
        end if;
        for i from 1 do
            Ti := i*(i+1)/2 ;
            if Ti > n^2 then
                return false;
            else
                Tj := n^2/Ti ;
                if Tj <> Ti and type(Tj,'integer') then
                    if isA000217(Tj) then  # code in A000217
                        return true;
                    end if;
                end if;
            end if;
        end do:
    end proc:
    for n from 0 do
        if isA175497(n) then
            printf("%d,\n",n);
        end if;
    end do: # R. J. Mathar, May 26 2016
  • Mathematica
    triangularQ[n_] := IntegerQ[Sqrt[8n + 1]];
    okQ[n_] := Module[{i, Ti, Tj}, If[n == 0, Return[True]]; For[i = 1, True, i++, Ti = i(i+1)/2; If[Ti > n^2, Return[False], Tj = n^2/Ti; If[Tj != Ti && IntegerQ[Tj], If[ triangularQ[Tj], Return[True]]]]]];
    Reap[For[k = 0, k < 30000, k++, If[okQ[k], Print[k]; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Jun 13 2023, after R. J. Mathar *)
  • Python
    from itertools import count, islice, takewhile
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    def A175497_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda k:not k or any(map(lambda d: is_square((d<<3)+1) and is_square((k**2//d<<3)+1), takewhile(lambda d:d**2A175497_list = list(islice(A175497_gen(),20)) # Chai Wah Wu, Mar 13 2023
    
  • Python
    def A175497_list(n):
        def A322699_A(k, n):
            p, q, r, m = 0, k, 4*k*(k+1), 0
            while m < n:
                p, q, r = q, r, (4*k+3)*(r-q) + p
                m += 1
            return p
        def a(k, n, j):
            if n == 0: return 0
            p = A322699_A(k, n)*(A322699_A(k, n)+1)*(2*k+1) - a(k, n-1, 1)
            q = (4*k+2)*p - A322699_A(k, n)*(A322699_A(k, n)+1)//2
            m = 1
            while m < j: p, q = q, (4*k+2)*q - p; m += 1
            return p
        A = set([a(k, 1, 1) for k in range(n+1)])
        k, l, m = 1, 1, 2
        while True:
            x = a(k, l, m)
            if x < max(A):
                A |= {x}
                A  = set(sorted(A)[:n+1])
                m += 1
            else:
                if m == 1 and l == 1:
                    if k > n:
                        return sorted(A)
                    k += 1
                elif m > 1:
                    l += 1; m = 1
                elif l > 1:
                    k += 1; l, m = 1, 1
    # Onur Ozkan, Mar 15 2023

Formula

a(n)^2 = A169836(n). - R. J. Mathar, Mar 12 2023

A221074 Simple continued fraction expansion of product {n >= 0} {1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+3)}/{1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+1)} at m = 3.

Original entry on oeis.org

2, 8, 1, 16, 1, 96, 1, 176, 1, 968, 1, 1760, 1, 9600, 1, 17440, 1, 95048, 1, 172656, 1, 940896, 1, 1709136, 1, 9313928, 1, 16918720, 1, 92198400, 1, 167478080, 1, 912670088, 1, 1657862096, 1
Offset: 0

Views

Author

Peter Bala, Jan 06 2013

Keywords

Comments

Simple continued fraction expansion of product {n >= 0} {1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+3)}/{1 - sqrt(m)*[sqrt(m) - sqrt(m-1)]^(4*n+1)} at m = 3. For other cases see A221073 (m = 2), A221075 (m = 4) and A221076 (m = 5).

Examples

			Product {n >= 0} {1 - sqrt(3)*(sqrt(3) - sqrt(2))^(4*n+3)}/{1 - sqrt(3)*(sqrt(3) - sqrt(2))^(4*n+1)} = 2.11180 16361 44098 52896 ...
= 2 + 1/(8 + 1/(1 + 1/(16 + 1/(1 + 1/(96 + 1/(1 + 1/(176 + ...))))))).
Since (sqrt(3) - sqrt(2))^3 = 9*sqrt(3) - 11*sqrt(2) we have the following simple continued fraction expansion:
product {n >= 0} {1 - sqrt(3)*(9*sqrt(3) - 11*sqrt(2))^(4*n+3)}/{1 - sqrt(3)*(9*sqrt(3) - 11*sqrt(2))^(4*n+1)} = 1 + 1/(16 + 1/(1 + 1/(968 + 1/(1 + 1/(17440 + 1/(1 + 1/(940896 + ...))))))).
		

Crossrefs

Cf. A098297, A105438, A132596, A174500, A221073 (m = 2), A221075 (m = 4), A221076 (m = 5).

Formula

a(2*n) = 1 for n >= 1. For n >= 1 we have
a(4*n - 3) = (sqrt(3) + sqrt(2))^(2*n) + (sqrt(3) - sqrt(2))^(2*n) - 2;
a(4*n - 1) = 1/sqrt(3)*{(sqrt(3) + sqrt(2))^(2*n + 1) + (sqrt(3) - sqrt(2))^(2*n + 1)} - 2.
a(4*n - 3) = 8*A098297(n) = 4*A132596(n); a(4*n - 1) = 4*A105038(n).
O.g.f.: 2 + x^2/(1 - x^2) + 8*x*(1 + x^2)^2/(1 - 11*x^4 + 11*x^8 - x^12) = 2 + 8*x + x^2 + 16*x^3 + x^4 + 96*x^5 + ....
If we denote the present sequence by [2; 8, 1, c(3), 1, c(4), 1, ...] then for k >= 1 the sequence [1; c(2*k+1), 1, c(2*(2*k+1)), 1, c(3*(2*k+1)), 1, ...] gives the simple continued fraction expansion of product {n >= 0} [1-sqrt(3)*{(sqrt(3)-sqrt(2))^(2*k+1)}^(4*n+3)]/[1 - sqrt(3)*{(sqrt(3)-sqrt(2))^(2*k+1)}^(4*n+1)]. An example is given below.
O.g.f.: (x^10-2*x^8-10*x^6+20*x^4-8*x^3+x^2-8*x-2) / ((x-1)*(x+1)*(x^8-10*x^4+1)). - Colin Barker, Jan 10 2014

A169835 Perfect squares that are a product of two triangular numbers.

Original entry on oeis.org

1, 9, 36, 100, 225, 441, 784, 900, 1225, 1296, 2025, 3025, 4356, 6084, 7056, 8281, 11025, 14400, 18496, 23409, 29241, 32400, 36100, 41616, 44100, 53361, 64009, 76176, 88209, 90000, 105625, 108900, 123201, 142884, 164836, 189225, 216225, 246016, 278784, 298116
Offset: 1

Views

Author

R. J. Mathar, May 30 2010

Keywords

Comments

Includes (except for 0) A000537 and 3/2*x*(x+1) for x in A132596. - Robert Israel, Jan 16 2015

Crossrefs

Superset of A000537. Cf. A000217, A132596, A169836.

Programs

  • Haskell
    a169835 n = a169835_list !! (n-1)
    a169835_list = f [] (tail a000217_list) (tail a000290_list) where
       f ts us'@(u:us) vs'@(v:vs)
         | u <= v = f (u : ts) us vs'
         | any p $ map (divMod v) ts = v : f ts us' vs
         | otherwise = f ts us' vs
         where p (q, r) = r == 0 && a010054 q == 1
    -- Reinhard Zumkeller, Mar 03 2015
    
  • Maple
    N:= 10^6: # to get all terms <= N
    A:= select(issqr,{seq(seq(a*(a+1)*b*(b+1)/4,
        b = a .. floor(sqrt(1/4+4*N/a/(a+1))-1/2)),a=1..floor(sqrt(4*N)))});
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(A, list)); # Robert Israel, Jan 16 2015
  • Mathematica
    M = 10^6; (* to get all terms <= M *)
    A = Union[Select[Flatten[Table[Table[(1/4) a (a+1) b (b+1), {b, a, Floor[ Sqrt[1/4 + 4M/(a (a+1))] - 1/2]}], {a, 1, Floor[Sqrt[4M]]}]], IntegerQ[ Sqrt[#]]&]] (* Jean-François Alcover, Mar 09 2019, after Robert Israel *)
  • PARI
    istriangular(n)=issquare(8*n+1) \\ now one can use ispolygonal(n, 3)
    isok(n) = {if (issquare(n), fordiv(n, d, if (d > sqrtint(n), break); if (istriangular(d) && istriangular(n/d), return (1)););); return (0);} \\ Michel Marcus, Jul 24 2013
    
  • Python
    from itertools import count, islice, takewhile
    from sympy import divisors
    from sympy.ntheory.primetest import is_square
    def A169835_gen(): # generator of terms
        return filter(lambda k:any(map(lambda d: is_square((d<<3)+1) and is_square((k//d<<3)+1), takewhile(lambda d:d**2<=k,divisors(k)))),(m**2 for m in count(0)))
    A169835_list = list(islice(A169835_gen(),20)) # Chai Wah Wu, Mar 13 2023

Extensions

Corrected (missing terms inserted) by R. J. Mathar, Jun 04 2010

A171640 a(n) = 10*a(n-1)-a(n-2)-4 with a(1)=1 and a(2)=3.

Original entry on oeis.org

1, 3, 25, 243, 2401, 23763, 235225, 2328483, 23049601, 228167523, 2258625625, 22358088723, 221322261601, 2190864527283, 21687323011225, 214682365584963, 2125136332838401, 21036680962799043, 208241673295152025, 2061380051988721203, 20405558846592060001
Offset: 1

Views

Author

Mark Dols, Dec 13 2009

Keywords

Examples

			a(2+1) = [5-sqrt(24)+5+sqrt(24)]^2/4 = 100/4 = 25.
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == 10 a[n - 1] - a[n - 2] - 4, a[1] == 1, a[2] == 3}, a, {n, 1, 21}] (* Michael De Vlieger, Oct 02 2015 *)
    LinearRecurrence[{11,-11,1},{1,3,25},30] (* Harvey P. Dale, May 05 2018 *)
  • PARI
    Vec(-x*(3*x^2-8*x+1)/((x-1)*(x^2-10*x+1)) + O(x^30)) \\ Colin Barker, Oct 02 2015

Formula

a(n) = A132596(n-1)+1.
2*a(n) + 2*A132596(n-1) = A087799(n-1).
a(n+1) = [(sqrt(3)-sqrt(2))^n +(sqrt(3)+ sqrt(2))^n]^2 / 4.
From Colin Barker, Oct 02 2015: (Start)
a(n) = 11*a(n-1) - 11*a(n-2) + a(n-3) for n>3.
G.f.: -x*(3*x^2-8*x+1) / ((x-1)*(x^2-10*x+1)).
(End)
6*a(n)*(a(n)-1) = [A122653(n-1)]^2. - Jean-Luc Manguin, Jun 02 2020

A174906 a(n) is the index of the first triangular number T_i exceeding T_n such that the product of T_i*T_n is a perfect square.

Original entry on oeis.org

24, 48, 80, 120, 168, 224, 49, 360, 440, 528, 624, 728, 840, 960, 1088, 1224, 1368, 1520, 1680, 1848, 2024, 2208, 242, 2600, 2808, 3024, 3248, 3480, 3720, 3968, 4224, 4488, 4760, 5040, 5328, 5624, 5928, 6240, 6560, 6888, 7224, 7568, 7920, 8280, 8648
Offset: 2

Views

Author

Robert G. Wilson v, Apr 01 2010

Keywords

Comments

"You can find an infinite number of [different] triangular numbers such that when multipled together form a square number. For example, for every triangular number, T_n, there are an infinite number of other triangular numbers, T_m, such that T_n*T_m is a square. For example, T_2 * T_24 = 30^2."

References

  • Clifford A. Pickover, The Loom of God, Tapestries of Mathematics and Mysticism, Sterling, NY, 2009, page 33.

Crossrefs

Programs

  • Mathematica
    tri[n_] := n (n + 1)/2; f[n_] := Block[{k = n + 1, t = tri@n}, While[ !IntegerQ@ Sqrt[ t*tri@k], k++ ]; k]; Table[ f@n, {n, 2, 46}]
Showing 1-9 of 9 results.