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

A301383 Expansion of (1 + 3*x - 2*x^2)/(1 - 7*x + 7*x^2 - x^3).

Original entry on oeis.org

1, 10, 61, 358, 2089, 12178, 70981, 413710, 2411281, 14053978, 81912589, 477421558, 2782616761, 16218279010, 94527057301, 550944064798, 3211137331489, 18715879924138, 109084142213341, 635788973355910, 3705649697922121, 21598109214176818, 125883005587138789, 733699924308655918
Offset: 0

Views

Author

Bruno Berselli, Mar 20 2018

Keywords

Comments

y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y+2). The corresponding x values are listed in A075841.
y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y+1) are in A002315, and A075870 gives the x values.
y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y) are in A046090, and A001653 gives the x values.
Also, indices y for which 4*A000217(y) + 5 is a square. The next integers k such that k*A000217(y) + 5 is a square for infinitely many y values are 11, 20, 22, 29, 31, ...
First differences are in A106329.

Crossrefs

Programs

  • Julia
    using Nemo
    function A301383List(len)
        R, x = PowerSeriesRing(ZZ, len+2, "x")
        f = divexact(1+3*x-2*x^2, 1-7*x+7*x^2-x^3)
        [coeff(f, k) for k in 0:len]
    end
    A301383List(23) |> println # Peter Luschny, Mar 21 2018
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)));
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3), a(0)=1,a(1)=10,a(2)=61},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Mar 21 2018
  • Mathematica
    CoefficientList[Series[(1 + 3 x - 2 x^2)/(1 - 7 x + 7 x^2 - x^3), {x, 0, 30}], x]
  • Maxima
    makelist(coeff(taylor((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3), x, 0, n), x, n), n, 0, 30);
    
  • PARI
    Vec((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)+O(x^30))
    
  • Sage
    m=30; L. = PowerSeriesRing(ZZ, m); f=(1+3*x-2*x^2)/(1-7*x+7*x^2-x^3); print(f.coefficients())
    

Formula

O.g.f.: (1 + 3*x - 2*x^2)/((1 - x)*(1 - 6*x + x^2)).
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) = 6*a(n-1) - a(n-2) + 2.
a(n) = (3/4)*((1 + sqrt(2))^(2*n + 1) + (1 - sqrt(2))^(2*n + 1)) - 1/2.
a(n) = A033539(2*n+2) = A241976(n+1) + 1 = 3*A001652(n) + 1 = 3*A046090(n) - 2.
a(n) = A053142(n+1) + 3*A053142(n) - 2*A053142(n-1), n>0.
2*a(n) = 3*A002315(n) - 1.
4*a(n) = 3*A077444(n+1) - 2.
E.g.f.: (3*exp(3*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)) - cosh(x) - sinh(x))/2. - Stefano Spezia, Mar 06 2020
Let T(n) be the n-th triangular number, A000217(n). Then T(a(n)-3) + 2*T(a(n)-2) + 3*T(a(n)-1) + 4*T(a(n)) + 3*T(a(n)+1) + 2*T(a(n)+2) + T(a(n)+3) = (A001653(n) + A001653(n+2))^2. - Charlie Marion, Mar 16 2021

A227972 Two column recursive array A(n,k), relating expressions based on half-squares (A007590) to each other and several other sequences, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 5, 7, 7, 10, 17, 24, 29, 41, 41, 58, 99, 140, 169, 239, 239, 338, 577, 816, 985, 1393, 1393, 1970, 3363, 4756, 5741, 8119, 8119, 11482, 19601, 27720, 33461, 47321, 47321, 66922, 114243, 161564, 195025, 275807, 275807, 390050, 665857, 941664, 1136689, 1607521
Offset: 1

Views

Author

Richard R. Forberg, Aug 01 2013

Keywords

Comments

The first column (k=1) holds the interleaved integer square roots of these two "Half-Square" expressions in ascending order: floor(m^2/2 + 1) for m=>0 and floor(m^2/2 - 1) for m=>1. The second column (k=2) holds the value of m that yields the corresponding integer square root.
The value of m for row n (at n mod 3 = 2) is the value of the square root for the next row (at n mod 3 = 0) which uses the other expression.
There are twice as many results for the expression floor(m^2/2 + 1) as for floor(m^2/2 - 1), interleaved consistently as two of every three results (as shown in the example below).
The first column, for n mod 3 = 1, produces A001541.
The first column, for n mod 3 = 2, produces A001653.
NOTE: Interleaving of the two sequences above is A079496.
The first column, for n mod 3 = 0, produces A002315 (NSW Numbers).
NOTE: Interleaving of A001541 and A002315 is A001333.
The second column, for n mod 3 = 1, produces A005319.
The second column, for n mod 3 = 2, produces A002315 (again).
NOTE: Interleaving of the two sequences above is A143608.
The second column, for n mod 3 = 0, produces A075870.
NOTE: Interleaving of A005319 and A075870 is A052542 = 2*A000129 (Pell)
The row sums at n mod 3 = 1 and n mod 3 = 0 are used in the recursion to produce values in subsequent rows of the array for both columns.
For rows at n mod 3 = 2, the ascending interleaved combination of A(n,1) and the row sum (of the same row) produces A000129 (Pell Numbers).
Row sums also hold all the integer square roots (as given in A001542) of the Half-Squares, (A007590), at n mod 3 = 2, and the corresponding values of m in the next row at n mod 3 = 0, corresponding to A001541.
The value of the floor of half the row sum, for n mod 3 =0 and n mod 3 = 1, produces A048739, giving the partial sums of A000129 (Pell Numbers), for the Pell Numbers produced through the prior row at n mod 3 = 2.
The value of half the row sum, for n mod 3 = 2, produces A001109 (without its initial 0). This subsequence is also produced from finding the integer square roots of A083374. The value of the indices of that sequence where these roots occur is given by A002315 (NSW Numbers).
The differences of two entries in row n equals the row sum for row n-3, consistently for all rows n > 3.
The ratio of the two entries in the same row converges to sqrt(2).
The ratio of two entries in the same column (either k=1 or k=2) converge as follows:
A(k,n)/A(k,n-1)--> sqrt(2) for n mod 3 = 0,
--> sqrt(2) + 1 for n mod 3 = 1,
--> sqrt(2)/2 + 1 for n mod 3 = 2.
A(k,n)/A(k,n-3)--> sqrt(8) + 3 for n mod 3 = 0, 1, or 2,
That last line means: A001541, A001653, A002315, A005319 and A075870 all have the convergence ratio of sqrt(8) + 3 for adjacent terms. In addition alternating Pell Numbers also converge to that ratio.

Examples

			The two column array with row number n and the row sum. An extra column on the right shows which expression is applicable to get that row's values: either floor(m^2/2 + 1) indicated as "+1",  or floor(m^2/2 - 1) indicated as "-1". (NOTE: The value of n is immaterial, except as a row number).
The array begins:
Row         k=1         k=2                   Applicable "Half-Square"
n          (sqrt)       (m)         Row Sum        Expression
1            1           0               1             +1
2            1           1               2             +1
3            1           2               3             -1
4            3           4               7             +1
5            5           7              12             +1
6            7          10              17             -1
7           17          24              41             +1
8           29          41              70             +1
9           41          58              99             -1
10          99         140             239             +1
11         169         239             408             +1
12         239         338             577             -1
13         577         816            1393             +1
14         985        1393            2378             +1
15        1393        1970            3363             -1
16        3363        4756            8119             +1
17        5741        8119           13860             +1
18        8119       11482           19601             -1
19       19601       27720           47321             +1
20       33461       47321           80782             +1
		

Crossrefs

Formula

Initialize row 1 as A(1,1) = 1 and A(1,2) = 0, then:
For rows at n mod 3 = 0: A(n,1) = A(n-1, 2)
A(n,2) = A(n, 1) + A(n-2, 1)
For rows at n mod 3 = 1: A(n,1) = A(n-1, 1) + A(n-1, 2)
A(n,2) = A(n, 1) + A(n-1, 1)
For rows at n mod 3 = 2: A(n,1) = A(n-1,1) + A(n-3, 1)
A(n,2) = A(n-1,1) + A(n-1, 2)
Empirical g.f.: -x*(2*x^11-x^10-x^9+x^8-4*x^7+3*x^6-2*x^5-x^4-x^3-x^2-1) / ((x^6-2*x^3-1)*(x^6+2*x^3-1)). - Colin Barker, Aug 08 2013

Extensions

Some additional comments by Richard R. Forberg, Aug 12 2013

A257274 Numbers whose square can be written as sum of at least 3 consecutive triangular numbers (A000217).

Original entry on oeis.org

8, 10, 19, 26, 44, 58, 79, 84, 91, 105, 111, 121, 135, 140, 154, 172, 184, 188, 195, 203, 208, 212, 217, 222, 230, 240, 246, 265, 276, 286, 292, 316, 322, 329, 338, 364, 390, 426, 429, 462, 490, 498, 506, 548, 550, 605, 704, 714, 715, 763, 770, 780, 782, 807
Offset: 1

Views

Author

M. F. Hasler, May 02 2015

Keywords

Comments

Any square can trivially be written as sum of two consecutive triangular numbers T = A000217, since T(n-1) + T(n) = n(n-1)/2 + n(n+1)/2 = n*2n/2 = n^2. But it seems nontrivial to determine the squares that can be written as sum of more than 2 consecutive triangular numbers.
Some of these have two different decompositions of this form, e.g., 286^2 = T(13)+...+T(78) = T(75)+...+T(96), 826^2 = T(13)+...+T(159) = T(43)+...+T(160). What is the sequence of these numbers?
The terms > 2 of A129445, numbers k > 0 such that k^2 is a centered triangular number, form a subsequence: they correspond to k^2 = T(n-2) + T(n-1) + T(n), with n in sequence A129444: numbers n such that centered triangular number A005448(n) = 3n(n-1)/2 + 1 is a perfect square.
Terms > 2 of sequence A075870 also form a subsequence, namely the numbers whose square is the sum of four triangular numbers T(n-3)+...+T(n), with n given by twice the terms > 1 of A046090 or A182435.

Examples

			8^2 = T(5)+T(6)+T(7), 10^2 = T(5)+T(6)+T(7)+T(8), 19^2 = T(14)+T(15)+T(16), 26^2 = T(3)+...+T(15), 44^2 = T(13)+...+T(23), ...
		

Programs

  • PARI
    {a=[];(S(n)=binomial(n+2,3)); for(n=1,999,for(k=1,n-3,issquare(S(n)-S(k))&&a=concat(a,sqrtint(S(n)-S(k))))); Set(a)[1..50]}

Extensions

a(14), a(43)-a(54) from Chai Wah Wu, Jan 20 2016

A383734 Numbers k such that 2+k and 2*k are squares.

Original entry on oeis.org

2, 98, 3362, 114242, 3880898, 131836322, 4478554082, 152139002498, 5168247530882, 175568277047522, 5964153172084898, 202605639573839042, 6882627592338442562, 233806732499933208098, 7942546277405390632802, 269812766699283348307202, 9165691521498228451812098
Offset: 1

Views

Author

Emilio Martín, May 07 2025

Keywords

Comments

The limit of a(n+1)/a(n) is 33.97056... = 17+12*sqrt(2) = (3+2*sqrt(2))^2 (see A156164).

Examples

			98 is a term becouse 98+2=100 is a square and 98*2=196 is a square.
		

Crossrefs

Cf. A382209 (10+k and 10*k are squares).
Cf. A245226 (m such that k+m and k*m are squares).

Programs

  • Mathematica
    LinearRecurrence[{35, -35, 1}, {2, 98, 3362}, 20] (* Amiram Eldar, May 07 2025 *)
  • Python
    from itertools import islice
    def A383734_gen(): # generator of terms
        x, y = 1, 7
        while True:
            yield 2*x**2
            x, y = y, 6*y - x
    A383734_list = list(islice(A383734_gen(), 100))

Formula

a(n) = (1/2) * ((3+2*sqrt(2))^(2*n-1) + (3-2*sqrt(2))^(1-2*n)) - 1.
a(n) = -2*sqrt(2)*sinh(n*log(17+12*sqrt(2))) + 3*cosh(n*log(17+12*sqrt(2))) - 1.
a(n) = 2*A002315(n-1)^2.
a(n) = A075870(n)^2 - 2.
a(n) = 34*a(n-1) - a(n-2) + 32.
G.f.: 2 * (1 + 14*x + x^2) / ((1 - x)*(1 - 34*x + x^2)). - Stefano Spezia, May 08 2025

A100434 Expansion of g.f. (1+x)*(3+x)/(1+6*x^2+x^4).

Original entry on oeis.org

3, 4, -17, -24, 99, 140, -577, -816, 3363, 4756, -19601, -27720, 114243, 161564, -665857, -941664, 3880899, 5488420, -22619537, -31988856, 131836323, 186444716, -768398401, -1086679440, 4478554083, 6333631924, -26102926097, -36915112104, 152139002499, 215157040700
Offset: 0

Views

Author

N. J. A. Sloane, Nov 21 2004, suggested by correspondence from Creighton Dement

Keywords

Comments

From Creighton Dement, Dec 18 2004: (Start)
Define the following sequences:
b(2n) = c(2n+1), b(2n+1) = c(2n); (c(n)) = (1, -3, -7, 17, 41, -99, -239, 577, 1393, -3363, -8119, 19601, 47321). This is the sequence A001333, apart from signs. Then c(2n) = ((-1)^n)*A002315(n) and c(2n+1) = ((-1)^(n+1))*A001541(n+1).
(d(n)) = (2, 4, -10, -24, 58, 140, -338, -816, 1970, 4756, -11482, -27720). This is A052542, apart from signs. Also, d(2n) = ((-1)^n)*A075870(n), d(2n+1) = ((-1)^n)*A005319(n+1).
(e(n)) = (1, -1, -5, 5, 29, -29, -169, 169, 985, -985, -5741, 5741, 33461, -33461), e(2n) = d(2n)/2, e(2n+1) = - d(2n)/2.
(f(n)) = (2, 2, -12, -12, 70, 70, -408, -408, 2378, 2378, -13860, -13860, ) f(2n) = f(2n+1) = d(2n+1)/2.
(g(n)) = (0, -3, 0, 17, 0, -99, 0, 577, 0, -3363, 0, 19601, 0, -114243, 0, 665857), g(2n) = 0, g(2n+1) = c(2n+1).
Then a(2n) = - c(2n+1), a(2n+1) = d(2n+1) and we have the following conjectures: c(n) + d(n) = e(n) + f(n) = g(n) + a(n); c(n) + d(n) = b(n). In other words, the sequences (c(n) + d(n)) = (e(n) + f(n)) = (g(n) + h(n)) all represent the sequence c with even- and odd-indexed terms reversed. (End)

Crossrefs

Programs

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

Formula

a(n) = (-1)^floor(n/2)*A000034(n)*A126354(n+3). - R. J. Mathar, Mar 08 2009
a(n) = -2*a(n-1) - 3*a(n-2) if n is even; a(n) = (4*a(n-1) - a(n-2))/3 if n is odd. - R. J. Mathar, Jun 18 2014
Previous Showing 11-15 of 15 results.