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-10 of 19 results. Next

A002315 NSW numbers: a(n) = 6*a(n-1) - a(n-2); also a(n)^2 - 2*b(n)^2 = -1 with b(n) = A001653(n+1).

Original entry on oeis.org

1, 7, 41, 239, 1393, 8119, 47321, 275807, 1607521, 9369319, 54608393, 318281039, 1855077841, 10812186007, 63018038201, 367296043199, 2140758220993, 12477253282759, 72722761475561, 423859315570607, 2470433131948081, 14398739476117879, 83922003724759193
Offset: 0

Views

Author

Keywords

Comments

Named after the Newman-Shanks-Williams reference.
Also numbers k such that A125650(3*k^2) is an odd perfect square. Such numbers 3*k^2 form a bisection of A125651. - Alexander Adamchuk, Nov 30 2006
For positive n, a(n) corresponds to the sum of legs of near-isosceles primitive Pythagorean triangles (with consecutive legs). - Lekraj Beedassy, Feb 06 2007
Also numbers m such that m^2 is a centered 16-gonal number; or a number of the form 8k(k+1)+1, where k = A053141(m) = {0, 2, 14, 84, 492, 2870, ...}. - Alexander Adamchuk, Apr 21 2007
The lower principal convergents to 2^(1/2), beginning with 1/1, 7/5, 41/29, 239/169, comprise a strictly increasing sequence; numerators=A002315 and denominators=A001653. - Clark Kimberling, Aug 27 2008
The upper intermediate convergents to 2^(1/2) beginning with 10/7, 58/41, 338/239, 1970/1393 form a strictly decreasing sequence; essentially, numerators=A075870, denominators=A002315. - Clark Kimberling, Aug 27 2008
General recurrence is a(n) = (a(1)-1)*a(n-1) - a(n-2), a(1) >= 4, lim_{n->oo} a(n) = x*(k*x+1)^n, k = (a(1)-3), x = (1+sqrt((a(1)+1)/(a(1)-3)))/2. Examples in OEIS: a(1)=4 gives A002878. a(1)=5 gives A001834. a(1)=6 gives A030221. a(1)=7 gives A002315. a(1)=8 gives A033890. a(1)=9 gives A057080. a(1)=10 gives A057081. - Ctibor O. Zizka, Sep 02 2008
Numbers k such that (ceiling(sqrt(k*k/2)))^2 = (1+k*k)/2. - Ctibor O. Zizka, Nov 09 2009
A001109(n)/a(n) converges to cos^2(Pi/8) = 1/2 + 2^(1/2)/4. - Gary Detlefs, Nov 25 2009
The values 2(a(n)^2+1) are all perfect squares, whose square root is given by A075870. - Neelesh Bodas (neelesh.bodas(AT)gmail.com), Aug 13 2010
a(n) represents all positive integers K for which 2(K^2+1) is a perfect square. - Neelesh Bodas (neelesh.bodas(AT)gmail.com), Aug 13 2010
For positive n, a(n) equals the permanent of the (2n) X (2n) tridiagonal matrix with sqrt(8)'s along the main diagonal, and i's along the superdiagonal and subdiagonal (i is the imaginary unit). - John M. Campbell, Jul 08 2011
Integers k such that A000217(k-2) + A000217(k-1) + A000217(k) + A000217(k+1) is a square (cf. A202391). - Max Alekseyev, Dec 19 2011
Integer square roots of floor(k^2/2 - 1) or A047838. - Richard R. Forberg, Aug 01 2013
Remark: x^2 - 2*y^2 = +2*k^2, with positive k, and X^2 - 2*Y^2 = +2 reduce to the present Pell equation a^2 - 2*b^2 = -1 with x = k*X = 2*k*b and y = k*Y = k*a. (After a proposed solution for k = 3 by Alexander Samokrutov.) - Wolfdieter Lang, Aug 21 2015
If p is an odd prime, a((p-1)/2) == 1 (mod p). - Altug Alkan, Mar 17 2016
a(n)^2 + 1 = 2*b(n)^2, with b(n) = A001653(n), is the necessary and sufficient condition for a(n) to be a number k for which the diagonal of a 1 X k rectangle is an integer multiple of the diagonal of a 1 X 1 square. If squares are laid out thus along one diagonal of a horizontal 1 X a(n) rectangle, from the lower left corner to the upper right, the number of squares is b(n), and there will always be a square whose top corner lies exactly within the top edge of the rectangle. Numbering the squares 1 to b(n) from left to right, the number of the one square that has a corner in the top edge of the rectangle is c(n) = (2*b(n) - a(n) + 1)/2, which is A055997(n). The horizontal component of the corner of the square in the edge of the rectangle is also an integer, namely d(n) = a(n) - b(n), which is A001542(n). - David Pasino, Jun 30 2016
(a(n)^2)-th triangular number is a square; a(n)^2 = A008843(n) is a subsequence of A001108. - Jaroslav Krizek, Aug 05 2016
a(n-1)/A001653(n) is the closest rational approximation of sqrt(2) with a numerator not larger than a(n-1). These rational approximations together with those obtained from the sequences A001541 and A001542 give a complete set of closest rational approximations of sqrt(2) with restricted numerator or denominator. a(n-1)/A001653(n) < sqrt(2). - A.H.M. Smeets, May 28 2017
Consider the quadrant of a circle with center (0,0) bounded by the positive x and y axes. Now consider, as the start of a series, the circle contained within this quadrant which kisses both axes and the outer bounding circle. Consider further a succession of circles, each kissing the x-axis, the outer bounding circle, and the previous circle in the series. See Holmes link. The center of the n-th circle in this series is ((A001653(n)*sqrt(2)-1)/a(n-1), (A001653(n)*sqrt(2)-1)/a(n-1)^2), the y-coordinate also being its radius. It follows that a(n-1) is the cotangent of the angle subtended at point (0,0) by the center of the n-th circle in the series with respect to the x-axis. - Graham Holmes, Aug 31 2019
There is a link between the two sequences present at the numerator and at the denominator of the fractions that give the coordinates of the center of the kissing circles. A001653 is the sequence of numbers k such that 2*k^2 - 1 is a square, and here, we have 2*A001653(n)^2 - 1 = a(n-1)^2. - Bernard Schott, Sep 02 2019
Let G be a sequence satisfying G(i) = 2*G(i-1) + G(i-2) for arbitrary integers i and without regard to the initial values of G. Then a(n) = (G(i+4*n+2) - G(i))/(2*G(i+2*n+1)) as long as G(i+2*n+1) != 0. - Klaus Purath, Mar 25 2021
All of the positive integer solutions of a*b+1=x^2, a*c+1=y^2, b*c+1=z^2, x+z=2*y, 0 < a < b < c are given by a=A001542(n), b=A005319(n), c=A001542(n+1), x=A001541(n), y=A001653(n+1), z=A002315(n) with 0 < n. - Michael Somos, Jun 26 2022
3*a(n-1) is the n-th almost Lucas-cobalancing number of second type (see Tekcan and Erdem). - Stefano Spezia, Nov 26 2022
In Moret-Blanc (1881) on page 259 some solution of m^2 - 2n^2 = -1 are listed. The values of m give this sequence, and the values of n give A001653. - Michael Somos, Oct 25 2023
From Klaus Purath, May 11 2024: (Start)
For any two consecutive terms (a(n), a(n+1)) = (x,y): x^2 - 6xy + y^2 = 8 = A028884(1). In general, the following applies to all sequences (t) satisfying t(i) = 6t(i-1) - t(i-2) with t(0) = 1 and two consecutive terms (x,y): x^2 - 6xy + y^2 = A028884(t(1)-6). This includes and interprets the Feb 04 2014 comment on A001541 by Colin Barker as well as the Mar 17 2021 comment on A054489 by John O. Oladokun and the Sep 28 2008 formula on A038723 by Michael Somos. By analogy to this, for three consecutive terms (x,y,z) y^2 - xz = A028884(t(1)-6) always applies.
If (t) is a sequence satisfying t(k) = 7t(k-1) - 7t(k-2) + t(k-3) or t(k) = 6t(k-1) - t(k-2) without regard to initial values and including this sequence itself, then a(n) = (t(k+2n+1) - t(k))/(t(k+n+1) - t(k+n)) always applies, as long as t(k+n+1) - t(k+n) != 0 for integer k and n >= 0. (End)

Examples

			G.f. = 1 + 7*x + 41*x^2 + 239*x^3 + 1393*x^4 + 8119*x^5 + 17321*x^6 + ... - _Michael Somos_, Jun 26 2022
		

References

  • Julio R. Bastida, Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163-166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009)
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 256.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 288.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 247.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • P.-F. Teilhet, Reply to Query 2094, L'Intermédiaire des Mathématiciens, 10 (1903), 235-238.
  • P.-F. Teilhet, Query 2376, L'Intermédiaire des Mathématiciens, 11 (1904), 138-139. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Bisection of A001333. Cf. A001109, A001653. A065513(n)=a(n)-1.
First differences of A001108 and A055997. Bisection of A084068 and A088014. Cf. A077444.
Row sums of unsigned triangle A127675.
Cf. A053141, A075870. Cf. A000045, A002878, A004146, A026003, A100047, A119915, A192425, A088165 (prime subsequence), A057084 (binomial transform), A108051 (inverse binomial transform).
See comments in A301383.
Cf. similar sequences of the type (1/k)*sinh((2*n+1)*arcsinh(k)) listed in A097775.

Programs

  • Haskell
    a002315 n = a002315_list !! n
    a002315_list = 1 : 7 : zipWith (-) (map (* 6) (tail a002315_list)) a002315_list
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    I:=[1,7]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
  • Maple
    A002315 := proc(n)
        option remember;
        if n = 0 then
            1 ;
        elif n = 1 then
            7;
        else
            6*procname(n-1)-procname(n-2) ;
        end if;
    end proc: # Zerinvary Lajos, Jul 26 2006, modified R. J. Mathar, Apr 30 2017
    a:=n->abs(Im(simplify(ChebyshevT(2*n+1,I)))):seq(a(n),n=0..20); # Leonid Bedratyuk, Dec 17 2017
    # third Maple program:
    a:= n-> (<<0|1>, <-1|6>>^n. <<1, 7>>)[1, 1]:
    seq(a(n), n=0..22);  # Alois P. Heinz, Aug 25 2024
  • Mathematica
    a[0] = 1; a[1] = 7; a[n_] := a[n] = 6a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 09 2004 *)
    Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{-1,6},#]}]&, {1,7},20]][[1]]  (* Harvey P. Dale, Mar 23 2011 *)
    Table[ If[n>0, a=b; b=c; c=6b-a, b=-1; c=1], {n, 0, 20}] (* Jean-François Alcover, Oct 19 2012 *)
    LinearRecurrence[{6, -1}, {1, 7}, 20] (* Bruno Berselli, Apr 03 2018 *)
    a[ n_] := -I*(-1)^n*ChebyshevT[2*n + 1, I]; (* Michael Somos, Jun 26 2022 *)
  • PARI
    {a(n) = subst(poltchebi(abs(n+1)) - poltchebi(abs(n)), x, 3)/2};
    
  • PARI
    {a(n) = if(n<0, -a(-1-n), polsym(x^2-2*x-1, 2*n+1)[2*n+2]/2)};
    
  • PARI
    {a(n) = my(w=3+quadgen(32)); imag((1+w)*w^n)};
    
  • PARI
    for (i=1,10000,if(Mod(sigma(i^2+1,2),2)==1,print1(i,",")))
    
  • PARI
    {a(n) = -I*(-1)^n*polchebyshev(2*n+1, 1, I)}; /* Michael Somos, Jun 26 2022 */
    

Formula

a(n) = (1/2)*((1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1)).
a(n) = A001109(n)+A001109(n+1).
a(n) = (1+sqrt(2))/2*(3+sqrt(8))^n+(1-sqrt(2))/2*(3-sqrt(8))^n. - Ralf Stephan, Feb 23 2003
a(n) = sqrt(2*(A001653(n+1))^2-1), n >= 0. [Pell equation a(n)^2 - 2*Pell(2*n+1)^2 = -1. - Wolfdieter Lang, Jul 11 2018]
G.f.: (1 + x)/(1 - 6*x + x^2). - Simon Plouffe in his 1992 dissertation
a(n) = S(n, 6)+S(n-1, 6) = S(2*n, sqrt(8)), S(n, x) = U(n, x/2) are Chebyshev's polynomials of the 2nd kind. Cf. A049310. S(n, 6)= A001109(n+1).
a(n) ~ (1/2)*(sqrt(2) + 1)^(2*n+1). - Joe Keane (jgk(AT)jgk.org), May 15 2002
Limit_{n->oo} a(n)/a(n-1) = 3 + 2*sqrt(2). - Gregory V. Richardson, Oct 06 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i); then (-1)^n*q(n, -8) = a(n). - Benoit Cloitre, Nov 10 2002
With a=3+2*sqrt(2), b=3-2*sqrt(2): a(n) = (a^((2n+1)/2)-b^((2n+1)/2))/2. a(n) = A077444(n)/2. - Mario Catalani (mario.catalani(AT)unito.it), Mar 31 2003
a(n) = Sum_{k=0..n} 2^k*binomial(2*n+1, 2*k). - Zoltan Zachar (zachar(AT)fellner.sulinet.hu), Oct 08 2003
Same as: i such that sigma(i^2+1, 2) mod 2 = 1. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004
a(n) = L(n, -6)*(-1)^n, where L is defined as in A108299; see also A001653 for L(n, +6). - Reinhard Zumkeller, Jun 01 2005
a(n) = A001652(n)+A046090(n); e.g., 239=119+120. - Charlie Marion, Nov 20 2003
A001541(n)*a(n+k) = A001652(2n+k) + A001652(k)+1; e.g., 3*1393 = 4069 + 119 + 1; for k > 0, A001541(n+k)*a(n) = A001652(2n+k) - A001652(k-1); e.g., 99*7 = 696 - 3. - Charlie Marion, Mar 17 2003
a(n) = Jacobi_P(n,1/2,-1/2,3)/Jacobi_P(n,-1/2,1/2,1). - Paul Barry, Feb 03 2006
P_{2n}+P_{2n+1} where P_i are the Pell numbers (A000129). Also the square root of the partial sums of Pell numbers: P_{2n}+P_{2n+1} = sqrt(Sum_{i=0..4n+1} P_i) (Santana and Diaz-Barrero, 2006). - David Eppstein, Jan 28 2007
a(n) = 2*A001652(n) + 1 = 2*A046729(n) + (-1)^n. - Lekraj Beedassy, Feb 06 2007
a(n) = sqrt(A001108(2*n+1)). - Anton Vrba (antonvrba(AT)yahoo.com), Feb 14 2007
a(n) = sqrt(8*A053141(n)*(A053141(n) + 1) + 1). - Alexander Adamchuk, Apr 21 2007
a(n+1) = 3*a(n) + sqrt(8*a(n)^2 + 8), a(1)=1. - Richard Choulet, Sep 18 2007
a(n) = A001333(2*n+1). - Ctibor O. Zizka, Aug 13 2008
a(n) = third binomial transform of 1, 4, 8, 32, 64, 256, 512, ... . - Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009
a(n) = (-1)^(n-1)*(1/sqrt(-1))*cos((2*n - 1)*arcsin(sqrt(2)). - Artur Jasinski, Feb 17 2010 *WRONG*
a(n+k) = A001541(k)*a(n) + 4*A001109(k)*A001653(n); e.g., 8119 = 17*239 + 4*6*169. - Charlie Marion, Feb 04 2011
In general, a(n+k) = A001541(k)*a(n)) + sqrt(A001108(2k)*(a(n)^2+1)). See Sep 18 2007 entry above. - Charlie Marion, Dec 07 2011
a(n) = floor((1+sqrt(2))^(2n+1))/2. - Thomas Ordowski, Jun 12 2012
(a(2n-1) + a(2n) + 8)/(8*a(n)) = A001653(n). - Ignacio Larrosa Cañestro, Jan 02 2015
(a(2n) + a(2n-1))/a(n) = 2*sqrt(2)*( (1 + sqrt(2))^(4*n) - (1 - sqrt(2))^(4*n))/((1 + sqrt(2))^(2*n+1) + (1 - sqrt(2))^(2*n+1)). [This was my solution to problem 5325, School Science and Mathematics 114 (No. 8, Dec 2014).] - Henry Ricardo, Feb 05 2015
From Peter Bala, Mar 22 2015: (Start)
The aerated sequence (b(n))n>=1 = [1, 0, 7, 0, 41, 0, 239, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -4, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047.
b(n) = 1/2*((-1)^n - 1)*Pell(n) + 1/2*(1 + (-1)^(n+1))*Pell(n+1). The o.g.f. is x*(1 + x^2)/(1 - 6*x^2 + x^4).
Exp( Sum_{n >= 1} 2*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 2*A026003(n-1)*x^n.
Exp( Sum_{n >= 1} (-2)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 2*A026003(n-1)*(-x)^n.
Exp( Sum_{n >= 1} 4*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 4*Pell(n)*x^n.
Exp( Sum_{n >= 1} (-4)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 4*Pell(n)*(-x)^n.
Exp( Sum_{n >= 1} 8*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 8*A119915(n)*x^n.
Exp( Sum_{n >= 1} (-8)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 8*A119915(n)*(-x)^n. Cf. A002878, A004146, A113224, and A192425. (End)
E.g.f.: (sqrt(2)*sinh(2*sqrt(2)*x) + cosh(2*sqrt(2)*x))*exp(3*x). - Ilya Gutkovskiy, Jun 30 2016
a(n) = Sum_{k=0..n} binomial(n,k) * 3^(n-k) * 2^k * 2^ceiling(k/2). - David Pasino, Jul 09 2016
a(n) = A001541(n) + 2*A001542(n). - A.H.M. Smeets, May 28 2017
a(n+1) = 3*a(n) + 4*b(n), b(n+1) = 2*a(n) + 3*b(n), with b(n)=A001653(n). - Zak Seidov, Jul 13 2017
a(n) = |Im(T(2n-1,i))|, i=sqrt(-1), T(n,x) is the Chebyshev polynomial of the first kind, Im is the imaginary part of a complex number, || is the absolute value. - Leonid Bedratyuk, Dec 17 2017
a(n) = sinh((2*n + 1)*arcsinh(1)). - Bruno Berselli, Apr 03 2018
a(n) = 5*a(n-1) + A003499(n-1), a(0) = 1. - Ivan N. Ianakiev, Aug 09 2019
From Klaus Purath, Mar 25 2021: (Start)
a(n) = A046090(2*n)/A001541(n).
a(n+1)*a(n+2) = a(n)*a(n+3) + 48.
a(n)^2 + a(n+1)^2 = 6*a(n)*a(n+1) + 8.
a(n+1)^2 = a(n)*a(n+2) + 8.
a(n+1) = a(n) + 2*A001541(n+1).
a(n) = 2*A046090(n) - 1. (End)
3*a(n-1) = sqrt(8*b(n)^2 + 8*b(n) - 7), where b(n) = A358682(n). - Stefano Spezia, Nov 26 2022
a(n) = -(-1)^n - 2 + Sum_{i=0..n} A002203(i)^2. - Adam Mohamed, Aug 22 2024
From Peter Bala, May 09 2025: (Start)
a(n) = Dir(n, 3), where Dir(n, x) denotes the n-th row polynomial of the triangle A244419.
For arbitrary x, a(n+x)^2 - 6*a(n+x)*a(n+x+1) + a(n+x+1)^2 = 8 with a(n) := (1/2)*((1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1)) as above. The particular case x = 0 is noted above,
a(n+1/2) = sqrt(2) * A001542(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/8 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A081554(n) + 1/A081554(n+1)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(2) (telescoping product: Product_{n = 1..k} ((a(n) + 1)/(a(n) - 1))^2 = 2*(1 - 1/A055997(k+2))). (End)

A038873 Primes p such that 2 is a square mod p; or, primes congruent to {1, 2, 7} mod 8.

Original entry on oeis.org

2, 7, 17, 23, 31, 41, 47, 71, 73, 79, 89, 97, 103, 113, 127, 137, 151, 167, 191, 193, 199, 223, 233, 239, 241, 257, 263, 271, 281, 311, 313, 337, 353, 359, 367, 383, 401, 409, 431, 433, 439, 449, 457, 463, 479, 487, 503, 521, 569, 577, 593, 599, 601, 607, 617
Offset: 1

Views

Author

Keywords

Comments

Same as A001132 except for initial term.
Primes p such that x^2 = 2 has a solution mod p.
The primes of the form x^2 + 2xy - y^2 coincide with this sequence. These are also primes of the form u^2 - 2v^2. - Tito Piezas III, Dec 28 2008
Therefore these are composite in Z[sqrt(2)], as they can be factored as (u^2 - 2v^2)*(u^2 + 2v^2). - Alonso del Arte, Oct 03 2012
After a(1) = 2, these are the primes p such that p^4 == 1 (mod 96). - Gary Detlefs, Jan 22 2014
Also primes of the form 2v^2 - u^2. For example, 23 = 2*4^2 - 3^2. - Jerzy R Borysowicz, Oct 27 2015
Prime factors of A008865 and A028884. - Klaus Purath, Dec 07 2020

References

  • W. J. LeVeque, Topics in Number Theory. Addison-Wesley, Reading, MA, 2 vols., 1956, Vol. 1, Theorem 5-5, p. 68.

Crossrefs

Cf. A057126, A087780, A226523, A003629 (complement).
Primes in A035251.
For primes p such that x^m == 2 mod p has a solution for m = 2,3,4,5,6,7,... see A038873, A040028, A040098, A040159, A040992, A042966, ...

Programs

  • Magma
    [ p: p in PrimesUpTo(617) | IsSquare(R!2) where R:=ResidueClassRing(p) ]; // Klaus Brockhaus, Dec 02 2008
    
  • Maple
    seq(`if`(member(ithprime(n) mod 8, {1,2,7}),ithprime(n),NULL),n=1..113); # Nathaniel Johnston, Jun 26 2011
  • Mathematica
    fQ[n_] := MemberQ[{1, 2, 7}, Mod[n, 8]]; Select[ Prime[Range[114]], fQ] (* Robert G. Wilson v, Oct 18 2011 *)
  • PARI
    is(n)=isprime(n) && issquare(Mod(2,n)) \\ Charles R Greathouse IV, Apr 23 2015
    
  • PARI
    is(n)=abs(centerlift(Mod(n,8)))<3 && isprime(n) \\ Charles R Greathouse IV, Nov 14 2017

Formula

a(n) ~ 2n log n. - Charles R Greathouse IV, Nov 29 2016

A028560 a(n) = n*(n + 6).

Original entry on oeis.org

0, 7, 16, 27, 40, 55, 72, 91, 112, 135, 160, 187, 216, 247, 280, 315, 352, 391, 432, 475, 520, 567, 616, 667, 720, 775, 832, 891, 952, 1015, 1080, 1147, 1216, 1287, 1360, 1435, 1512, 1591, 1672, 1755, 1840, 1927, 2016, 2107, 2200, 2295, 2392
Offset: 0

Views

Author

Keywords

Comments

Nonnegative X values of solutions to the equation X + (X + 3)^2 + (X + 6)^3 = Y^2. To prove that X = n^2 + 6n: Y^2 = X + (X + 3)^2 + (X + 6)^3 = X^3 + 19*X^2 + 115X + 225 = (X + 9)*(X^2 + 10X + 25) = (X + 9)*(X + 5)^2 it means: (X + 9) must be a perfect square, so X = k^2 - 9 with k>=3. we can put: k = n + 3, which gives: X = n^2 + 6n and Y = (n + 3)*(n^2 + 6n + 5). - Mohamed Bouhamida, Nov 12 2007
a(m) where m is a positive integer are the only positive integer values of t for which the Binet-de Moivre Formula of the recurrence b(n)=6*b(n-1)+t*b(n-2) with b(0)=0 and b(1)=1 has a root which is a square. In particular, sqrt(6^2+4*t) is an integer since 6^2+4*t=6^2+4*a(m)=(2*m+6)^2. Thus, the charcteristic roots are k1=6+m and k2=-m. - Felix P. Muga II, Mar 27 2014
Also, numbers k such that k + 9 is a perfect square.

Crossrefs

a(n-3), n>=4, third column (used for the Paschen series of the hydrogen atom) of triangle A120070.
Cf. A005563.

Programs

Formula

a(n) = (n+3)^2 - 3^2 = n*(n+6).
G.f.: x*(7-5*x)/(1-x)^3.
a(n) = 2*n + a(n-1) + 5. - Vincenzo Librandi, Aug 05 2010
Sum_{n>=1} 1/a(n) = 49/120 = 0.4083333... - R. J. Mathar, Mar 22 2011
a(n) = A028884(n) - 1. - Reinhard Zumkeller, Apr 07 2013
E.g.f.: x*(x+7)*exp(x). - G. C. Greubel, Aug 19 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = 37/360. - Amiram Eldar, Nov 04 2020
a(n) = A056220(n+1) - A000290(n-1). - Leo Tavares, Sep 29 2022
From Amiram Eldar, Feb 05 2024: (Start)
Product_{n>=1} (1 - 1/a(n)) = -4*sqrt(10)*sin(sqrt(10)*Pi)/(3*Pi).
Product_{n>=1} (1 + 1/a(n)) = 45*sqrt(2)*sin(2*sqrt(2)*Pi)/(7*Pi). (End)

Extensions

Edited by Robert G. Wilson v, Feb 06 2002

A001614 Connell sequence: 1 odd, 2 even, 3 odd, ...

Original entry on oeis.org

1, 2, 4, 5, 7, 9, 10, 12, 14, 16, 17, 19, 21, 23, 25, 26, 28, 30, 32, 34, 36, 37, 39, 41, 43, 45, 47, 49, 50, 52, 54, 56, 58, 60, 62, 64, 65, 67, 69, 71, 73, 75, 77, 79, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 122
Offset: 1

Views

Author

Keywords

Comments

Next (2n-1) odd numbers alternating with next 2n even numbers. Squares (A000290(n)) occur at the A000217(n)-th entry. - Lekraj Beedassy, Aug 06 2004. - Comment corrected by Daniel Forgues, Jul 18 2009
a(t_n) = a(n(n+1)/2) = n^2 relates squares to triangular numbers. - Daniel Forgues
The natural numbers not included are A118011(n) = 4n - a(n) as n=1,2,3,... - Paul D. Hanna, Apr 10 2006
As a triangle with row sums = A069778 (1, 6, 21, 52, 105, ...): /Q 1;/Q 2, 4;/Q 5, 7, 9;/Q 10, 12, 14, 16;/Q ... . - Gary W. Adamson, Sep 01 2008
The triangle sums, see A180662 for their definitions, link the Connell sequence A001614 as a triangle with six sequences, see the crossrefs. - Johannes W. Meijer, May 20 2011
a(n) = A122797(n) + n - 1. - Reinhard Zumkeller, Feb 12 2012

Examples

			From _Omar E. Pol_, Aug 13 2013: (Start)
Written as a triangle the sequence begins:
   1;
   2,  4;
   5,  7,  9;
  10, 12, 14, 16;
  17, 19, 21, 23, 25;
  26, 28, 30, 32, 34, 36;
  37, 39, 41, 43, 45, 47, 49;
  50, 52, 54, 56, 58, 60, 62, 64;
  65, 67, 69, 71, 73, 75, 77, 79, 81;
  82, 84, 86, 88, 90, 92, 94, 96, 98, 100;
  ...
Right border gives A000290, n >= 1.
(End)
		

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 276.
  • C. A. Pickover, The Mathematics of Oz, Chapter 39, Camb. Univ. Press UK 2002.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A117384, A118011 (complement), A118012.
Cf. A069778. - Gary W. Adamson, Sep 01 2008
From Johannes W. Meijer, May 20 2011: (Start)
Triangle columns: A002522, A117950 (n>=1), A117951 (n>=2), A117619 (n>=3), A154533 (n>=5), A000290 (n>=1), A008865 (n>=2), A028347 (n>=3), A028878 (n>=1), A028884 (n>=2), A054569 [T(2*n,n)].
Triangle sums (see the comments): A069778 (Row1), A190716 (Row2), A058187 (Related to Kn11, Kn12, Kn13, Kn21, Kn22, Kn23, Fi1, Fi2, Ze1 and Ze2), A000292 (Related to Kn3, Kn4, Ca3, Ca4, Gi3 and Gi4), A190717 (Related to Ca1, Ca2, Ze3, Ze4), A190718 (Related to Gi1 and Gi2). (End)

Programs

  • Haskell
    a001614 n = a001614_list !! (n-1)
    a001614_list = f 0 0 a057211_list where
       f c z (x:xs) = z' : f x z' xs where z' = z + 1 + 0 ^ abs (x - c)
    -- Reinhard Zumkeller, Dec 30 2011
    
  • Magma
    [2*n-Round(Sqrt(2*n)): n in [1..80]]; // Vincenzo Librandi, Apr 17 2015
    
  • Maple
    A001614:=proc(n): 2*n - floor((1+sqrt(8*n-7))/2) end: seq(A001614(n),n=1..67); # Johannes W. Meijer, May 20 2011
  • Mathematica
    lst={};i=0;For[j=1, j<=4!, a=i+1;b=j;k=0;For[i=a, i<=9!, k++;AppendTo[lst, i];If[k>=b, Break[]];i=i+2];j++ ];lst (* Vladimir Joseph Stephan Orlovsky, Aug 29 2008 *)
    row[n_] := 2*Range[n+1]+n^2-1; Table[row[n], {n, 0, 11}] // Flatten (* Jean-François Alcover, Oct 25 2013 *)
  • PARI
    a(n)=2*n - round(sqrt(2*n)) \\ Charles R Greathouse IV, Apr 20 2015
    
  • Python
    from math import isqrt
    def A001614(n): return (m:=n<<1)-(k:=isqrt(m))-int((m<<2)>(k<<2)*(k+1)+1) # Chai Wah Wu, Jul 26 2022

Formula

a(n) = 2*n - floor( (1+ sqrt(8*n-7))/2 ).
a(n) = A005843(n) - A002024(n). - Lekraj Beedassy, Aug 06 2004
a(n) = A118012(A118011(n)). A117384( a(n) ) = n; A117384( 4*n - a(n) ) = n. - Paul D. Hanna, Apr 10 2006
a(1) = 1; then a(n) = a(n-1)+1 if a(n-1) is a square, a(n) = a(n-1)+2 otherwise. For example, a(21)=36 is a square therefore a(22)=36+1=37 which is not a square so a(23)=37+2=39 ... - Benoit Cloitre, Feb 07 2007
T(n,k) = (n-1)^2 + 2*k - 1. - Omar E. Pol, Aug 13 2013
a(n)^2 = a(n*(n+1)/2). - Ivan N. Ianakiev, Aug 15 2013
Let the sequence be written in the form of the triangle in the EXAMPLE section below and let a(n) and a(n+1) belong to the same row of the triangle. Then a(n)*a(n+1) + 1 = a(A000217(A118011(n))) = A000290(A118011(n)). - Ivan N. Ianakiev, Aug 16 2013
a(n) = 2*n-round(sqrt(2*n)). - Gerald Hillier, Apr 15 2015
From Robert Israel, Apr 20 2015 (Start):
G.f.: 2*x/(1-x)^2 - (x/(1-x))*Sum_{n>=0} x^(n*(n+1)/2) = 2*x/(1-x)^2 - (Theta2(0,x^(1/2)))*x^(7/8)/(2*(1-x)) where Theta2 is a Jacobi theta function.
a(n) = 2*n-1 - Sum_{i=0..n-2} A023531(i). (End)
a(n) = 3*n-A014132(n). - Chai Wah Wu, Oct 19 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Mar 16 2001

A014616 a(n) = solution to the postage stamp problem with 2 denominations and n stamps.

Original entry on oeis.org

2, 4, 7, 10, 14, 18, 23, 28, 34, 40, 47, 54, 62, 70, 79, 88, 98, 108, 119, 130, 142, 154, 167, 180, 194, 208, 223, 238, 254, 270, 287, 304, 322, 340, 359, 378, 398, 418, 439, 460, 482, 504, 527, 550, 574, 598, 623, 648, 674, 700, 727, 754, 782, 810, 839, 868
Offset: 1

Views

Author

Keywords

Comments

Fred Lunnon [W. F. Lunnon] defines "solution" to be the smallest value not obtainable by the best set of stamps. The solutions given are one lower than this, that is, the sequence gives the largest number obtainable without a break using the best set of stamps.
a(n-2), for n >= 3, is the number of independent entries of a bisymmetric n X n matrix B_n with B_n[1,1] and B_n[n,n] fixed. Hence a(n-2) = A002620(n+1) - 2. See the Jul 07 2015 comment on A002620. For n=1 and n=2 this matrix B_n is fixed. Bisymmetric matrices B_n, with B_n[1,1] and B_n[n,n] fixed, are, for n >= 3, determined by giving the a(n-2) entries for [1,2], ...., [1,n-1]; [2,2], ..., [2,n-1]; [3,3], ..., [3,n-2]; ..., [ceiling(n/2),n-(ceiling(n/2)-1)]. - Wolfdieter Lang, Aug 16 2015
a(n-1) is the largest possible n-th element in an additive basis of order 2. - Charles R Greathouse IV, May 05 2020

Examples

			Bisymmetric matrix B_5, with B_5[1,1] and B_5[5,5] fixed, have a(3) free entries: for rows 1 and 2: each 3, row 3:  1, altogether 3 + 3 + 1 = 7 = a(5-2). Mark the corresponding matrix entries with x, and obtain a pattern symmetric around the central vertical. - _Wolfdieter Lang_, Aug 16 2015
		

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section C12, pp. 185-190.

Crossrefs

A row or column of the array A196416 (possibly with 1 subtracted from it).

Programs

Formula

a(n) = floor((n^2 + 6*n + 1)/4).
a(n) = A002620(n+3) - 2 = A024206(n+2) - 1 = (2*n*(n+6)-(-1)^n+1)/8.
G.f.: x*(-2 + x^2)/((1 + x)*(x - 1)^3). - R. J. Mathar, Jul 09 2011
a(n) = floor(A028884(n+1)/4). - Reinhard Zumkeller, Apr 07 2013
a(n)+a(n+1) = A046691(n+1). - R. J. Mathar, Mar 13 2021
a(n) = 2*n + A002620(n-1). - Michael Chu, Apr 28 2022
a(n) = A004116(n) + 1. - Michael Chu, May 02 2022
E.g.f.: (x*(7 + x)*cosh(x) + (1 + 7*x + x^2)*sinh(x))/4. - Stefano Spezia, Nov 09 2022
Sum_{n>=1} 1/a(n) = 67/36 - cot(sqrt(2)*Pi)*Pi/(2*sqrt(2)). - Amiram Eldar, Dec 10 2022

Extensions

Entry improved by comments from John Seldon (johnseldon(AT)onetel.com), Sep 15 2004
More terms from John W. Layman, Apr 13 1999

A046691 a(n) = (n^2 + 5*n - 2)/2.

Original entry on oeis.org

-1, 2, 6, 11, 17, 24, 32, 41, 51, 62, 74, 87, 101, 116, 132, 149, 167, 186, 206, 227, 249, 272, 296, 321, 347, 374, 402, 431, 461, 492, 524, 557, 591, 626, 662, 699, 737, 776, 816, 857, 899, 942, 986, 1031, 1077, 1124, 1172, 1221, 1271, 1322
Offset: 0

Views

Author

Keywords

Comments

If Y_i (i=1,2,3,4) are 2-blocks of an n-set X then, for n>=8, a(n-3) is the number of (n-2)-subsets of X intersecting each Y_i (i=1,2,3,4). - Milan Janjic, Nov 09 2007
Numbers m > -3 such that 8*m + 33 is a square. - Bruno Berselli, Aug 20 2015
a(n-1) yields the second Betti number of a path graph on n vertices. - Samuel J. Bevins, Nov 27 2022

Crossrefs

Triangular numbers (A000217) minus 4. Cf. A027379.

Programs

Formula

G.f.: (-1 + 5*x - 3*x^2)/(1 - x)^3.
a(n) = a(n-1) + n + 2 with a(0) = -1. - Vincenzo Librandi, Nov 18 2010
a(n) = 3*A000096(n-1) - 2*A000096(n-2), with A000096(-2)=A000096(-1)=-1. - Bruno Berselli, Dec 17 2014
a(n) = 2*A000217(n) - A000217(n-2), with A000217(-2)=1, A000217(-1)=0. - Bruno Berselli, Oct 13 2016
E.g.f.: (1/2)*(x^2 + 6*x - 2)*exp(x). - G. C. Greubel, Jul 13 2017
a(n) + a(n+1) = A028884(n). - R. J. Mathar, Mar 13 2021
a(n) = A000217(n+2) - 4. - G. C. Greubel, Jul 31 2022
Sum_{n>=0} 1/a(n) = 7/12 + 2*Pi*tan(sqrt(33)*Pi/2)/sqrt(33). - Vaclav Kotesovec, Dec 31 2022

A116940 Greatest m such that A116939(m) = n.

Original entry on oeis.org

0, 3, 6, 11, 16, 23, 30, 39, 48, 59, 70, 83, 96, 111, 126, 143, 160, 179, 198, 219, 240, 263, 286, 311, 336, 363, 390, 419, 448, 479, 510, 543, 576, 611, 646, 683, 720, 759, 798, 839, 880, 923, 966, 1011, 1056, 1103, 1150, 1199, 1248, 1299, 1350, 1403, 1456
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 27 2006

Keywords

Comments

From Andrew Rupinski, Nov 30 2009: (Start)
For n > 0, a(n) appears to be the set such that binomial(2*a(n),r) - binomial(2*a(n),r-2) = binomial(2*a(n),s) - binomial(2*a(n),s-2) for some r != s.
As a consequence of the Weyl Dimension Formula and the above comment, a(n) also appears to be the indices k such that the Symplectic Group Sp(k) has two fundamental irreducible representations of the same dimension. (End)

Examples

			a(n) = A000982(n) + A005843(n).
From _Andrew Rupinski_, Nov 30 2009: (Start)
a(1) = 3 and binomial(6,3)-binomial(6,1) = binomial(6,2)-binomial(6,0).
a(1) = 3 and the fundamental representations of Sp(3) are of dimensions 6, 14 and 14. a(2) = 6 and the fundamental representations of Sp(6) are of dimensions 12, 65, 208, 429, 572, and 429. (End)
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a116940 n = last $ elemIndices n $ takeWhile (<= n + 1) a116939_list
    -- Reinhard Zumkeller, Jun 28 2013
    
  • Magma
    [(2*n*(n+4) -(-1)^n +1)/4: n in [0..55]]; // G. C. Greubel, Jan 26 2020
    
  • Maple
    seq( (2*(n+2)^2 -(-1)^n -7)/4, n=0..55); # G. C. Greubel, Jan 26 2020
  • Mathematica
    a = {0}; Do[AppendTo[a, If[Count[a, #-1] > #-1, #+1, #-1]] &@ a[[n]], {n, 1500}]; Most@ Values@ Map[Last, PositionIndex@ a] - 1 (* Michael De Vlieger, Dec 07 2016, Version 10 *)
    Table[(2*(n+2)^2 -(-1)^n -7)/4, {n,0,55}] (* G. C. Greubel, Jan 26 2020 *)
  • PARI
    vector(56, n, (2*(n+1)^2 +(-1)^n -7)/4) \\ G. C. Greubel, Jan 26 2020
    
  • Sage
    [(2*n*(n+4) -(-1)^n +1)/4 for n in (0..55)] # G. C. Greubel, Jan 26 2020

Formula

a(0) = 0, a(n+1) = a(n) + 2*floor(n/2) + 3.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4). - Joerg Arndt, Apr 02 2011
G.f.: x*(3 - x^2)/((1 + x)*(1 - x)^3). - Arkadiusz Wesolowski, Jan 01 2012
a(n) = 2n + ceiling(n^2/2). - Wesley Ivan Hurt, Jun 14 2013
a(n) = (2*n*(n + 4) - (-1)^n + 1)/4. - Bruno Berselli, Jun 14 2013
a(n) = A081352(n) - A236283(n + 1). - Miko Labalan, Dec 04 2016
From Klaus Purath, Jan 26 2020: (Start)
a(n) = binomial(n+2, 2) + floor((n-1)/2).
a(n) = floor(A028884(n)/2) - n.
a(n) = (n+1)^2 - A099392(n+1).
a(2*n)^2 - a(2*n-1)*a(2*n+1) = 3, n > 0.
a(2*n+1)^2 - a(2*n)*a(2*n+2) = (2*n+3)^2. (End)
E.g.f.: (1/2)*(x*(5 + x)*cosh(x) + (1 + 5*x + x^2)*sinh(x)). - Stefano Spezia, Jan 26 2020
a(n) = A000217(2*n) - 2*A001859(n-1) for n>0. - John Tyler Rascoe, Jul 31 2022
Sum_{n>=1} 1/a(n) = 11/8 + tan(sqrt(3)*Pi/2)*Pi/(2*sqrt(3)). - Amiram Eldar, Sep 16 2022

A028886 Primes of the form k^2 - 8.

Original entry on oeis.org

17, 41, 73, 113, 281, 353, 433, 521, 617, 953, 1217, 1361, 2017, 2393, 2593, 2801, 4217, 4481, 6553, 7561, 8273, 8641, 10193, 10601, 13217, 13681, 14153, 14633, 15121, 16633, 17681, 18217, 20441, 21017, 21601, 22193, 25913, 26561, 29921
Offset: 1

Views

Author

Keywords

Comments

Primes of A028884. Also subsequence of A038873. - Klaus Purath, Jan 28 2020

Crossrefs

Programs

  • Magma
    [a: n in [3..300] | IsPrime(a) where a is n^2-8]; // Vincenzo Librandi, Dec 01 2011
  • Mathematica
    Select[Range[3,1000]^2-8,PrimeQ] (* Vincenzo Librandi, Dec 01 2011 *)

A179830 The first central column of triangle A179757, i.e., A179763(1), A179763(8), A179763(17), A179763(28), ...

Original entry on oeis.org

1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 03 2010

Keywords

Crossrefs

Cf. A179831-A179834, and also A179770, A179775.

Formula

a(n) = A179763(A028884(n+2)).

A084097 Square array whose rows have e.g.f. exp(x)*cosh(sqrt(k)*x), k>=0, read by ascending antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 7, 8, 1, 1, 1, 5, 10, 17, 16, 1, 1, 1, 6, 13, 28, 41, 32, 1, 1, 1, 7, 16, 41, 76, 99, 64, 1, 1, 1, 8, 19, 56, 121, 208, 239, 128, 1, 1, 1, 9, 22, 73, 176, 365, 568, 577, 256, 1, 1, 1, 10, 25, 92, 241, 576, 1093, 1552, 1393, 512, 1
Offset: 0

Views

Author

Paul Barry, May 11 2003

Keywords

Comments

Rows are the binomial transforms of expansions of cosh(sqrt(k)*x), k >= 0.

Examples

			Array, A(n,k), begins:
.n\k.........0..1...2...3....4.....5......6......7.......8........9.......10
.0: A000012..1..1...1...1....1.....1......1......1.......1........1........1
.1: A000079..1..1...2...4....8....16.....32.....64.....128......256......512
.2: A001333..1..1...3...7...17....41.....99....239.....577.....1393.....3363
.3: A026150..1..1...4..10...28....76....208....568....1552.....4240....11584
.4: A046717..1..1...5..13...41...121....365...1093....3281.....9841....29525
.5: A084057..1..1...6..16...56...176....576...1856....6016....19456....62976
.6: A002533..1..1...7..19...73...241....847...2899...10033....34561...119287
.7: A083098..1..1...8..22...92...316...1184...4264...15632....56848...207488
.8: A084058..1..1...9..25..113...401...1593...5993...23137....88225...338409
.9: A003665..1..1..10..28..136...496...2080...8128...32896...130816...524800
10: A002535..1..1..11..31..161...601...2651..10711...45281...186961...781451
11: A133294..1..1..12..34..188...716...3312..13784...60688...259216..1125312
12: A090042..1..1..13..37..217...841...4069..17389...79537...350353..1575613
13: A125816..1..1..14..40..248...976...4928..21568..102272...463360..2153984
14: A133343..1..1..15..43..281..1121...5895..26363..129361...601441..2884575
15: A133345..1..1..16..46..316..1276...6976..31816..161296...768016..3794176
16: A120612..1..1..17..49..353..1441...8177..37969..198593...966721..4912337
17: A133356..1..1..18..52..392..1616...9504..44864..241792..1201408..6271488
18: A125818..1..1..19..55..433..1801..10963..52543..291457..1476145..7907059
25: A083578
- _Robert G. Wilson v_, Jan 02 2013
Antidiagonal triangle, T(n,k), begins:
  1;
  1,  1;
  1,  1,  1;
  1,  1,  2,  1;
  1,  1,  3,  4,  1;
  1,  1,  4,  7,  8,   1;
  1,  1,  5, 10, 17,  16,   1;
  1,  1,  6, 13, 28,  41,  32,    1;
  1,  1,  7, 16, 41,  76,  99,   64,    1;
  1,  1,  8, 19, 56, 121, 208,  239,  128,    1;
  1,  1,  9, 22, 73, 176, 365,  568,  577,  256,   1;
  1,  1, 10, 25, 92, 241, 576, 1093, 1552, 1393, 512,  1;
		

Crossrefs

Programs

  • Magma
    function A084097(n,k)
      if k eq 0 then return 1;
      else return k*2^(k-1)*(&+[ Binomial(k-j,j)*((n-k-1)/4)^j/(k-j): j in [0..Floor(k/2)]]);
      end if; return A084097; end function;
    [A084097(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 15 2022
    
  • Mathematica
    T[j_, k_] := Expand[((1 + Sqrt[j])^k + (1 - Sqrt[j])^k)/2]; T[1, 0] = 1; Table[ T[j - k, k], {j, 0, 11}, {k, 0, j}] // Flatten (* Robert G. Wilson v, Jan 02 2013 *)
  • SageMath
    def A084097(n,k):
        if (k==0): return 1
        else: return k*2^(k-1)*sum( binomial(k-j,j)*((n-k-1)/4)^j/(k-j) for j in range( (k+2)//2 ) )
    flatten([[A084097(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 15 2022

Formula

From Robert G. Wilson v, Jan 02 2013: (Start)
A(n, k) = (1/2)*( (1 + sqrt(n))^k + (1 - sqrt(n))^k ) (array).
T(n, k) = A(n-k, k). (End)
T(n, k) = Sum_{j=0..floor(k/2)} binomial(k-j, j)*((n-k-1)/4)^j/(k-j), with T(n, 0) = 1 (antidiagonal triangle T(n,k)). - G. C. Greubel, Oct 15 2022

Extensions

Edited by N. J. A. Sloane, Jul 14 2010
Showing 1-10 of 19 results. Next