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

A185418 Square array, read by antidiagonals, used to recursively calculate the Springer numbers A001586.

Original entry on oeis.org

1, 1, 1, 3, 3, 1, 11, 11, 5, 1, 57, 57, 27, 7, 1, 361, 361, 175, 51, 9, 1, 2763, 2763, 1353, 413, 83, 11, 1, 24611, 24611, 12125, 3801, 819, 123, 13, 1, 250737, 250737, 123987, 39487, 8857, 1441, 171, 15, 1, 2873041, 2873041, 1424215, 458331, 105489, 18057, 2327, 227, 17, 1
Offset: 0

Views

Author

Peter Bala, Jan 30 2011

Keywords

Comments

The table entries T(n,k), n,k>=0, are defined by the recurrence relation:
1)... T(n+1,k) = k*T(n,k-1)+(k+1)*T(n,k+1) with boundary condition T(0,k) = 1.
The first column of the table produces the sequence of Springer numbers A001586.
For similarly defined tables see A185414, A185416 and A185420.

Examples

			Square array begins
n\k|.....0......1.......2.......3........4........5........6
============================================================
..0|.....1......1.......1.......1........1........1........1
..1|.....1......3.......5.......7........9.......11.......13
..2|.....3.....11......27......51.......83......123......171
..3|....11.....57.....175.....413......819.....1441.....2327
..4|....57....361....1353....3801.....8857....18057....33321
..5|...361...2763...12125...39487...105489...244211...507013
..6|..2763..24611..123987..458331..1379003..3569523..8229891
..
Examples of recurrence relation:
T(4,3) = 3801 = 3*T(3,2) + 4*T(3,4) = 3*175 + 4*819;
T(5,1) = 2763 = 1*T(4,0)+ 2*T(4,2) = 1*57 + 2*1353.
		

Crossrefs

Programs

  • Maple
    # A185418
    S := proc(n, x) option remember; description `polynomials S(n, x)`;
    if n = 0 then 1 else x*S(n-1,x-1)+(x+1)*S(n-1,x+1) end if end proc:
    for n from 0 to 10 do seq(S(n, k), k = 0..10) end do;
  • Mathematica
    T[n_, k_] := T[n, k] = If[n<0 || k<0, 0, If[n == 0, 1, k T[n-1, k-1] + (k+1)*T[n-1, k+1]]];
    Table[T[n-k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 22 2021 *)
  • PARI
    {T(n,k)=if(n<0||k<0,0,if(n==0,1,k*T(n-1,k-1)+(k+1)*T(n-1,k+1)))}

Formula

(1)... T(n,k) = S(n,k) with S(n,x) the polynomials described in A185417.
(2)... First column: T(n,0) = A001586(n).
(3)... Second column: T(n,1) = A001586(n+1).
(4)... Second row: T(1,k) = A005408(k).
(5)... Third row: T(2,k) = A164897(k).

A013945 Least d such that period of continued fraction for sqrt(d) contains n (n^2+2 if n odd, (n/2)^2+1 if n even).

Original entry on oeis.org

3, 2, 11, 5, 27, 10, 51, 17, 83, 26, 123, 37, 171, 50, 227, 65, 291, 82, 363, 101, 443, 122, 531, 145, 627, 170, 731, 197, 843, 226, 963, 257, 1091, 290, 1227, 325, 1371, 362, 1523, 401, 1683, 442, 1851, 485, 2027, 530, 2211, 577, 2403, 626, 2603, 677, 2811
Offset: 1

Views

Author

Keywords

Examples

			a(3) = 11 because the continued fraction for the square root of 11 is 3, {3, 6}.
		

Crossrefs

Bisections: A164897, A002522.

Programs

  • Mathematica
    Table[If[OddQ[n], n^2 + 2, (n/2)^2 + 1], {n, 100}] (* T. D. Noe, Feb 28 2012 *)
  • PARI
    a(n)=if(n%2, n^2+2, (n/2)^2+1) \\ Charles R Greathouse IV, Aug 09 2017

Formula

G.f.: x(x^5+3x^4-x^3+2x^2+2x+3)/(1-x^2)^3. - N. J. A. Sloane, Jun 12 2004

A164900 a(2n) = 4*n*(n+1) + 3; a(2n+1) = 2*n*(n+2) + 3.

Original entry on oeis.org

3, 3, 11, 9, 27, 19, 51, 33, 83, 51, 123, 73, 171, 99, 227, 129, 291, 163, 363, 201, 443, 243, 531, 289, 627, 339, 731, 393, 843, 451, 963, 513, 1091, 579, 1227, 649, 1371, 723, 1523, 801, 1683, 883, 1851, 969, 2027, 1059, 2211, 1153
Offset: 0

Views

Author

Paul Curtz, Aug 30 2009

Keywords

Comments

a(n) = largest odd divisor of A059100(n+1). Proof: Observe that a(2n) = A059100(2n+1) and a(2n+1) = (A059100(2n+2))/2 and note that (A059100(m))/2 is odd for even m. - Jeremy Gardiner, Aug 25 2013
a(n) is also the denominator of the (n+1)-st largest circle in a special case of the Pappus chain inspired by the Yin-Yang symbol. See illustration in the links. - Kival Ngaokrajang, Jun 20 2015

Crossrefs

Programs

  • Magma
    [((-1)^n+3)*(n^2+2*n+3)/4: n in [0..50]]; // Vincenzo Librandi, Aug 07 2011
    
  • Mathematica
    LinearRecurrence[{0, 3, 0, -3, 0, 1}, {3, 3, 11, 9, 27, 19}, 50] (* Amiram Eldar, Aug 09 2022 *)
  • PARI
    vector(100,n,n--;(1/4)*((-1)^n+3)*(n^2+2*n+3)) \\ Derek Orr, Jun 27 2015

Formula

a(2n) = A164897(n); a(2n+1) = A058331(n+1).
a(n) = A164845(n-1)/A026741(n), n>0.
G.f.: ( -3-3*x-2*x^2-3*x^4-x^5 ) / ( (x-1)^3*(1+x)^3 ). - R. J. Mathar, Jan 21 2011
a(n) = ((-1)^n+3)*(n^2+2*n+3)/4. - Bruno Berselli, Jan 21 2011
From Amiram Eldar, Aug 09 2022: (Start)
a(n) = numerator(((n+1)^2 + 2)/2).
Sum_{n>=0} 1/a(n) = (coth(Pi/sqrt(2))*Pi/sqrt(2) + tanh(Pi/sqrt(2))*Pi/(2*sqrt(2)) - 1)/2. (End)
E.g.f.: ((6 + 3*x + 2*x^2)*cosh(x) + (3 + 6*x + x^2)*sinh(x))/2. - Stefano Spezia, Oct 19 2024

A185669 a(n) = 4*n^2 + 3*n + 2.

Original entry on oeis.org

2, 9, 24, 47, 78, 117, 164, 219, 282, 353, 432, 519, 614, 717, 828, 947, 1074, 1209, 1352, 1503, 1662, 1829, 2004, 2187, 2378, 2577, 2784, 2999, 3222, 3453, 3692, 3939, 4194, 4457, 4728, 5007, 5294, 5589, 5892, 6203, 6522, 6849, 7184, 7527, 7878, 8237, 8604, 8979, 9362, 9753, 10152, 10559, 10974, 11397, 11828
Offset: 0

Views

Author

Paul Curtz, Feb 09 2011

Keywords

Comments

Natural numbers A000027 written clockwise as a square spiral:
.
43--44--45--46--47--48--49
|
42 21--22--23--24--25--26
| | |
41 20 7---8---9--10 27
| | | | |
40 19 6 1---2 11 28
| | | | | |
39 18 5---4---3 12 29
| | | |
38 17--16--15--14--13 30
| |
37--36--35--34--33--32--31
.
Walking in straight lines away from the center:
1, 2, 11, ... = A054552(n) = 1 -3*n+4*n^2,
1, 8, 23, ... = A033951(n) = 1 +3*n+4*n^2,
1, 3, 13, ... = A054554(n+1) = 1 -2*n-4*n^2,
1, 7, 21, ... = A054559(n+1) = 1 +2*n+4*n^2,
1, 4, 15, ... = A054556(n+1) = 1 -n+4*n^2,
1, 6, 19, ... = A054567(n+1) = 1 +n+4*n^2,
1, 5, 17, ... = A053755(n) = 1 +4*n^2,
1, 9, 25, ... = A016754(n) = 1 +4*n+4*n^2 = (1+2*n)^2,
2, 8, 22, ... = 2*A084849(n) = 2 +2*n+4*n^2,
2, 12, 30, ... = A002939(n+1) = 2 +6*n+4*n^2,
2, 9, 24, ... = a(n) = 2 +3*n+4*n^2,
2, 10, 26, ... = A069894(n) = 2 +4*n+4*n^2,
3, 11, 27, ... = A164897(n) = 3 +4*n+4*n^2,
3, 12, 29, ... = A054552(n+1)+1 = 3 +5*n+4*n^2,
3, 14, 33, ... = A033991(n+1) = 3 +7*n+4*n^2,
3, 15, 35, ... = A000466(n+1) = 3 +8*n+4*n^2,
4, 14, 32, ... = 2*A130883(n+1) = 4 +6*n+4*n^2,
4, 16, 36, ... = A016742(n+1) = 4 +8*n+4*n^2 = (2+2*n)^2,
5, 18, 39, ... = A007742(n+1) = 5 +9*n+4*n^2,
5, 19, 41, ... = A125202(n+2) = 5+10*n+4*n^2.

Programs

Formula

a(n) = a(n-1) + 8*n - 1.
a(n) = 2*a(n-1) - a(n-2) + 8.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (2 +3*x +3*x^2)/(1-x)^3 . - R. J. Mathar, Feb 11 2011
a(n) = A033954(n) + 2. - Bruno Berselli, Apr 10 2011
E.g.f.: (4*x^2 + 7*x + 2)*exp(x). - G. C. Greubel, Jul 09 2017

A248825 a(n) = n^2 + 1 - (-1)^n.

Original entry on oeis.org

0, 3, 4, 11, 16, 27, 36, 51, 64, 83, 100, 123, 144, 171, 196, 227, 256, 291, 324, 363, 400, 443, 484, 531, 576, 627, 676, 731, 784, 843, 900, 963, 1024, 1091, 1156, 1227, 1296, 1371, 1444, 1523, 1600, 1683, 1764, 1851, 1936, 2027, 2116
Offset: 0

Views

Author

Paul Curtz, Oct 15 2014

Keywords

Comments

Also, A016742 and A164897 interleaved.
See the spiral in Example field of A054552: after 0, the sequence is given by the terms of the semidiagonals 4, 16, 36, 64, 100, ... and 3, 11, 27, 51, 83, ... sorted into ascending order.
Primes of the sequence are in A056899.

Crossrefs

Programs

  • Magma
    [n^2+1-(-1)^n: n in [0..60]]; // Vincenzo Librandi, Oct 16 2014
    
  • Mathematica
    Table[n^2 + 1 - (-1)^n, {n, 0, 60}] (* Vincenzo Librandi, Oct 16 2014 *)
    LinearRecurrence[{2,0,-2,1},{0,3,4,11},60] (* Harvey P. Dale, Jun 30 2019 *)
  • PARI
    vector(100,n,(n-1)^2+1+(-1)^n) \\ Derek Orr, Oct 15 2014
    
  • Sage
    [n^2+1-(-1)^n for n in (0..60)] # Bruno Berselli, Oct 16 2014

Formula

a(n) = a(-n) = 2*a(n-1) - 2*(n-3) + a(n-4).
a(n) = n^2 + A010673(n) = (n+1)^2 - A168277(n+1).
a(n+1) = A248800(n) + A042963(n+1) = a(n) + A166519(n).
a(n+2) = a(n) + 4*n.
a(n+5) = a(n-5) + A008602(n).
G.f.: x*(3 - 2*x + 3*x^2)/((1 + x)*(1 - x)^3). - Bruno Berselli, Oct 15 2014
Sum_{n>=1} 1/a(n) = Pi^2/24 + tanh(Pi/sqrt(2))*Pi/(4*sqrt(2)). - Amiram Eldar, Aug 21 2022

Extensions

Edited by Bruno Berselli, Oct 16 2014
Showing 1-5 of 5 results.