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 21-30 of 37 results. Next

A189746 a(1)=5, a(2)=2, a(n) = 5*a(n-1) + 2*a(n-2).

Original entry on oeis.org

5, 2, 20, 104, 560, 3008, 16160, 86816, 466400, 2505632, 13460960, 72316064, 388502240, 2087143328, 11212721120, 60237892256, 323614903520, 1738550302112, 9339981317600, 50177007192224, 269564998596320, 1448179007366048, 7780025034022880, 41796483184846496
Offset: 1

Views

Author

Harvey P. Dale, Apr 26 2011

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,2},{5,2},40]
  • Maxima
    a[1]:5$ a[2]:2$ a[n]:=5*a[n-1]+2*a[n-2]$ makelist(a[n], n, 1, 24); /* Bruno Berselli, May 24 2011 */

Formula

G.f.: x*(5-23*x)/(1-5*x-2*x^2). - Bruno Berselli, May 24 2011

A189747 a(1)=5, a(2)=3, a(n)=5*a(n-1) + 3*a(n-2).

Original entry on oeis.org

5, 3, 30, 159, 885, 4902, 27165, 150531, 834150, 4622343, 25614165, 141937854, 786531765, 4358472387, 24151957230, 133835203311, 741631888245, 4109665051158, 22773220920525, 126195099756099, 699295161542070, 3875061106978647, 21473191019519445
Offset: 1

Views

Author

Harvey P. Dale, Apr 26 2011

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,3},{5,3},40]
  • Maxima
    a[1]:5$ a[2]:3$ a[n]:=5*a[n-1]+3*a[n-2]$ makelist(a[n], n, 1, 23); /* Bruno Berselli, May 24 2011 */

Formula

G.f.: x*(5-22*x)/(1-5*x-3*x^2). - Bruno Berselli, May 24 2011

A189748 a(n) = 5*a(n-1) + 4*a(n-2) with a(1)=5, a(2)=4.

Original entry on oeis.org

5, 4, 40, 216, 1240, 7064, 40280, 229656, 1309400, 7465624, 42565720, 242691096, 1383718360, 7889356184, 44981654360, 256465696536, 1462255100120, 8337138286744, 47534711834200, 271022112317976, 1545249408926680, 8810335493905304, 50232675105233240
Offset: 1

Views

Author

Harvey P. Dale, Apr 26 2011

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,4},{5,4},40]
  • Maxima
    a[1]:5$ a[2]:4$ a[n]:=5*a[n-1]+4*a[n-2]$ makelist(a[n], n, 1, 23); /* Bruno Berselli, May 24 2011 */

Formula

G.f.: x*(5-21*x)/(1-5*x-4*x^2). - Bruno Berselli, May 24 2011

A083337 a(n) = 2*a(n-1) + 2*a(n-2); a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 6, 18, 48, 132, 360, 984, 2688, 7344, 20064, 54816, 149760, 409152, 1117824, 3053952, 8343552, 22795008, 62277120, 170144256, 464842752, 1269974016, 3469633536, 9479215104, 25897697280, 70753824768, 193303044096, 528113737728, 1442833563648, 3941894602752, 10769456332800
Offset: 0

Views

Author

Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003

Keywords

Crossrefs

Programs

  • Haskell
    a083337 n = a083337_list !! n
    a083337_list =
       0 : 3 : map (* 2) (zipWith (+) a083337_list (tail a083337_list))
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Mathematica
    CoefficientList[Series[3x/(1-2x-2x^2), {x, 0, 25}], x]
    s = Sqrt[3]; a[n_] := Simplify[s*((1 + s)^n - (1 - s)^n)/2]; Array[a, 30, 0] (* or *)
    LinearRecurrence[{2, 2}, {0, 3}, 31] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    apply( a(n)=([1,1;3,1]^n)[2,1], [0..30]) \\ or: ([2,2;1,0]^n)[2,1]*3. - M. F. Hasler, Aug 06 2018

Formula

G.f.: 3x/(1 - 2x - 2x^2).
a(n) = a(n-1) + 3*A026150(n-1). a(n)/A026150(n) converges to sqrt(3).
a(n) = lower left term of [1,1; 3,1]^n. - Gary W. Adamson, Mar 12 2008

Extensions

Edited and definition completed by M. F. Hasler, Aug 06 2018

A108898 a(n+3) = 3*a(n+2) - 2*a(n), a(0) = -1, a(1) = 1, a(2) = 3.

Original entry on oeis.org

-1, 1, 3, 11, 31, 87, 239, 655, 1791, 4895, 13375, 36543, 99839, 272767, 745215, 2035967, 5562367, 15196671, 41518079, 113429503, 309895167, 846649343, 2313089023, 6319476735, 17265131519, 47169216511, 128868696063, 352075825151, 961889042431, 2627929735167, 7179637555199
Offset: 0

Views

Author

Creighton Dement, Jul 16 2005

Keywords

Comments

In reference to the program code, "ibasek" corresponds to the floretion 'ik'. Sequences in this same batch are "kbase" = A005665 (Tower of Hanoi with cyclic moves only.) and "ibase" = A077846.

Crossrefs

Programs

  • Haskell
    a108898 n = a108898_list !! n
    a108898_list = -1 : 1 : 3 :
       zipWith (-) (map (* 3) $ drop 2 a108898_list) (map (* 2) a108898_list)
    -- Reinhard Zumkeller, Oct 15 2011
    
  • Maple
    seriestolist(series((-1+4*x)/((x-1)*(2*x^2+2*x-1)), x=0,31)); -or- Floretion Algebra Multiplication Program, FAMP Code: 2ibaseksumseq[A*B] with A = + 'i + 'ii' + 'ij' + 'ik' and B = + .5'i + .5'j - .5'k + .5i' - .5j' + .5k' + .5'ij' + .5'ik' - .5'ji' - .5'ki'; Sumtype is set to:sum[(Y[0], Y[1], Y[2]),mod(3)
  • Mathematica
    LinearRecurrence[{3, 0, -2}, {-1, 1, 3}, 40] (* Paolo Xausa, Aug 21 2024 *)
  • PARI
    Vec(-(1 - 4*x) / ((1 - x)*(1 - 2*x - 2*x^2)) + O(x^40)) \\ Colin Barker, Apr 29 2019

Formula

a(n) = A028860(n+2)-1.
G.f.: (-1+4*x)/((x-1)*(2*x^2+2*x-1)).
From Colin Barker, Apr 29 2019: (Start)
a(n) = (-1 + (-(1-sqrt(3))^n + (1+sqrt(3))^n)/sqrt(3)).
a(n) = 3*a(n-1) - 2*a(n-3) for n>2.
(End)

A170931 Extended Lucas L(n,i) = n*(L(n,i-1) + L(n,i-2)) = a^i + b^i where d = sqrt(n*(n+4)); a=(n+d)/2; b=(n-d)/2.

Original entry on oeis.org

2, 4, 24, 112, 544, 2624, 12672, 61184, 295424, 1426432, 6887424, 33255424, 160571392, 775307264, 3743514624, 18075287552, 87275208704, 421401985024, 2034708774912, 9824443039744, 47436607258624, 229044201193472
Offset: 0

Views

Author

Claudio Peruzzi (claudio.peruzzi(AT)gmail.com), Feb 04 2010

Keywords

Comments

Sequence gives the rational part of the radii of the circles in nested circles and squares inspired by Vitruvian Man, starting with a square whose sides are of length 4 (in some units). The radius of the circle is an integer in the real quadratic number field Q(sqrt(2)), namely R(n) = A(n-1) + B(n)*sqrt(2) with A(-1)=1, for n >= 1, A(n-1) = A170931(n-1)*-1^(n-1); and B(n) = A094013(n)*-1^n. See illustrations in the links. - Kival Ngaokrajang, Feb 15 2015

Examples

			L(n,0)=2, L(n,1)=n.
		

Crossrefs

Cf. similar sequences with d=sqrt(n*(n+k)): A000032 (k=1, classic Lucas), A080040 (k=2), A085480 (k=3).

Programs

  • Magma
    I:=[2,4]; [n le 5 select I[n] else 4*Self(n-1)+4*Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 21 2017
  • Mathematica
    CoefficientList[Series[2 (1 - 2 x) / (1 - 4 x - 4 x^2), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 16 2015 *)
    LinearRecurrence[{4,4},{2,4},30] (* Harvey P. Dale, Sep 03 2016 *)
  • PARI
    x='x+O('x^30); Vec(2*(1-2*x)/(1 - 4*x - 4*x^2)) \\ G. C. Greubel, Dec 21 2017
    

Formula

From R. J. Mathar, Feb 05 2010: (Start)
a(n) = 2*A084128(n) = 4*a(n-1) + 4*a(n-2).
G.f.: 2*(1-2*x)/(1 - 4*x - 4*x^2). (End)

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

A238799 a(0) = 1, a(n+1) = 2*a(n)^3 + 3*a(n).

Original entry on oeis.org

1, 5, 265, 37220045, 103124220135120334842385, 2193370648451279691104497113491599222165108730278225579497595691360405
Offset: 0

Views

Author

Arkadiusz Wesolowski, Mar 05 2014

Keywords

Comments

a(6) has 209 digits and is too large to include.
Except for the first term, this is a subsequence of A175180.
The squares larger than 1 are in A076445.
If we define u(0) = 1 , u(n+1) = (u(n)/3)*(u(n)^2+9) / (u(n)^2 + 1), then u(n) = a(n) / A378683(n) ; this is Halley's method to calculate sqrt(3). - Robert FERREOL, Dec 21 2024

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0] == 1, a[n] == 2*a[n - 1]^3 + 3*a[n - 1]}, a[n], {n, 5}]
    NestList[2#^3+3#&,1,5] (* Harvey P. Dale, Mar 22 2023 *)
  • PARI
    a=1; print1(a, ", "); for(n=1, 5, b=2*a^3+3*a; print1(b, ", "); a=b);
    
  • PARI
    { A238799(n) = my(q=Mod(x,x^2-3)); lift( (1+q)*(2+q)^((3^n-1)/2) + (1-q)*(2-q)^((3^n-1)/2) )/2; } \\ Max Alekseyev, Sep 04 2018

Formula

a(n) = sqrt(2) * sinh( 3^n * arcsinh(1/sqrt(2)) ) = (1+sqrt(3))/2 * (2+sqrt(3))^((3^n-1)/2) + (1-sqrt(3))/2 * (2-sqrt(3))^((3^n-1)/2). - Max Alekseyev, Sep 04 2018
a(n) = ((1 + sqrt(3))^(3^n) + (1 - sqrt(3))^(3^n))/2^((3^n+1)/2) = A002531(3^n) = A080040(3^n)/2^((3^n+1)/2). - Robert FERREOL, Nov 19 2024

A084157 a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4) with a(0)=0, a(1)=1, a(2)=4, a(3)=22.

Original entry on oeis.org

0, 1, 4, 22, 112, 556, 2704, 13000, 62080, 295312, 1401664, 6644320, 31472896, 149017792, 705395968, 3338614912, 15800258560, 74772443392, 353840161792, 1674425579008, 7923565146112, 37494981225472, 177428889407488
Offset: 0

Views

Author

Paul Barry, May 16 2003

Keywords

Comments

Binomial transform of A084156.

Crossrefs

Programs

  • Magma
    I:=[0,1,4,22]; [n le 4 select I[n] else 8*Self(n-1) -16*Self(n-2) +12*Self(n-4): n in [1..41]]; // G. C. Greubel, Oct 11 2022
    
  • Mathematica
    LinearRecurrence[{8,-16,0,12},{0,1,4,22},30] (* Harvey P. Dale, Feb 19 2017 *)
  • SageMath
    A083881 = BinaryRecurrenceSequence(6,-6,1,3)
    A026150 = BinaryRecurrenceSequence(2,2,1,1)
    def A084157(n): return (A083881(n) - A026150(n))/2
    [A084157(n) for n in range(41)] # G. C. Greubel, Oct 11 2022

Formula

a(n) = (A083881(n) - A026150(n))/2.
a(n) = 8*a(n-1) - 16*a(n-2) + 12*a(n-4).
a(n) = ((3+sqrt(3))^n + (3-sqrt(3))^n - (1+sqrt(3))^n - (1-sqrt(3))^n)/4.
G.f.: x*(1-4*x+6*x^2)/((1-2*x-2*x^2)*(1-6*x+6*x^2)).
E.g.f.: exp(2*x)*sinh(x)*cosh(sqrt(3)*x).
From G. C. Greubel, Oct 11 2022: (Start)
a(2*n) = A003462(n)*A026150(2*n) = A003462(n)*A080040(2*n)/2.
a(2*n+1) = (1/2)*(3^(n+1)*A002605(2*n+1) - A026150(2*n+1)). (End)

A067834 Numbers k such that in the ring Z[sqrt(3)] the norm of (-1+sqrt(3))^k-1 is prime.

Original entry on oeis.org

2, 3, 7, 13, 19, 43, 61, 151, 257, 751, 859, 1453, 3767, 3889, 8171, 15959, 21499, 22679, 23297, 31277, 43609, 57037, 61961, 103087, 115931, 173647, 215959, 496073
Offset: 1

Views

Author

Mike Oakes, Feb 09 2002

Keywords

Comments

The definition implies that k must be a prime.
The norm of (-1+sqrt(3))^k-1 is given by (-2)^k - lucasV(-2, -2, k)+1, where lucasV(-2, -2, k) is the solution of the recurrence relation v(n) = -2*v(n-1) + 2*v(n-2) with v(0)=2 and v(1)=-2.
a(29) > 517000. - Serge Batalov, Oct 24 2024

Examples

			3 is a term because (-2)^3-lucasV(-2,-2,3)+1 = -8-(-20)+1 = 13 and 13 is prime.
		

Crossrefs

Cf. A080040.

Programs

  • Mathematica
    v[0] = 2; v[1] = -2; v[n_] := v[n] = -2*v[n-1] + 2*v[n-2] ; s = {}; Do[If[PrimeQ[(-2)^n - v[n] + 1], Print[n]; AppendTo[s, n]], {n, 8171}]; s (* Jean-François Alcover, Apr 18 2011 *)
  • PARI
    isok(n)={ispseudoprime(([0, 1; 2, 2]^n*[2; 2])[1, 1] - 2^n - (-1)^n)} \\ Andrew Howroyd, Oct 24 2024

Extensions

Corrected and extended by Aurelien Gibier, Oct 24 2024
a(28) from Serge Batalov, Oct 24 2024
Previous Showing 21-30 of 37 results. Next