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.

A141041 a(n) = ((3 + 2*sqrt(3))^n + (3 - 2*sqrt(3))^n)/2.

Original entry on oeis.org

1, 3, 21, 135, 873, 5643, 36477, 235791, 1524177, 9852435, 63687141, 411680151, 2661142329, 17201894427, 111194793549, 718774444575, 4646231048097, 30033709622307, 194140950878133, 1254946834135719, 8112103857448713
Offset: 0

Views

Author

Roger L. Bagula, Aug 18 2008

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 3^(n-1) else 6*Self(n-1) +3*Self(n-2): n in [1..31]]; // G. C. Greubel, Oct 10 2022
    
  • Mathematica
    a[n_]= ((3+2*Sqrt[3])^n + (3-2*Sqrt[3])^n)/2; Table[FullSimplify[a[n]], {n,0,30}]
    LinearRecurrence[{6,3},{1,3},30] (* Harvey P. Dale, Aug 25 2014 *)
  • SageMath
    A141041 = BinaryRecurrenceSequence(6,3,1,3)
    [A141041(n) for n in range(31)] # G. C. Greubel, Oct 10 2022

Formula

a(n) = 3*abs(A099842(n-1)), for n > 0.
G.f.: (1-3*x)/(1-6*x-3*x^2). - Philippe Deléham, Mar 03 2012
a(n) = 6*a(n-1) + 3*a(n-2), a(0) = 1, a(1) = 3. - Philippe Deléham, Mar 03 2012
a(n) = Sum_{k=0..n} A201701(n,k)*3^(n-k). - Philippe Deléham, Mar 03 2012
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(4*k-3)/(x*(4*k+1) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 27 2013
a(n) = (-i*sqrt(3))^n * ChebyshevT(n, i*sqrt(3)). - G. C. Greubel, Oct 10 2022

Extensions

Edited by N. J. A. Sloane, Aug 24 2008

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

A099843 A transform of the Fibonacci numbers.

Original entry on oeis.org

1, -5, 21, -89, 377, -1597, 6765, -28657, 121393, -514229, 2178309, -9227465, 39088169, -165580141, 701408733, -2971215073, 12586269025, -53316291173, 225851433717, -956722026041, 4052739537881, -17167680177565, 72723460248141, -308061521170129, 1304969544928657
Offset: 0

Views

Author

Paul Barry, Oct 27 2004

Keywords

Comments

The g.f. is the transform of the g.f. of A000045 under the mapping G(x) -> (-1/(1+x))*G((x-1)/(x+1)). In general this mapping transforms x/(1-k*x-k*x^2) into (1-x)/(1 + 2(k+1)*x - (2*k-1)*x^2).
Pisano period lengths: 1, 1, 8, 2, 20, 8, 16, 4, 8, 20, 10, 8, 28, 16, 40, 8, 12, 8, 6, 20, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Cf. A084326 (shifted unsigned inverse binomial transform), A152174 (binomial transform).

Programs

  • Magma
    [(-1)^n*Fibonacci(3*n+2): n in [0..40]]; // G. C. Greubel, Apr 20 2023
    
  • Maple
    a:= n-> (<<0|1>, <1|-4>>^n.<<1, -5>>)[1,1]:
    seq(a(n), n=0..24);  # Alois P. Heinz, Apr 21 2023
  • Mathematica
    CoefficientList[Series[(1-x)/(1+4*x-x^2), {x,0,30}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
    LinearRecurrence[{-4,1},{1,-5},30] (* Harvey P. Dale, Aug 13 2015 *)
  • SageMath
    [(-1)^n*fibonacci(3*n+2) for n in range(41)] # G. C. Greubel, Apr 20 2023

Formula

G.f.: (1-x)/(1+4*x-x^2).
a(n) = (sqrt(5)-2)^n * (1/2 - 3*sqrt(5)/10) + (-sqrt(5)-2)^n * (1/2 + 3*sqrt(5)/10).
a(n) = (-1)^n*Fibonacci(3*n+2).
a(n) = -4*a(n-1) + a(n-2), a(0)=1, a(1)=-5. - Philippe Deléham, Nov 03 2008
a(n) = (-1)^n*(A001076(n) + A001076(n+1)). - R. J. Mathar, Aug 10 2012
a(n) = (-1)^n*A015448(n+1). - R. J. Mathar, May 07 2019

A109113 a(n) = 6*a(n-1) + 3*a(n-2), a(0)=2, a(1)=14.

Original entry on oeis.org

2, 14, 90, 582, 3762, 24318, 157194, 1016118, 6568290, 42458094, 274453434, 1774094886, 11467929618, 74129862366, 479182963050, 3097487365398, 20022473081538, 129427300585422, 836631222757146, 5408069238299142
Offset: 0

Views

Author

Emeric Deutsch, Jun 19 2005

Keywords

Comments

Kekulé numbers for certain benzenoids.

References

  • S. J. Cyvin and I. Gutman, Kekulé structures in benzenoid hydrocarbons, Lecture Notes in Chemistry, No. 46, Springer, New York, 1988 (p. 302, P_{15}).

Crossrefs

Cf. A099842.

Programs

  • Maple
    a[0]:=2: a[1]:=14: for n from 2 to 25 do a[n]:=6*a[n-1]+3*a[n-2] od: seq(a[n],n=0..22);
  • Mathematica
    CoefficientList[Series[2*(1 + x)/(1 - 6*x - 3*x^2), {x, 0, 20}], x] (* Wesley Ivan Hurt, Jan 01 2024 *)
  • PARI
    Vec(2*(1+x)/(1-6*x-3*x^2)+O(x^99)) \\ Charles R Greathouse IV, May 06 2014

Formula

a(n) = ((3 + 2*sqrt(3))^(n+1) + (3 - 2*sqrt(3))^(n+1))/3.
G.f.: 2*(1+z)/(1 - 6*z - 3*z^2).
a(n) = 2*abs(A099842(n)). - F. Chapoton, May 06 2014
E.g.f.: 2*exp(3*x)*(3*cosh(2*sqrt(3)*x) + 2*sqrt(3)*sinh(2*sqrt(3)*x))/3. - Stefano Spezia, Apr 08 2025
Showing 1-4 of 4 results.