OFFSET
0,2
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)
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.
P. Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 288.
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
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..1303 (terms 0..200 from T. D. Noe)
Marco Abrate, Stefano Barbero, Umberto Cerruti, and Nadir Murru, Polynomial sequences on quadratic curves, Integers, Vol. 15, 2015, #A38.
K. Andersen, L. Carbone, and D. Penta, Kac-Moody Fibonacci sequences, hyperbolic golden ratios, and real quadratic fields, Journal of Number Theory and Combinatorics, Vol 2, No. 3, pp. 245-278, 2011. See Section 9.
E. Barcucci et al., A combinatorial interpretation of the recurrence f_{n+1} = 6 f_n - f_{n-1}, Discrete Math., 190 (1998), 235-240.
Elena Barcucci, Antonio Bernini, and Renzo Pinzani, A Gray code for a regular language, Semantic Sensor Networks Workshop 2018, CEUR Workshop Proceedings (2018) Vol. 2113.
Hacène Belbachir and Yassine Otmani, Quadrinomial-Like Versions for Wolstenholme, Morley and Glaisher Congruences, Integers (2023) Vol. 23.
J. Bonin, L. Shapiro and R. Simion, Some q-analogues of the Schroeder numbers arising from combinatorial statistics on lattice paths, H. Statistical Planning and Inference, 16, 1993, 35-55 (p. 50).
P. Catarino, H. Campos, and P. Vasco, On some identities for balancing and cobalancing numbers, Annales Mathematicae et Informaticae, 45 (2015) pp. 11-24.
Enrica Duchi, Andrea Frosini, Renzo Pinzani and Simone Rinaldi, A Note on Rational Succession Rules, J. Integer Seqs., Vol. 6, 2003.
Melissa Emory, The Diophantine equation X^4 + Y^4 = D^2 Z^4 in quadratic fields, INTEGERS 12 (2012), #A65. - From N. J. A. Sloane, Feb 06 2013
S. Falcon, Relationships between Some k-Fibonacci Sequences, Applied Mathematics, 2014, 5, 2226-2234.
Alex Fink, Richard K. Guy, and Mark Krusemeyer, Partitions with parts occurring at most thrice, Contributions to Discrete Mathematics, Vol 3, No 2 (2008), pp. 76-114. See Section 13.
A. S. Fraenkel, On the recurrence f(m+1)= b(m)*f(m)-f(m-1) and applications, Discrete Mathematics 224 (2000), pp. 273-279.
A. S. Fraenkel, Recent results and questions in combinatorial game complexities, Theoretical Computer Science, vol. 249, no. 2 (2000), 265-288.
A. S. Fraenkel, Arrays, numeration systems and Frankenstein games, Theoret. Comput. Sci. 282 (2002), 271-284.
Bernard Frénicle de Bessy, Solutio duorum problematum circa numeros cubos et quadratos, (1657), page 9. Bibliothèque Nationale de Paris.
M. A. Gruber, Artemas Martin, A. H. Bell, J. H. Drummond, A. H. Holmes and H. C. Wilkes, Problem 47, Amer. Math. Monthly, 4 (1897), 25-28.
R. J. Hetherington, Letter to N. J. A. Sloane, Oct 26 1974.
Graham Holmes, Kissing circles and cotangents.
Tanya Khovanova, Recursive Sequences.
Ioana-Claudia Lazăr, Lucas sequences in t-uniform simplicial complexes, arXiv:1904.06555 [math.GR], 2019.
D. H. Lehmer, Lacunary recurrence formulas for the numbers of Bernoulli and Euler, Annals Math., 36 (1935), 637-649.
Giovanni Lucca, Integer Sequences and Circle Chains Inside a Hyperbola, Forum Geometricorum (2019) Vol. 19, 11-16.
aBa Mbirika, Janeè Schrader, and Jürgen Spilker, Pell and associated Pell braid sequences as GCDs of sums of k consecutive Pell, balancing, and related numbers, arXiv:2301.05758 [math.NT], 2023. See also J. Int. Seq. (2023) Vol. 26, Art. 23.6.4.
Donatella Merlini and Renzo Sprugnoli, Arithmetic into geometric progressions through Riordan arrays, Discrete Mathematics 340.2 (2017): 160-174.
Claude Moret-Blanc, Questions Nouvelles d'Arithmétique Supérieure Proposées Par M. Edouard Lucas, Nouvelles annales de mathématiques 2^e serie, tome 20 (1881), 253-265.
Morris Newman, Daniel Shanks, and H. C. Williams, Simple groups of square order and an interesting sequence of primes, Acta Arith., 38 (1980/1981) 129-140.
Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
The Prime Glossary, NSW number.
S. F. Santana and J. L. Diaz-Barrero, Some properties of sums involving Pell numbers, Missouri Journal of Mathematical Sciences 18(1), 2006.
Michael Z. Spivey and Laura L. Steil, The k-Binomial Transforms and the Hankel Transform, Journal of Integer Sequences, Vol. 9 (2006), Article 06.1.1.
R. A. Sulanke, Bijective recurrences concerning Schroeder paths, Electron. J. Combin. 5 (1998), Research Paper 47, 11 pp.
R. A. Sulanke, Moments of generalized Motzkin paths, J. Integer Sequences, Vol. 3 (2000), #00.1.
Ahmet Tekcan and Alper Erdem, General Terms of All Almost Balancing Numbers of First and Second Type, arXiv:2211.08907 [math.NT], 2022.
Eric Weisstein's World of Mathematics, NSW Number.
Eric Weisstein's World of Mathematics, Centered Polygonal Number.
H. C. Williams and R. K. Guy, Some fourth-order linear divisibility sequences, Intl. J. Number Theory 7 (5) (2011) 1255-1277.
H. C. Williams and R. K. Guy, Some Monoapparitic Fourth Order Linear Divisibility Sequences, Integers, Volume 12A (2012) The John Selfridge Memorial Volume.
Index entries for linear recurrences with constant coefficients, signature (6,-1).
FORMULA
a(n) = (1/2)*((1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*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
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) = sqrt(A001108(2*n+1)). - Anton Vrba (antonvrba(AT)yahoo.com), Feb 14 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
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+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+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
EXAMPLE
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
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 *)
PROG
(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 */
(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
CROSSREFS
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.
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved