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 52 results. Next

A002522 a(n) = n^2 + 1.

Original entry on oeis.org

1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 101, 122, 145, 170, 197, 226, 257, 290, 325, 362, 401, 442, 485, 530, 577, 626, 677, 730, 785, 842, 901, 962, 1025, 1090, 1157, 1226, 1297, 1370, 1445, 1522, 1601, 1682, 1765, 1850, 1937, 2026, 2117, 2210, 2305, 2402, 2501
Offset: 0

Views

Author

Keywords

Comments

An n X n nonnegative matrix A is primitive (see A070322) iff every element of A^k is > 0 for some power k. If A is primitive then the power which should have all positive entries is <= n^2 - 2n + 2 (Wielandt).
a(n) = Phi_4(n), where Phi_k is the k-th cyclotomic polynomial.
As the positive solution to x=2n+1/x is x=n+sqrt(a(n)), the continued fraction expansion of sqrt(a(n)) is {n; 2n, 2n, 2n, 2n, ...}. - Benoit Cloitre, Dec 07 2001
a(n) is one less than the arithmetic mean of its neighbors: a(n) = (a(n-1) + a(n+1))/2 - 1. E.g., 2 = (1+5)/2 - 1, 5 = (2+10)/2 - 1. - Amarnath Murthy, Jul 29 2003
Equivalently, the continued fraction expansion of sqrt(a(n)) is (n;2n,2n,2n,...). - Franz Vrabec, Jan 23 2006
Number of {12,1*2*,21}-avoiding signed permutations in the hyperoctahedral group.
The number of squares of side 1 which can be drawn without lifting the pencil, starting at one corner of an n X n grid and never visiting an edge twice is n^2-2n+2. - Sébastien Dumortier, Jun 16 2005
Also, numbers m such that m^3 - m^2 is a square, (n*(1 + n^2))^2. - Zak Seidov
1 + 2/2 + 2/5 + 2/10 + ... = Pi*coth Pi [Jolley], see A113319. - Gary W. Adamson, Dec 21 2006
For n >= 1, a(n-1) is the minimal number of choices from an n-set such that at least one particular element has been chosen at least n times or each of the n elements has been chosen at least once. Some games define "matches" this way; e.g., in the classic Parker Brothers, now Hasbro, board game Risk, a(2)=5 is the number of cards of three available types (suits) required to guarantee at least one match of three different types or of three of the same type (ignoring any jokers or wildcards). - Rick L. Shepherd, Nov 18 2007
Positive X values of solutions to the equation X^3 + (X - 1)^2 + X - 2 = Y^2. To prove that X = n^2 + 1: Y^2 = X^3 + (X - 1)^2 + X - 2 = X^3 + X^2 - X - 1 = (X - 1)(X^2 + 2X + 1) = (X - 1)*(X + 1)^2 it means: (X - 1) must be a perfect square, so X = n^2 + 1 and Y = n(n^2 + 2). - Mohamed Bouhamida, Nov 29 2007
{a(k): 0 <= k < 4} = divisors of 10. - Reinhard Zumkeller, Jun 17 2009
Appears in A054413 and A086902 in relation to sequences related to the numerators and denominators of continued fractions convergents to sqrt((2*n)^2/4 + 1), n=1, 2, 3, ... . - Johannes W. Meijer, Jun 12 2010
For n > 0, continued fraction [n,n] = n/a(n); e.g., [5,5] = 5/26. - Gary W. Adamson, Jul 15 2010
The only real solution of the form f(x) = A*x^p with negative p which satisfies f^(m)(x) = f^[-1](x), x >= 0, m >= 1, with f^(m) the m-th derivative and f^[-1] the compositional inverse of f, is obtained for m=2*n, p=p(n)= -(sqrt(a(n))-n) and A=A(n)=(fallfac(p(n),2*n))^(-p(n)/(p(n)+1)), with fallfac(x,k):=Product_{j=0..k-1} (x-j) (falling factorials). See the T. Koshy reference, pp. 263-4 (there are also two solutions for positive p, see the corresponding comment in A087475). - Wolfdieter Lang, Oct 21 2010
n + sqrt(a(n)) = [2*n;2*n,2*n,...] with the regular continued fraction with period 1. This is the even case. For the general case see A087475 with the Schroeder reference and comments. For the odd case see A078370.
a(n-1) counts configurations of non-attacking bishops on a 2 X n strip [Chaiken et al., Ann. Combin. 14 (2010) 419]. - R. J. Mathar, Jun 16 2011
Also numbers k such that 4*k-4 is a square. Hence this sequence is the union of A053755 and A069894. - Arkadiusz Wesolowski, Aug 02 2011
a(n) is also the Moore lower bound on the order, A191595(n), of an (n,5)-cage. - Jason Kimberley, Oct 17 2011
Left edge of the triangle in A195437: a(n+1) = A195437(n,0). - Reinhard Zumkeller, Nov 23 2011
If h (5,17,37,65,101,...) is prime is relatively prime to 6, then h^2-1 is divisible by 24. - Vincenzo Librandi, Apr 14 2014
The identity (4*n^2+2)^2 - (n^2+1)*(4*n)^2 = 4 can be written as A005899(n)^2 - a(n)*A008586(n)^2 = 4. - Vincenzo Librandi, Jun 15 2014
a(n) is also the number of permutations simultaneously avoiding 213 and 321 in the classical sense which can be realized as labels on an increasing strict binary tree with 2n-1 nodes. See A245904 for more information on increasing strict binary trees. - Manda Riehl, Aug 07 2014
a(n-1) is the maximum number of stages in the Gale-Shapley algorithm for finding a stable matching between two sets of n elements given an ordering of preferences for each element (see Gura et al.). - Melvin Peralta, Feb 07 2016
Because of Fermat's little theorem, a(n) is never divisible by 3. - Altug Alkan, Apr 08 2016
For n > 0, if a(n) points are placed inside an n X n square, it will always be the case that at least two of the points will be a distance of sqrt(2) units apart or less. - Melvin Peralta, Jan 21 2017
Also the limit as q->1^- of the unimodal polynomial (1-q^(n*k+1))/(1-q) after making the simplification k=n. The unimodal polynomial is from O'Hara's proof of unimodality of q-binomials after making the restriction to partitions of size <= 1. See G_1(n,k) from arXiv:1711.11252. As the size restriction s increases, G_s->G_infinity=G: the q-binomials. Then substituting k=n and q=1 yields the central binomial coefficients: A000984. - Bryan T. Ek, Apr 11 2018
a(n) is the smallest number congruent to both 1 (mod n) and 2 (mod n+1). - David James Sycamore, Apr 04 2019
a(n) is the number of permutations of 1,2,...,n+1 with exactly one reduced decomposition. - Richard Stanley, Dec 22 2022
From Klaus Purath, Apr 03 2025: (Start)
The odd prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*y^2 = -1. The values for k and the solutions x, y can be calculated using the following algorithm: k = n, x(0) = 1, x(1) = 4*D - 1, y(0) = 1, y(1) = 4*D - 3. The two recurrences are of the form (4*D - 2, -1). The solutions x, y of the Pell equations for n = {1 ... 14} are in OEIS.
It follows from the above that this sequence is a subsequence of A031396. (End)

Examples

			G.f. = 1 + 2*x + 5*x^2 + 10*x^3 + 17*x^4 + 26*x^5 + 37*x^6 + 50*x^7 + 65*x^8 + ...
		

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (see p. 120).
  • E. Gura and M. Maschler, Insights into Game Theory: An Alternative Mathematical Experience, Cambridge, 2008; p. 26.
  • Thomas Koshy, Fibonacci and Lucas Numbers with Applications, John Wiley and Sons, New York, 2001.

Crossrefs

Left edge of A055096.
Cf. A059100, A117950, A087475, A117951, A114949, A117619 (sequences of form n^2 + K).
a(n+1) = A101220(n, n+1, 3).
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), A062318 (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), this sequence (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A002496 (primes).
Cf. A254858.
Subsequence of A031396.

Programs

Formula

O.g.f.: (1-x+2*x^2)/((1-x)^3). - Eric Werley, Jun 27 2011
Sequences of the form a(n) = n^2 + K with offset 0 have o.g.f. (K - 2*K*x + K*x^2 + x + x^2)/(1-x)^3 and recurrence a(n) = 3*a(n-1) - 3*a(n-2) + a*(n-3). - R. J. Mathar, Apr 28 2008
For n > 0: a(n-1) = A143053(A000290(n)) - 1. - Reinhard Zumkeller, Jul 20 2008
A143053(a(n)) = A000290(n+1). - Reinhard Zumkeller, Jul 20 2008
a(n)*a(n-2) = (n-1)^4 + 4. - Reinhard Zumkeller, Feb 12 2009
a(n) = A156798(n)/A087475(n). - Reinhard Zumkeller, Feb 16 2009
From Reinhard Zumkeller, Mar 08 2010: (Start)
a(n) = A170949(A002061(n+1));
A170949(a(n)) = A132411(n+1);
A170950(a(n)) = A002061(n+1). (End)
For n > 1, a(n)^2 + (a(n) + 1)^2 + ... + (a(n) + n - 2)^2 + (a(n) + n - 1 + a(n) + n)^2 = (n+1) *(6*n^4 + 18*n^3 + 26*n^2 + 19*n + 6) / 6 = (a(n) + n)^2 + ... + (a(n) + 2*n)^2. - Charlie Marion, Jan 10 2011
From Eric Werley, Jun 27 2011: (Start)
a(n) = 2*a(n-1) - a(n-2) + 2.
a(n) = a(n-1) + 2*n - 1. (End)
a(n) = (n-1)^2 + 2(n-1) + 2 = 122 read in base n-1 (for n > 3). - Jason Kimberley, Oct 20 2011
a(n)*a(n+1) = a(n*(n+1) + 1) so a(1)*a(2) = a(3). More generally, a(n)*a(n+k) = a(n*(n+k) + 1) + k^2 - 1. - Jon Perry, Aug 01 2012
a(n) = (n!)^2* [x^n] BesselI(0, 2*sqrt(x))*(1+x). - Peter Luschny, Aug 25 2012
a(n) = A070216(n,1) for n > 0. - Reinhard Zumkeller, Nov 11 2012
E.g.f.: exp(x)*(1 + x + x^2). - Geoffrey Critzer, Aug 30 2013
a(n) = A254858(n-2,3) for n > 2. - Reinhard Zumkeller, Feb 09 2015
Sum_{n>=0} (-1)^n / a(n) = (1+Pi/sinh(Pi))/2 = 0.636014527491... = A367976 . - Vaclav Kotesovec, Feb 14 2015
Sum_{n>=0} 1/a(n) = (1 + Pi*coth(Pi))/2 = 2.076674... = A113319. - Vaclav Kotesovec, Apr 10 2016
4*a(n) = A001105(n-1) + A001105(n+1). - Bruno Berselli, Jul 03 2017
From Amiram Eldar, Jan 20 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = sqrt(2)*csch(Pi)*sinh(sqrt(2)*Pi).
Product_{n>=1} (1 - 1/a(n)) = Pi*csch(Pi). (End)
Sum_{n>=0} a(n)/n! = 3*e. - Davide Rotondo, Feb 16 2025

Extensions

Partially edited by Joerg Arndt, Mar 11 2010

A017113 a(n) = 8*n + 4.

Original entry on oeis.org

4, 12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 396, 404, 412, 420, 428, 436, 444, 452, 460, 468
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(65).
n such that 16 is the largest power of 2 dividing A003629(k)^n - 1 for any k. - Benoit Cloitre, Mar 23 2002
Continued fraction expansion of tanh(1/4). - Benoit Cloitre, Dec 17 2002
Consider all primitive Pythagorean triples (a,b,c) with c - a = 8, sequence gives values for b. (Corresponding values for a are A078371(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
Also numbers of the form a^2 + b^2 + c^2 + d^2, where a,b,c,d are odd integers. - Alexander Adamchuk, Dec 01 2006
If X is an n-set and Y_i (i=1,2,3) mutually disjoint 2-subsets of X then a(n-5) is equal to the number of 4-subsets of X intersecting each Y_i (i=1,2,3). - Milan Janjic, Aug 26 2007
A007814(a(n)) = 2; A037227(a(n)) = 5. - Reinhard Zumkeller, Jun 30 2012
Numbers k such that 3^k + 1 is divisible by 41. - Bruno Berselli, Aug 22 2018
Lexicographically smallest arithmetic progression of positive integers avoiding Fibonacci numbers. - Paolo Xausa, May 08 2023
From Martin Renner, May 24 2024: (Start)
Also number of points in a grid cross with equally long arms and a width of two points, e.g.:
* *
* * * *
* * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
* * * * * *
* * * *
* *
etc. (End)

Crossrefs

First differences of A016742 (even squares).
Cf. A078370, A078371, A081770 (subsequence).

Programs

Formula

a(n) = A118413(n+1,3) for n > 2. - Reinhard Zumkeller, Apr 27 2006
a(n) = Sum_{k=0..4*n} (i^k+1)*(i^(4*n-k)+1), where i = sqrt(-1). - Bruno Berselli, Mar 19 2012
a(n) = 4*A005408(n). - Omar E. Pol, Apr 17 2016
E.g.f.: (8*x + 4)*exp(x). - G. C. Greubel, Apr 26 2018
G.f.: 4*(1+x)/(1-x)^2. - Wolfdieter Lang, Oct 27 2020
Sum_{n>=0} (-1)^n/a(n) = Pi/16 (A019683). - Amiram Eldar, Dec 11 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2) * sin(3*Pi/16).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(2) * cos(3*Pi/16). (End)
a(n) = 2*A016825(n) = A008586(2*n+1). - Elmo R. Oliveira, Apr 10 2025

A146326 Length of the period of the continued fraction of (1+sqrt(n))/2.

Original entry on oeis.org

0, 2, 2, 0, 1, 4, 4, 4, 0, 2, 2, 2, 1, 4, 2, 0, 3, 6, 6, 4, 2, 6, 4, 4, 0, 2, 2, 4, 1, 2, 8, 4, 4, 4, 2, 0, 3, 6, 6, 8, 5, 4, 10, 6, 2, 8, 4, 4, 0, 2, 2, 4, 1, 6, 4, 2, 6, 6, 6, 4, 3, 4, 2, 0, 3, 6, 10, 6, 4, 6, 8, 4, 9, 6, 4, 8, 2, 4, 4, 4, 0, 2, 2, 2, 1, 6, 2, 8, 7, 2, 8, 8, 2, 12, 4, 8, 9, 4, 2, 0
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

First occurrence of n in this sequence see A146343.
Records see A146344.
Indices where records occurred see A146345.
a(n) =0 for n = k^2 (A000290).
a(n) =1 for n = 4 k^2 + 4 k + 5 (A078370). For primes see A005473.
a(n) =2 for n in A146327. For primes see A056899.
a(n) =3 for n in A146328. For primes see A146348.
a(n) =4 for n in A146329. For primes see A028871 - {2}.
a(n) =5 for n in A146330. For primes see A146350.
a(n) =6 for n in A146331. For primes see A146351.
a(n) =7 for n in A146332. For primes see A146352.
a(n) =8 for n in A146333. For primes see A146353.
a(n) =9 for n in A143577. For primes see A146354.
a(n)=10 for n in A146334. For primes see A146355.
a(n)=11 for n in A146335. For primes see A146356.
a(n)=12 for n in A146336. For primes see A146357.
a(n)=13 for n in A333640. For primes see A146358.
a(n)=14 for n in A146337. For primes see A146359.
a(n)=15 for n in A146338. For primes see A146360.
a(n)=16 for n in A146339. For primes see A146361.
a(n)=17 for n in A146340. For primes see A146362.

Examples

			a(2) = 2 because continued fraction of (1+sqrt(2))/2 = 1, 4, 1, 4, 1, 4, 1, ... has period (1,4) length 2.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: seq(A146326(n),n=1..100) ; # R. J. Mathar, Sep 06 2009
  • Mathematica
    Table[cf = ContinuedFraction[(1 + Sqrt[n])/2]; If[Head[cf[[-1]]] === List, Length[cf[[-1]]], 0], {n, 100}]
    f[n_] := Length@ ContinuedFraction[(1 + Sqrt[n])/2][[-1]]; Array[f, 100] (* Robert G. Wilson v, Apr 11 2017 *)

Formula

a(n) = 0 iff n is a square (A000290). - Robert G. Wilson v, Apr 11 2017

Extensions

a(39) and a(68) corrected by R. J. Mathar, Sep 06 2009

A146348 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 3.

Original entry on oeis.org

17, 37, 61, 101, 197, 257, 317, 401, 461, 557, 577, 677, 773, 1129, 1297, 1429, 1601, 1877, 1901, 2917, 3137, 4357, 4597, 5417, 5477, 6053, 7057, 8101, 8761, 8837, 10733, 11621, 12101, 13457, 13877, 14401, 15277, 15377, 15877, 16333, 16901, 17737, 17957, 18329, 21317, 22501, 23593, 24337, 25601, 28901, 30137, 30977, 32401, 33857, 41453, 41617, 42437, 44101
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

Primes in A146328. Finite A050952 is subset of this sequence.
From Michel Lagneau, Sep 03 2014: (Start)
The primes of the form p = n^2+1 for n>2 are in the sequence, and the continued fraction of (1+sqrt(p))/2 is [n/2; 1, 1, n-1, 1, 1, n-1, 1, 1, ...] with the period (1, 1, n-1).
We observe that the other primes {61, 317, 461, 557, 773, 1129, 1429, ...} are prime divisors of composite numbers of the form k^2+1 where k = 11, 114, 48, 118, 317, 168, 620, ... .
(End)
Another possibly infinite subset of the sequence is primes of the form 100*k^2-44*k+5, where the continued fraction is [5*k-1; 2, 2, 10*k-3, ...] with period [2, 2, 10*k-3]. This includes {61, 317, 773, 1429, 4597, 6053, ...}. - Robert Israel, Sep 03 2014

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146348 := proc(n) RETURN(isprime(n) and A146326(n) = 3) ; end: for n from 2 to 4000 do if isA146348(n) then printf("%d,\n",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    okQ[n_] := Length[ContinuedFraction[(1 + Sqrt[n])/2][[2]]] == 3; Select[Prime[Range[100]], okQ]

Extensions

1019 removed; more terms added by R. J. Mathar, Sep 06 2009
More terms from Zak Seidov, Mar 09 2011

A146345 Indices in A146326 where records occur.

Original entry on oeis.org

1, 2, 6, 18, 31, 43, 94, 106, 151, 211, 331, 394, 526, 694, 751, 886, 919, 1114, 1324, 1726, 1759, 1831, 2011, 2311, 2326, 2671, 3019, 3691, 3754, 3931, 4174, 4951, 4999, 5119, 6211, 6406, 7606, 8254, 8719, 8779, 9244, 9619, 9739, 10399, 10651, 12919, 13126
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: read("transforms") ; a26 := [seq(A146326(n),n=1..1400)] ; RECORDS(a26)[2] ; # R. J. Mathar, Sep 06 2009
  • Mathematica
    f[n_] := Length@ContinuedFraction[(1 + Sqrt[n])/2][[-1]]; mx = -1; k = 1; lst = {}; While[k < 14000, a = f@k; If[a > mx, mx = a; AppendTo[lst, k]]; k++]; lst (* Robert G. Wilson v, Apr 11 2017 *)

Extensions

19 replaced by 18, 394 inserted, 4 more terms added by R. J. Mathar, Sep 06 2009
More terms from Robert G. Wilson v, Apr 11 2017

A146360 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 15: primes in A146338.

Original entry on oeis.org

193, 281, 1861, 1933, 2089, 2141, 2437, 2741, 2837, 3037, 3121, 3413, 4001, 4637, 4877, 5821, 6653, 7673, 8117, 10069, 10273, 10457, 11197, 11549, 11821, 12409, 13037, 14653, 15061, 15077, 18661, 20549, 22921, 23117, 24169, 25621, 28837, 35597, 35869, 36389, 38569
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146360 := proc(n) RETURN(isprime(n) and A146326(n) = 15) ; end: for n from 2 to 30000 do if isA146360(n) then printf("%d,\n",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    Select[Prime[Range[1500]],Length[ContinuedFraction[(Sqrt[#]+1)/2][[2]]] == 15&] (* Harvey P. Dale, Aug 16 2014 *)

Extensions

8539 removed by R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 30 2020

A078371 a(n) = (2*n+5)*(2*n+1).

Original entry on oeis.org

5, 21, 45, 77, 117, 165, 221, 285, 357, 437, 525, 621, 725, 837, 957, 1085, 1221, 1365, 1517, 1677, 1845, 2021, 2205, 2397, 2597, 2805, 3021, 3245, 3477, 3717, 3965, 4221, 4485, 4757, 5037, 5325, 5621, 5925, 6237, 6557, 6885, 7221, 7565, 7917, 8277, 8645
Offset: 0

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This is the generic form of D in the (nontrivially) solvable Pell equation x^2 - D*y^2 = +4. See A077428 and A078355.
Consider all primitive Pythagorean triples (a,b,c) with c-a=8, sequence gives values of a. (Corresponding values for b are A017113(n), while c follows A078370(n).) - Lambert Klasen (Lambert.Klasen(AT)gmx.net), Nov 19 2004
From Vincenzo Librandi, Aug 08 2010: (Start)
The identity (4*n^3 + 18*n^2 + 24*n + 9)^2 - (4*n^2 + 12*n + 5)*(2*n^2 + 6*n + 4)^2 = 1 (see Ramasamy's paper in link) can be written as A141530(n+2)^2 - a(n)*A046092(n+1)^2 = 1.
a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 is a square: in fact, a(n)^3 + 6*a(n)^2 + 9*a(n) + 4 = (a(n) + 1)^2*(a(n) + 4), where a(n) + 4 = (2*n+3)^2. (End)
Products of two positive odd integers with difference 4 (i.e., 1*5, 3*7, 5*9, 7*11, 9*13, ...). - Wesley Ivan Hurt, Nov 19 2013
Starting with stage 1, the number of active (ON, black) cells in n-th stage of growth of two-dimensional cellular automaton defined by "Rule 675", based on the 5-celled von Neumann neighborhood. - Robert Price, May 21 2016
The continued fraction expansion of (sqrt(a(n))-1)/2 is [n; {1,2*n+1}] with periodic part of length 2: repeat {1,2*n+1}. - Ron Knott, May 11 2017
a(n) is the sum of 2*n+5 consecutive integers starting from n-1. - Bruno Berselli, Jan 16 2018
The continued fraction expansion of sqrt(a(n)) is [2n+2; {1, n, 2, n, 1, 4n+4}]. For n=0, this collapses to [2; {4}]. - Magus K. Chu, Aug 26 2022

Crossrefs

Subsequence of A077425 (D values (not a square) for which Pell x^2 - D*y^2 = +4 is solvable in positive integers).
Supersequence of A143206.

Programs

  • Magma
    [(2*n+5)*(2*n+1): n in [0..100]]; // G. C. Greubel, Sep 19 2018
  • Maple
    seq((2*n+5)*(2*n+1), n=0..48); # Emeric Deutsch, Feb 24 2005
  • Mathematica
    Table[(2 n + 5) (2 n + 1), {n, 0, 100}] (* Wesley Ivan Hurt, Nov 19 2013 *)
    LinearRecurrence[{3,-3,1},{5,21,45},50] (* Harvey P. Dale, Oct 18 2020 *)
  • PARI
    lista(nn) = {for (n=0, nn, print1((2*n+1)*(2*n+5), ", "));} \\ Michel Marcus, Nov 21 2013
    

Formula

a(n) = 8*(binomial(n+2, 2)-1)+5, hence subsequence of A004770 (5 (mod 8) numbers).
G.f.: (5 + 6*x - 3*x^2)/(1-x)^3.
a(n) = A061037(2*n+1) = (2*n+3)^2 - 4. For A061037: a(2*n+1) = (2*n+1)*(2*n+5) = (2*n+3)^2-4. - Paul Curtz, Sep 24 2008
a(n) = 8*(n+1) + a(n-1) for n > 0, a(0)=5. - Vincenzo Librandi, Aug 08 2010
From Ilya Gutkovskiy, May 22 2016: (Start)
E.g.f.: (5 + 4*x*(4 + x))*exp(x).
Sum_{n>=0} 1/a(n) = 1/3. (End)
Sum_{n>=0} (-1)^n/a(n) = 1/6. - Amiram Eldar, Oct 08 2023

Extensions

More terms from Emeric Deutsch, Feb 24 2005

A005473 Primes of form k^2 + 4.

Original entry on oeis.org

5, 13, 29, 53, 173, 229, 293, 733, 1093, 1229, 1373, 2029, 2213, 3253, 4229, 4493, 5333, 7229, 7573, 9029, 9413, 10613, 13229, 13693, 15629, 18229, 18773, 21613, 24029, 26573, 27893, 31333, 33493, 37253, 41213, 42853, 46229, 47093, 54293
Offset: 1

Views

Author

Keywords

Comments

a(n) mod 24 = 5 or 13 and if a(n) mod 24 =13 then a(n) mod 72 = 13.
From Artur Jasinski, Oct 30 2008: (Start)
Primes p such that the continued fraction of (1+sqrt(p))/2 has period 1.
Primes in A078370 = primes of the form 4*k^2 + 4*k + 5 = (2*k+1)^2 + 4.
(End)
Starting at a(3) all the primes in this sequence can be expressed as the following sum: ((2*k+1)*(2*k+3)+(2*k+3)*(2*k+5)+(2*k+5)+(2*k+7)+(2*k+7)*(2*k+9))/4 for some values (not all!) of k>=0. Thus for a(5)=173 the sum is (9*11 + 11*13 + 13*15 + 15*17)/4=173. - J. M. Bergot, Nov 03 2014

Examples

			a(2)=29 since 29=5^2+4 is prime.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A185086.
a(n)-4 is contained in A016754. (a(n)-5)/8 is contained in A000217. Either (a(n)-5)/24 is contained in A001318 (if a(n) mod 24=5) or (a(n)-13)/72 is contained in A000217 (if a(n) mod 24=13). Floor[a(n)/24] is contained in A001840.

Programs

  • Haskell
    a005473 n = a005473_list !! (n-1)
    a005473_list = filter ((== 1) . a010051') $ map (+ 4) a000290_list
    -- Reinhard Zumkeller, Mar 12 2012
  • Magma
    [a: n in [0..300] | IsPrime(a) where a is n^2+4]; // Vincenzo Librandi, Nov 30 2011
    
  • Maple
    select(isprime,[seq(4*k^2 + 4*k + 5, k=0..1000)]); # Robert Israel, Nov 02 2014
  • Mathematica
    Intersection[Table[n^2+4,{n,0,10^2}],Prime[Range[9*10^3]]] ...or... For[i=4,i<=4,a={};Do[If[PrimeQ[n^2+i],AppendTo[a,n^2+i]],{n,0,100}];Print["n^2+",i,",",a];i++ ] (* Vladimir Joseph Stephan Orlovsky, Apr 29 2008 *)
    aa = {}; Do[If[PrimeQ[4 k^2 + 4 k + 5], AppendTo[aa, 4 k^2 + 4 k + 5]], {k, 0, 200}]; aa (* Artur Jasinski, Oct 30 2008 *)
    Select[Table[n^2+4,{n,0,7000}],PrimeQ] (* Vincenzo Librandi, Nov 30 2011 *)
  • PARI
    for(n=1,1e3,if(isprime(t=n^2+4),print1(t","))) \\ Charles R Greathouse IV, Jul 05 2011
    

Formula

a(n) = 24*A056904(n)+m, where m=13 if A056904(n) is three times a triangular number (and n>0) and m=5 if A056904(n) is not three times a triangular number (or n=0).
For n>=2, a(n) = A098062(n-1). - Zak Seidov, Apr 12 2007

Extensions

More terms and additional comments from Henry Bottomley, Jul 06 2000

A261327 a(n) = (n^2 + 4) / 4^((n + 1) mod 2).

Original entry on oeis.org

1, 5, 2, 13, 5, 29, 10, 53, 17, 85, 26, 125, 37, 173, 50, 229, 65, 293, 82, 365, 101, 445, 122, 533, 145, 629, 170, 733, 197, 845, 226, 965, 257, 1093, 290, 1229, 325, 1373, 362, 1525, 401, 1685, 442, 1853, 485, 2029, 530, 2213, 577, 2405, 626, 2605, 677
Offset: 0

Views

Author

Paul Curtz, Aug 15 2015

Keywords

Comments

Using (n+sqrt(4+n^2))/2, after the integer 1 for n=0, the reduced metallic means are b(1) = (1+sqrt(5))/2, b(2) = 1+sqrt(2), b(3) = (3+sqrt(13))/2, b(4) = 2+sqrt(5), b(5) = (5+sqrt(29))/2, b(6) = 3+sqrt(10), b(7) = (7+sqrt(53))/2, b(8) = 4+sqrt(17), b(9) = (9+sqrt(85))/2, b(10) = 5+sqrt(26), b(11) = (11+sqrt(125))/2 = (11+5*sqrt(5))/2, ... . The last value yields the radicals in a(n) or A013946.
b(2) = 2.41, b(3) = 3.30, b(4) = 4.24, b(5) = 5.19 are "good" approximations of fractal dimensions corresponding to dimensions 3, 4, 5, 6: 2.48, 3.38, 4.33 and 5.45 based on models. See "Arbres DLA dans les espaces de dimension supérieure: la théorie des peaux entropiques" in Queiros-Condé et al. link. DLA: beginning of the title of the Witten et al. link.
Consider the symmetric array of the half extended Rydberg-Ritz spectrum of the hydrogen atom:
0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, 1/0, ...
-1/0, 0, 3/4, 8/9, 15/16, 24/25, 35/36, 48/49, ...
-1/0, -3/4, 0, 5/36, 3/16, 21/100, 2/9, 45/196, ...
-1/0, -8/9, -5/36, 0, 7/144, 16/225, 1/12, 40/441, ...
-1/0, -15/16, -3/16, -7/144, 0, 9/400, 5/144, 33/784, ...
-1/0, -24/25, -21/100, -16/225, -9/400, 0, 11/900, 24/1225, ...
-1/0, -35/36, -2/9, -1/12, -5/144, -11/900, 0, 13/1764, ...
-1/0, -48/49, -45/196, -40/441, -33/784, -24/1225, -13/1764, 0, ... .
The numerators are almost A165795(n).
Successive rows: A000007(n)/A057427(n), A005563(n-1)/A000290(n), A061037(n)/A061038(n), A061039(n)/A061040(n), A061041(n)/A061042(n), A061043(n)/A061044(n), A061045(n)/A061046(n), A061047(n)/A061048(n), A061049(n)/A061050(n).
A144433(n) or A195161(n+1) are the numerators of the second upper diagonal (denominators: A171522(n)).
c(n+1) = a(n) + a(n+1) = 6, 7, 15, 18, 34, 39, 63, 70, 102, 111, ... .
c(n+3) - c(n+1) = 9, 11, 19, 21, 29, 31, ... = A090771(n+2).
The final digit of a(n) is neither 4 nor 8. - Paul Curtz, Jan 30 2019

Crossrefs

Programs

  • Magma
    [Numerator(1+n^2/4): n in [0..60]]; // Vincenzo Librandi, Aug 15 2015
    
  • Maple
    A261327:=n->numer((4 + n^2)/4); seq(A261327(n), n=0..60); # Wesley Ivan Hurt, Aug 15 2015
  • Mathematica
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {1, 5, 2, 13, 5, 29}, 60] (* Vincenzo Librandi, Aug 15 2015 *)
    a[n_] := (n^2 + 4) / 4^Mod[n + 1, 2]; Table[a[n], {n, 0, 52}] (* Peter Luschny, Mar 18 2022 *)
  • PARI
    vector(60, n, n--; numerator(1+n^2/4)) \\ Michel Marcus, Aug 15 2015
    
  • PARI
    Vec((1+5*x-x^2-2*x^3+2*x^4+5*x^5)/(1-x^2)^3 + O(x^60)) \\ Colin Barker, Aug 15 2015
    
  • PARI
    a(n)=if(n%2,n^2+4,(n/2)^2+1) \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    [(n*n+4)//4**((n+1)%2) for n in range(60)] # Gennady Eremin, Mar 18 2022
  • Sage
    [numerator(1+n^2/4) for n in (0..60)] # G. C. Greubel, Feb 09 2019
    

Formula

a(n) = numerator(1 + n^2/4). (Previous name.) See A010685 (denominators).
a(2*k) = 1 + k^2.
a(2*k+1) = 5 + 4*k*(k+1).
a(2*k+1) = 4*a(2*k) + 4*k + 1.
a(4*k+2) = A069894(k). - Paul Curtz, Jan 30 2019
a(-n) = a(n).
a(n+2) = a(n) + A144433(n) (or A195161(n+1)).
a(n) = A168077(n) + period 2: repeat 1, 4.
a(n) = A171621(n) + period 2: repeat 2, 8.
From Colin Barker, Aug 15 2015: (Start)
a(n) = (5 - 3*(-1)^n)*(4 + n^2)/8.
a(n) = n^2/4 + 1 for n even;
a(n) = n^2 + 4 for n odd.
a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6) for n>5.
G.f.: (1 + 5*x - x^2 - 2*x^3 + 2*x^4 + 5*x^5)/ (1 - x^2)^3. (End)
E.g.f.: (5/8)*(x^2 + x + 4)*exp(x) - (3/8)*(x^2 - x + 4)*exp(-x). - Robert Israel, Aug 18 2015
Sum_{n>=0} 1/a(n) = (4*coth(Pi)+tanh(Pi))*Pi/8 + 1/2. - Amiram Eldar, Mar 22 2022

Extensions

New name by Peter Luschny, Mar 18 2022

A078356 Minimal positive solution z of Pell equation z^2 - A077426(n)*t^2 = -4.

Original entry on oeis.org

1, 3, 8, 5, 12, 64, 7, 39, 16, 2136, 9, 1000, 11208, 20, 261, 1552, 11, 3488, 24, 61, 213, 13, 1305, 136, 3528264, 28, 15, 46312, 142022136, 32, 12144, 164, 2613, 2127064, 17, 253724736, 89, 36, 2031654672, 18420, 142528, 19, 10236, 2564, 3447, 40, 223843593936
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

The corresponding values of t are given in A078357.
Computed from Perron's table (see reference p. 108) which gives the minimal x,y values for the Diophantine equation x^2 - x*y - ((D(m)-1)/4)*y^2 = +1 and -1 for respectively D(m)=A077425(m) and D(m)=A077426(m) (this second case excludes in Perron's table the D values with a 'Teilnenner' in brackets).
The conversion from the x,y values of Perron's table to the minimal a=a(n) and b=b(n) solutions of a^2 - D(n)*b^2 =-4 see a comment in A077428. Here only D values with no 'Teilnenner' in brackets are of interest and a(n)=2*x(n)-y(n) and b(n)=y(n). E.g. D=41, with 'Teilnenner von (sqrt(D)+1)/2' in the notation, explained in an example of A077427, 3,1,2 (period length k=5) and (x,y)=(37,10) which translates to the minimal solution (a,b)=(64,10).
Generic D(n) values are those from A078370(k)=(4*k(k+1)+5), k>=0, which are 5 (mod 8). For such D values the minimal solution is (a,b)=(2*k+1,1) (e.g. D(7)= A077426(7) = 53 = A078370(3) with a(7)= 2*3+1=7 and b(7)=A078357(7)=1).
The general solution of Pell a^2-D(n)*b^2 = -4 with generic D(n)=A078370(k), k>=0, is a(n,m)= (2*k+1)*S(2*m,sqrt(D(n))) and b(n,m)= T(2*m+1,sqrt(D(n))/2)/(sqrt(D(n))/2), m>=0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second, kind. See A053120 resp. A049310.
For non-generic D(n) (not from A078370) the general solution of a^2-D(n)*b^2 = -4 is a(n,m)=a(n)*S(2*m,sqrt(a(n)^2+4)) and b(n,m)= b(n)*T(2*m+1,sqrt(a(n)^2+4)/2)/(sqrt(a(n)^2+4)/2), m>=0, with Chebyshev's polynomials and in this case b(n)>1.

Examples

			41=D(6)=A077426(6) (also A077425(8)), hence a(6)=64 and b(6)=A078357(6)=10 satisfies 64^2 - 41*10^2 = -4.
		

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Programs

  • Mathematica
    $MaxExtraPrecision = 100; A077426 = Select[Range[ 500], ! IntegerQ[Sqrt[#]] && OddQ[ Length[ ContinuedFraction[(Sqrt[#] + 1)/2] // Last]] &]; a[n_] := {z, t} /. {ToRules[ Reduce[z > 0 && t > 0 && z^2 - A077426[[n]]*t^2 == -4, {z, t}, Integers] /. C[1] -> 0]} // Sort // First // First; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jun 21 2013 *)

Extensions

More terms from R. J. Mathar, Sep 24 2009
Edited by Max Alekseyev, Mar 03 2010
Showing 1-10 of 52 results. Next