cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 31-39 of 39 results.

A191348 Array read by antidiagonals: ((ceiling(sqrt(n)) + sqrt(n))^k + (ceiling(sqrt(n)) - sqrt(n))^k)/2 for columns k >= 0 and rows n >= 0.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 4, 6, 2, 1, 0, 8, 20, 7, 2, 1, 0, 16, 68, 26, 8, 3, 1, 0, 32, 232, 97, 32, 14, 3, 1, 0, 64, 792, 362, 128, 72, 15, 3, 1, 0, 128, 2704, 1351, 512, 376, 81, 16, 3, 1, 0
Offset: 0

Views

Author

Charles L. Hohn, May 31 2011

Keywords

Examples

			1, 0,  0,   0,    0,     0,      0,      0,       0,        0,         0, ...
1, 1,  2,   4,    8,    16,     32,     64,     128,      256,       512, ...
1, 2,  6,  20,   68,   232,    792,   2704,    9232,    31520,    107616, ...
1, 2,  7,  26,   97,   362,   1351,   5042,   18817,    70226,    262087, ...
1, 2,  8,  32,  128,   512,   2048,   8192,   32768,   131072,    524288, ...
1, 3, 14,  72,  376,  1968,  10304,  53952,  282496,  1479168,   7745024, ...
1, 3, 15,  81,  441,  2403,  13095,  71361,  388881,  2119203,  11548575, ...
1, 3, 16,  90,  508,  2868,  16192,  91416,  516112,  2913840,  16450816, ...
1, 3, 17,  99,  577,  3363,  19601, 114243,  665857,  3880899,  22619537, ...
1, 3, 18, 108,  648,  3888,  23328, 139968,  839808,  5038848,  30233088, ...
1, 4, 26, 184, 1316,  9424,  67496, 483424, 3462416, 24798784, 177615776, ...
1, 4, 27, 196, 1433, 10484,  76707, 561236, 4106353, 30044644, 219825387, ...
1, 4, 28, 208, 1552, 11584,  86464, 645376, 4817152, 35955712, 268377088, ...
1, 4, 29, 220, 1673, 12724,  96773, 736012, 5597777, 42574180, 323800109, ...
1, 4, 30, 232, 1796, 13904, 107640, 833312, 6451216, 49943104, 386642400, ...
...
		

Crossrefs

Row 1 is A000007, row 2 is A011782, row 3 is A006012, row 4 is A001075, row 5 is A081294, row 6 is A098648, row 7 is A084120, row 8 is A146963, row 9 is A001541, row 10 is A081341, row 11 is A084134, row 13 is A090965.
Row 3*2 is A056236, row 4*2 is A003500, row 5*2 is A155543, row 9*2 is A003499.
Cf. A191347 which uses floor() in place of ceiling().

Programs

  • PARI
    T(n, k) = if (k==0, 1, if (k==1, ceil(sqrt(n)), T(n,k-2)*(n-T(n,1)^2) + T(n,k-1)*T(n,1)*2));
    matrix(9, 9, n, k, T(n-1, k-1)) \\ Charles L. Hohn, Aug 23 2019

Formula

For each row n >= 0 let T(n,0)=1 and T(n,1) = ceiling(sqrt(n)), then for each column k >= 2: T(n,k) = T(n,k-2)*(n-T(n,1)^2) + T(n,k-1)*T(n,1)*2. - Charles L. Hohn, Aug 23 2019

A219165 Recurrence equation a(n+1) = a(n)^4 - 4*a(n)^2 + 2 with a(0) = 6.

Original entry on oeis.org

6, 1154, 1773462177794, 9892082352510403757550172975146702122837936996354
Offset: 0

Views

Author

Peter Bala, Nov 13 2012

Keywords

Comments

Bisection of A003423.

Crossrefs

Formula

Let alpha = 3 + 2*sqrt(2). Then a(n) = (alpha)^(4^n) + (1/alpha)^(4^n).
a(n) = A003423(2*n) = A003499(4^n).
Product {n >= 0} ((1 + 2/a(n))/(1 - 2/a(n)^2)) = sqrt(2).
From Peter Bala, Dec 06 2022: (Start)
a(n) = 2*T(4^n,3), where T(n,x) denotes the n-th Chebyshev polynomial of the first kind.
Let b(n) = a(n) - 6. The sequence {b(n)} appears to be a strong divisibility sequence, that is, gcd(b(n),b(m)) = b(gcd(n,m)) for n, m >= 1. (End)

A230038 Distance between n^2 and the smallest triangular number >= n^2.

Original entry on oeis.org

0, 2, 1, 5, 3, 0, 6, 2, 10, 5, 15, 9, 2, 14, 6, 20, 11, 1, 17, 6, 24, 12, 32, 19, 5, 27, 12, 36, 20, 3, 29, 11, 39, 20, 0, 30, 9, 41, 19, 53, 30, 6, 42, 17, 55, 29, 2, 42, 14, 56, 27, 71, 41, 10, 56, 24, 72, 39, 5, 55, 20, 72, 36, 90, 53, 15, 71, 32, 90, 50, 9, 69, 27, 89, 46, 2, 66, 21, 87, 41, 109, 62
Offset: 1

Views

Author

Ralf Stephan, Oct 08 2013

Keywords

Comments

Smallest positive Z such that x^2 + x - 2n^2 - 2Z = 0 has a solution in integer x.
a(A077241(m)) = 2.
Apparently, a(n) is triangular itself if n is of form (2k+1)*A001109(m), whenever k < A003499(m), or m > some small constant, k >= 0 (see A230060). [Comment improved by Nathaniel Johnston, Oct 08 2013]

Examples

			The smallest triangular number >= 7^2 is 55 and 55-49=6, so a(7)=6.
		

Crossrefs

Cf. A064784.

Programs

  • Maple
    a := proc(n) local t: t := ceil((sqrt(1 + 8*n^2) - 1)/2): return t*(t+1)/2 - n^2: end proc: seq(a(n),n=1..100); # Nathaniel Johnston, Oct 08 2013
  • Mathematica
    Module[{nn=200,tr},tr=Accumulate[Range[nn]];Table[SelectFirst[tr,#>=n^2&]-n^2,{n,Floor[Sqrt[tr[[-1]]]]}]] (* Harvey P. Dale, Sep 17 2022 *)
  • PARI
    a(n)=t=floor((sqrt(8*n^2)-1)/2)+1;t*(t+1)/2-n^2

A299741 Array read by antidiagonals upwards: a(i,0) = 2, i >= 0; a(i,1) = i+2, i >= 0; a(i,j) = (i+2) * a(i,j-1) - a(i,j-2), for i >= 0, j > 1.

Original entry on oeis.org

2, 2, 2, 2, 3, 2, 2, 4, 7, 2, 2, 5, 14, 18, 2, 2, 6, 23, 52, 47, 2, 2, 7, 34, 110, 194, 123, 2, 2, 8, 47, 198, 527, 724, 322, 2, 2, 9, 62, 322, 1154, 2525, 2702, 843, 2, 2, 10, 79, 488, 2207, 6726, 12098, 10084, 2207, 2, 2, 11, 98, 702, 3842, 15127, 39202, 57965, 37634, 5778, 2
Offset: 0

Views

Author

William W. Collier, Feb 18 2018

Keywords

Comments

Note the similarity in form of the recursive steps in the array definition above and the polynomial definition under FORMULA.

Examples

			i\j |0  1   2    3      4       5        6          7           8            9
----+-------------------------------------------------------------------------
   0|2  2   2    2      2       2        2          2           2            2
   1|2  3   7   18     47     123      322        843        2207         5778
   2|2  4  14   52    194     724     2702      10084       37634       140452
   3|2  5  23  110    527    2525    12098      57965      277727      1330670
   4|2  6  34  198   1154    6726    39202     228486     1331714      7761798
   5|2  7  47  322   2207   15127   103682     710647     4870847     33385282
   6|2  8  62  488   3842   30248   238142    1874888    14760962    116212808
   7|2  9  79  702   6239   55449   492802    4379769    38925119    345946302
   8|2 10  98  970   9602   95050   940898    9313930    92198402    912670090
   9|2 11 119 1298  14159  154451  1684802   18378371   200477279   2186871698
  10|2 12 142 1692  20162  240252  2862862   34114092   406506242   4843960812
  11|2 13 167 2158  27887  360373  4656962   60180133   777684767  10049721838
  12|2 14 194 2702  37634  524174  7300802  101687054  1416317954  19726764302
  13|2 15 223 3330  49727  742575 11088898  165590895  2472774527  36926027010
  14|2 16 254 4048  64514 1028176 16386302  261152656  4162056194  66331746448
  15|2 17 287 4862  82367 1395377 23639042  400468337  6784322687 114933017342
  16|2 18 322 5778 103682 1860498 33385282  599074578 10749957122 192900153618
  17|2 19 359 6802 128879 2441899 46267202  876634939 16609796639 314709501202
  18|2 20 398 7940 158402 3160100 63043598 1257711860 25091193602 500566160180
  19|2 21 439 9198 192719 4037901 84603202 1772629341 37140612959 778180242798
		

Crossrefs

The array first appeared in A298675.
Rows 1 through 29 of the array appear in these OEIS entries: A005248, A003500, A003501, A003499, A056854, A086903, A056918, A087799, A057076, A087800, A078363, A067902, A078365, A090727, A078367, A087215, A078369, A090728, A090729, A090730, A090731, A090732, A090733, A090247, A090248, A090249, A090251. Also entries occur for rows 45, 121, and 320: A087265, A065705, A089775. Each of these entries asserts that a(i,j)=f(i+2,j) is true for that row.
A few of the columns appear in the OEIS: A008865 (for column 2), A058794 and A007754 (for column 3), and A230586 (for column 5).
Main diagonal gives A343261.

Programs

  • Maple
    A:= proc(i, j) option remember; `if`(min(i, j)=0, 2,
          `if`(j=1, i+2, (i+2)*A(i, j-1)-A(i, j-2)))
        end:
    seq(seq(A(d-k, k), k=0..d), d=0..12);  # Alois P. Heinz, Mar 05 2019
  • Mathematica
    a[, 0] = a[0, ] = 2; a[i_, 1] := i + 2;
    a[i_, j_] := a[i, j] =(i + 2) a[i, j - 1] - a[i, j - 2];
    Table[a[i - j, j], {i, 0, 10}, {j, 0, i}] // Flatten (* Jean-François Alcover, Dec 07 2019 *)

Formula

Let k be an integer, and let r1 and r2 be the roots of x + 1/x = k. Then f(k,n) = r1^n + r2^n is an integer, for integer n >= 0. Theorem: a(i,j) = f(i+2,j), for i,j >= 0. Proof: See the Collier link.
Define polynomials recursively by:
p[0](n) = 2, for n >= 0 ( [ and ] demark subscripts).
p[1](n) = n + 2, for n >= 0.
p[j](n) = p[j-1](n) * p[1](n) - p[j-2](n), for j > 1, n >= 0. The coefficients of these polynomials occur as the even numbered, upward diagonals in the OEIS Wiki link. Conjecture: a(i,j) = p[j](i), i,j >= 0.

Extensions

Edited by N. J. A. Sloane, Apr 04 2018

A060964 Table by antidiagonals where T(n,k) = n*T(n,k-1) - T(n,k-2) with T(n,0) = 2 and T(n,1) = n.

Original entry on oeis.org

2, 0, 2, -2, 1, 2, 0, -1, 2, 2, 2, -2, 2, 3, 2, 0, -1, 2, 7, 4, 2, -2, 1, 2, 18, 14, 5, 2, 0, 2, 2, 47, 52, 23, 6, 2, 2, 1, 2, 123, 194, 110, 34, 7, 2, 0, -1, 2, 322, 724, 527, 198, 47, 8, 2, -2, -2, 2, 843, 2702, 2525, 1154, 322, 62, 9, 2, 0, -1, 2, 2207, 10084, 12098, 6726, 2207, 488, 79, 10, 2
Offset: 0

Views

Author

Henry Bottomley, May 09 2001

Keywords

Examples

			Square array begins as:
  2, 0, -2,   0,   2,    0,    -2, ...
  2, 1, -1,  -2,  -1,    1,     2, ...
  2, 2,  2,   2,   2,    2,     2, ...
  2, 3,  7,  18,  47,  123,   322, ...
  2, 4, 14,  52, 194,  724,  2702, ...
  2, 5, 23, 110, 527, 2525, 12098, ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=0 then return 2;
        elif k=1 then return n;
        else return n*T(n,k-1) - T(n,k-2);
        fi; end;
    Flat(List([0..12], n-> List([0..n], k-> T(k,n-k) ))); # G. C. Greubel, Jan 15 2020
  • Magma
    function T(n,k)
      if k eq 0 then return 2;
      elif k eq 1 then return n;
      else return n*T(n, k-1) - T(n, k-2);
      end if; return T; end function;
    [T(k,n-k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 15 2020
    
  • Maple
    seq(seq( simplify(k*ChebyshevU(n-k-1, k/2) -2*ChebyshevU(n-k-2, k/2)), k=0..n), n=0..12); # G. C. Greubel, Jan 15 2020
  • Mathematica
    Table[k*ChebyshevU[n-k-1, k/2] -2*ChebyshevU[n-k-2, k/2], {n,0,12}, {k,0,n} ]//Flatten
  • PARI
    T(n,k) = n*polchebyshev(k-1,2,n/2) -2*polchebyshev(k-2,2,n/2);
    for(n=0,12, for(k=0,n, print1(T(k,n-k), ", "))) \\ G. C. Greubel, Jan 15 2020
    
  • Sage
    [[k*chebyshev_U(n-k-1, k/2) -2*chebyshev_U(n-k-2, k/2) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 15 2020
    

Formula

For all m, T(n, k) = T(n, |m|)*T(n, |k - m|) - T(n, |k - 2m|).
T(n, 2k) = T(n, k)^2 - 2.
T(n, 2k + 1) = T(n, k)*T(n, k + 1) - n.
T(n, 3k) = T(n, k)^3 - 3*T(n, k).
T(n, 4k) = T(n, k)^4 - 4*T(n, k)^2 + 2.
T(n, 5k) = T(n, k)^5 - 5*T(n, k)^3 + 5*T(n, k) etc.
T(n, -k) = T(n, k).
T(-n, k) = T(-n, -k) = (-1)^k * T(n, k).
T(n, k) = ( n*( ((n + sqrt(n^2 -4))/2)^k - ((n - sqrt(n^2 -4))/2)^k ) - 2*( ((n + sqrt(n^2 -4))/2)^(k-1) - ((n - sqrt(n^2 -4))/2)^(k-1) ) )/sqrt(n^2 -4).
T(n, k) = n*ChebyshevU(k-1, n/2) - 2*ChebyshevU(k-2, n/2). - G. C. Greubel, Jan 15 2020

A228765 The curvature of circles (rounded to nearest integer), successively inscribed toward the 45-degree angle of a 45-45-90 triangle, starting with a unit circle.

Original entry on oeis.org

1, 2, 5, 11, 25, 56, 126, 283, 633, 1419, 3178, 7118, 15943, 35710, 79985, 179152, 401270, 898777, 2013107, 4509015, 10099422, 22620977, 50667115, 113485664, 254188460, 569338636, 1275221080, 2856276912
Offset: 0

Views

Author

Kival Ngaokrajang, Sep 03 2013

Keywords

Comments

The curvature expansion factors are 2.239828809...(1/0.44636269217...) and 5.828427125...(1/0.17157287525...) or 1 / (3 - 2*sqrt(2)) for circles successively inscribed toward the 45- and 90-degree angles respectively. The ratio 1 / (3 - 2*sqrt(2)) is also 3 + 2*sqrt(2) or A156035 as commented by Michel Marcus. This is also (n+1) + sqrt(A005563(n)) or 1 / ((n+1) - sqrt(A005563(n))), for n = 2.
The curvature of circles (rounded to nearest integer) successively inscribed toward the 90-degree angle is A003499. (except the first term). See illustration in links.

Crossrefs

Programs

Formula

a(n+1) = round(k^n), with k = 7 - 4 sqrt(2) + 2 sqrt(20 - 14 sqrt(2)) = 2.23982.... - Charles R Greathouse IV, Sep 05 2013

A281234 Solutions y to the negative Pell equation y^2 = 72*x^2 - 288 with x,y >= 0.

Original entry on oeis.org

0, 48, 288, 1680, 9792, 57072, 332640, 1938768, 11299968, 65861040, 383866272, 2237336592, 13040153280, 76003583088, 442981345248, 2581884488400, 15048325585152, 87708069022512, 511200088549920, 2979492462277008, 17365754685112128, 101215035648395760
Offset: 1

Views

Author

Colin Barker, Jan 18 2017

Keywords

Comments

The corresponding values of x are in A003499.

Examples

			48 is in the sequence because (x, y) = (6,48) is a solution to y^2 = 72*x^2 - 288.
		

Crossrefs

Programs

  • PARI
    concat(0, Vec(48*x^2 / (1 - 6*x + x^2) + O(x^25)))

Formula

G.f.: 48*x^2 / (1 - 6*x + x^2).
a(n) = 6*a(n-1) - a(n-2) for n>2.
a(n) = 48*A001109(n-1).
a(n) = 6*sqrt(2)*(-(3 - 2*sqrt(2))^n*(3+2*sqrt(2)) + (3 - 2*sqrt(2))*(3 + 2*sqrt(2))^n).

A093700 Number of 9's immediately following the decimal point in the expansion of (3+sqrt(8))^n.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 13, 13, 14, 15, 16, 16, 17, 18, 19, 19, 20, 21, 22, 22, 23, 24, 25, 26, 26, 27, 28, 29, 29, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 38, 39, 39, 40, 41, 42, 43, 44, 45, 45, 46, 47, 48, 48, 49, 50, 51, 52, 52, 53, 54, 55, 55, 56, 57
Offset: 1

Views

Author

Marvin Ray Burns, Apr 10 2004

Keywords

Comments

Number of 0's immediately following the decimal point in the expansion of (3-sqrt(8))^n.

Examples

			Let n=10, (3+sqrt(8))^10= 45239073.9999999778... (the fractional part starts with seven 9's), so the 10th element in this sequence is 7.
The 132nd element is 100. The 1000th element is 765. The 1307th element is 1000.
The arrangement of repeating elements are like A074184 (Index of the smallest power of n >= n!) and A076539 (Numerators a(n) of fractions slowly converging to pi) and A080686 (Number of 19-smooth numbers <= n).
		

Crossrefs

Programs

  • Mathematica
    For[n = 1, n < 999, n++, Block[{$MaxExtraPrecision = 50*n}, Print[ -Floor[Log[10, 1 - N[FractionalPart[(3 + 2Sqrt[2])^n], n]]] - 1]]]
    f[n_] := Block[{}, -MantissaExponent[(3 - Sqrt[8])^n][[2]]]; Table[ f[n], {n, 75}] (* Robert G. Wilson v, Apr 10 2004 *)

Formula

Roughly, floor(3*n/4)

A351635 a(n) is the number of perfect matchings of an edge-labeled 2 X n Klein bottle grid graph, or equivalently the number of domino tilings of a 2 X n Klein bottle grid. (The twist is on the length-n side.)

Original entry on oeis.org

2, 6, 10, 16, 38, 54, 142, 196, 530, 726, 1978, 2704, 7382, 10086, 27550, 37636, 102818, 140454, 383722, 524176, 1432070, 1956246, 5344558, 7300804, 19946162, 27246966, 74440090, 101687056, 277814198, 379501254, 1036816702, 1416317956, 3869452610, 5285770566, 14440993738, 19726764304, 53894522342, 73621286646
Offset: 1

Views

Author

Sarah-Marie Belcastro, Feb 15 2022

Keywords

Comments

Output of Lu and Wu's formula for the number of perfect matchings of an m X n Klein bottle grid specializes to this sequence for m=2 and the twist on the length-n side.

Examples

			a(1) = 2 because this is the number of perfect matchings of a 2 X 1 Klein bottle grid graph (one for each choice of the two non-loop edges).
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] ==
       a[n - 1] + a[n - 2] + Mod[n, 2] a[n - 1] - 4 Mod[n, 2], a[1] == 2,
      a[2] == 6}, a, {n, 1, 50}]

Formula

a(n) = a(n-1) + a(n-2) + (n mod 2)*a(n-1) - 4*(n mod 2).
From Stefano Spezia, Feb 15 2022: (Start)
G.f.: 2*x*(1 + 3*x - 7*x^3 - x^4 + 2*x^5)/(1 - 5*x^2 + 5*x^4 - x^6).
a(n) = 5*a(n-2) - 5*a(n-4) + a(n-6) for n > 6. (End)
Previous Showing 31-39 of 39 results.