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

A090018 a(n) = 6*a(n-1) + 3*a(n-2) for n > 2, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 39, 252, 1629, 10530, 68067, 439992, 2844153, 18384894, 118841823, 768205620, 4965759189, 32099171994, 207492309531, 1341251373168, 8669985167601, 56043665125110, 362271946253463, 2341762672896108, 15137391876137037, 97849639275510546, 632510011281474387
Offset: 0

Views

Author

Paul Barry, Nov 19 2003

Keywords

Comments

From Johannes W. Meijer, Aug 09 2010: (Start)
a(n) represents the number of n-move routes of a fairy chess piece starting in a given corner or side square on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180032. The central square leads to A180028. (End)

Crossrefs

Sequences with g.f. of the form 1/(1 - 6*x - k*x^2): A106392 (k=-10), A027471 (k=-9), A006516 (k=-8), A081179 (k=-7), A030192 (k=-6), A003463 (k=-5), A084326 (k=-4), A138395 (k=-3), A154244 (k=-2), A001109 (k=-1), A000400 (k=0), A005668 (k=1), A135030 (k=2), this sequence (k=3), A135032 (k=4), A015551 (k=5), A057089 (k=6), A015552 (k=7), A189800 (k=8), A189801 (k=9), A190005 (k=10), A015553 (k=11).

Programs

  • Magma
    [n le 2 select 6^(n-1) else 6*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
    
  • Maple
    a:= n-> (<<0|1>, <3|6>>^n. <<1,6>>)[1,1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 17 2011
  • Mathematica
    Join[{a=1,b=6},Table[c=6*b+3*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{6,3}, {1,6}, 41] (* G. C. Greubel, Oct 10 2022 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-6*x-3*x^2)) \\ G. C. Greubel, Jan 24 2018
  • Sage
    [lucas_number1(n,6,-3) for n in range(1, 31)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = (3+2*sqrt(3))^n*(sqrt(3)/4+1/2) + (1/2-sqrt(3)/4)*(3-2*sqrt(3))^n.
a(n) = (-i*sqrt(3))^n * ChebyshevU(n, isqrt(3)), i^2=-1.
From Johannes W. Meijer, Aug 09 2010: (Start)
G.f.: 1/(1 - 6*x - 3*x^2).
Limit_{k->oo} a(n+k)/a(k) = A141041(n) + A090018(n-1)*sqrt(12) for n >= 1.
Limit_{n->oo} A141041(n)/A090018(n-1) = sqrt(12). (End)
a(n) = Sum_{k=0..n} A099089(n,k)*3^k. - Philippe Deléham, Nov 21 2011
E.g.f.: exp(3*x)*(2*cosh(2*sqrt(3)*x) + sqrt(3)*sinh(2*sqrt(3)*x))/2. - Stefano Spezia, Apr 23 2025

Extensions

Typo in Mathematica program corrected by Vincenzo Librandi, Nov 15 2011

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 2, 4, 3, 3, 7, 15, 0, 6, 12, 26, 56, 9, 9, 21, 45, 97, 209, 0, 18, 36, 78, 168, 362, 780, 27, 27, 63, 135, 291, 627, 1351, 2911, 0, 54, 108, 234, 504, 1086, 2340, 5042, 10864, 81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545
Offset: 0

Views

Author

Richard R. Forberg, Sep 02 2013

Keywords

Comments

Array is analogous to A228405 in goal and structure, with key differences.
Left column is A001353. Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
Either or both may be used as initializing values. See Formula section.
The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc. The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
Several ways of combining the first few columns give OEIS sequences:
A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
The main diagonal (without initial 0) = 2*A090018. The first subdiagonal = abs(A099842). First superdiagonal = A141041.
A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k. For any other initial values only even iterations (at k = 2, 4, ...) produce integers.

Examples

			The array, A(n, k), begins as:
    0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
    1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
    4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
   15,   26,   45,   78,  135,   234,   405,   702, ...
   56,   97,  168,  291,  504,   873,  1512,  2619, ...
  209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
  780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
Antidiagonal triangle, T(n, k), begins as:
   0;
   1,  1;
   0,  2,   4;
   3,  3,   7,  15;
   0,  6,  12,  26,  56;
   9,  9,  21,  45,  97,  209;
   0, 18,  36,  78, 168,  362,  780;
  27, 27,  63, 135, 291,  627, 1351, 2911;
   0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
  81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
		

Crossrefs

Programs

  • Magma
    function A(n,k)
      if k lt 0 then return 0;
      elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
      elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
      else return 2*A(n, k-1) - A(n-1, k-1);
      end if; return A;
    end function;
    A227418:= func< n,k | A(k, n-k) >;
    [A227418(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 09 2022
    
  • Mathematica
    A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
    T[n_, k_]:= A[k, n-k];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 09 2022 *)
  • SageMath
    def A(n,k):
        if (k<0): return 0
        elif (k==0): return chebyshev_U(n-1,2)
        else: return 2*A(n, k-1) - A(n-1, k-1)
    def A227418(n, k): return A(k, n-k)
    flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 09 2022

Formula

If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
A(n, 0) = A001353(n).
A(n, 1) = A001075(n).
A(n, 2) = A005320(n).
A(n, 3) = A151961(n).
A(1, k) = A038754(k).
A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
A(n, n+1) = A141041(n-1) (superdiagonal).
A(n+1, n) = abs(A099842(n)) (subdiagonal).
From G. C. Greubel, Oct 09 2022: (Start)
T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
T(n, 1) = A038754(n-1).
T(n, 2) = A228879(n-2).
T(2*n-1, n-1) = A141041(n-1).
T(2*n, n) = 2*A090018(n-1), n > 0.
T(n, n-4) = 3*A005320(n-4).
T(n, n-3) = 3*A001075(n-3).
T(n, n-2) = 3*A001353(n-2).
T(n, n-1) = A001075(n-1).
T(n, n) = A001353(n).
Sum_{k=0..n-1} T(n, k) = A084156(n).
Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)

Extensions

Offset corrected by G. C. Greubel, Oct 09 2022

A191347 Array read by antidiagonals: ((floor(sqrt(n)) + sqrt(n))^k + (floor(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, 1, 1, 0, 4, 3, 1, 1, 0, 8, 7, 4, 2, 1, 0, 16, 17, 10, 8, 2, 1, 0, 32, 41, 28, 32, 9, 2, 1, 0, 64, 99, 76, 128, 38, 10, 2, 1, 0, 128, 239, 208, 512, 161, 44, 11, 2, 1, 0, 256, 577, 568, 2048, 682, 196, 50, 12, 3, 1
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, 1,  3,   7,   17,   41,    99,    239,     577,     1393,     3363, ...
1, 1,  4,  10,   28,   76,   208,    568,    1552,     4240,    11584, ...
1, 2,  8,  32,  128,  512,  2048,   8192,   32768,   131072,   524288, ...
1, 2,  9,  38,  161,  682,  2889,  12238,   51841,   219602,   930249, ...
1, 2, 10,  44,  196,  872,  3880,  17264,   76816,   341792,  1520800, ...
1, 2, 11,  50,  233, 1082,  5027,  23354,  108497,   504050,  2341691, ...
1, 2, 12,  56,  272, 1312,  6336,  30592,  147712,   713216,  3443712, ...
1, 3, 18, 108,  648, 3888, 23328, 139968,  839808,  5038848, 30233088, ...
1, 3, 19, 117,  721, 4443, 27379, 168717, 1039681,  6406803, 39480499, ...
1, 3, 20, 126,  796, 5028, 31760, 200616, 1267216,  8004528, 50561600, ...
1, 3, 21, 135,  873, 5643, 36477, 235791, 1524177,  9852435, 63687141, ...
1, 3, 22, 144,  952, 6288, 41536, 274368, 1812352, 11971584, 79078912, ...
1, 3, 23, 153, 1033, 6963, 46943, 316473, 2133553, 14383683, 96969863, ...
...
		

Crossrefs

Row 1 is A000007, row 2 is A011782, row 3 is A001333, row 4 is A026150, row 5 is A081294, row 6 is A001077, row 7 is A084059, row 8 is A108851, row 9 is A084128, row 10 is A081341, row 11 is A005667, row 13 is A141041.
Row 3*2 is A002203, row 4*2 is A080040, row 5*2 is A155543, row 6*2 is A014448, row 8*2 is A080042, row 9*2 is A170931, row 11*2 is A085447.
Cf. A191348 which uses ceiling() in place of floor().

Programs

  • PARI
    T(n, k) = if (n==0, k==0, my(x=sqrtint(n)); sum(i=0, (k+1)\2, binomial(k, 2*i)*x^(k-2*i)*n^i));
    matrix(9,9, n, k, T(n-1,k-1)) \\ Michel Marcus, Aug 22 2019
    
  • PARI
    T(n, k) = if (k==0, 1, if (k==1, sqrtint(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 22 2019

Formula

For each row n>=0 let T(n,0)=1 and T(n,1)=floor(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 22 2019
T(n, k) = Sum_{i=0..floor((k+1)/2)} binomial(k, 2*i)*floor(sqrt(n))^(k-2*i)*n^i for n > 0, with T(0, 0) = 1 and T(0, k) = 0 for k > 0. - Michel Marcus, Aug 23 2019

A027151 a(n) = T(n,0) + T(n,1) + ... + T(n,n), T given by A027144.

Original entry on oeis.org

1, 3, 7, 21, 45, 135, 291, 873, 1881, 5643, 12159, 36477, 78597, 235791, 508059, 1524177, 3284145, 9852435, 21229047, 63687141, 137226717, 411680151, 887047443, 2661142329, 5733964809, 17201894427, 37064931183, 111194793549, 239591481525, 718774444575
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A141041 (bisection), A287811 (bisection).

Programs

  • PARI
    Vec((1 + 3*x)*(1 + x^2) / (1 - 6*x^2 - 3*x^4) + O(x^40)) \\ Colin Barker, Jan 18 2018

Formula

G.f.: (1 + 3*x)*(1 + x^2) / (1 - 6*x^2 - 3*x^4).
a(n) = 6*a(n-2) + 3*a(n-4) for n>3. - Colin Barker, Jan 18 2018
Showing 1-4 of 4 results.