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

A090390 Repeatedly multiply (1,0,0) by ([1,2,2],[2,1,2],[2,2,3]); sequence gives leading entry.

Original entry on oeis.org

1, 1, 9, 49, 289, 1681, 9801, 57121, 332929, 1940449, 11309769, 65918161, 384199201, 2239277041, 13051463049, 76069501249, 443365544449, 2584123765441, 15061377048201, 87784138523761, 511643454094369, 2982076586042449, 17380816062160329, 101302819786919521, 590436102659356801
Offset: 0

Views

Author

Vim Wenders, Jan 30 2004

Keywords

Comments

The values of a and b in (a,b,c)*A give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1; the values of c are A000129(2n)
Binomial transform of A086348. - Johannes W. Meijer, Aug 01 2010
All values of a(n) are squares. sqrt(a(n+1)) = A001333(n). The ratio a(n+1)/a(n) converges to 3 + 2*sqrt(2). - Richard R. Forberg, Aug 14 2013

References

  • Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See Table 60 at p. 123.

Crossrefs

Programs

  • Haskell
    a090390 n = a090390_list !! n
    a090390_list = 1 : 1 : 9 : zipWith (-) (map (* 5) $
       tail $ zipWith (+) (tail a090390_list) a090390_list) a090390_list
    -- Reinhard Zumkeller, Aug 17 2013
    
  • Magma
    [Evaluate(DicksonFirst(n,-1),2)^2/4: n in [0..40]]; // G. C. Greubel, Aug 21 2022
    
  • Maple
    a:= n-> (<<1|0|0>>. <<1|2|2>, <2|1|2>, <2|2|3>>^n)[1, 1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Aug 17 2013
  • Mathematica
    CoefficientList[Series[(1-4x-x^2)/((1+x)(1-6x+x^2)),{x, 0, 30}], x] (* Harvey P. Dale, May 20 2012 *)
    LinearRecurrence[{5,5,-1}, {1,1,9}, 30] (* Harvey P. Dale, May 20 2012 *)
    Table[(ChebyshevT[n,3]+(-1)^n)/2, {n,0,30}] (* Eric W. Weisstein, Apr 17 2018 *)
    (LucasL[Range[0, 40], 2]/2)^2 (* G. C. Greubel, Aug 21 2022 *)
  • PARI
    a(n)=polcoeff((1-4*x-x^2)/((1+x)*(1-6*x+x^2))+x*O(x^n),n)
    
  • PARI
    a(n)=if(n<0,0,([1,2,2;2,1,2;2,2,3]^n)[1,1])
    
  • PARI
    Vec( (1-4*x-x^2)/((1+x)*(1-6*x+x^2)) + O(x^66) ) \\ Joerg Arndt, Aug 16 2013
    
  • Perl
    use Math::Matrix; use Math::BigInt; $a = new Math::Matrix ([ 1, 2, 2], [ 2, 1, 2], [ 2, 2, 3]); $p = new Math::Matrix ([1, 0, 0]); $p->print(); for ($i=1; $i<20;$i++) { $p = $p->multiply($a); $p->print(); }
    
  • SageMath
    [lucas_number2(n,2,-1)^2/4 for n in (0..40)] # G. C. Greubel, Aug 21 2022

Formula

G.f.: (1-4*x-x^2)/((1+x)*(1-6*x+x^2)).
a(n) = A001333(n)^2
(a, b, c) = (1, 0, 0). Recursively multiply (a, b, c)*( [1, 2, 2], [2, 1, 2], [2, 2, 3] ).
M^n * [ 1 1 1] = [a(n+1) q a(n)], where M = the 3 X 3 matrix [4 4 1 / 2 1 0 / 1 0 0]. E.g. M^5 * [1 1 1] = [9801 4059 1681] where 9801 = a(6), 1681 = a(5). Similarly, M^n * [1 0 0] generates A079291 (Pell number squares). - Gary W. Adamson, Oct 31 2004
a(n) = (((1+sqrt(2))^(2*n) + (1-sqrt(2))^(2*n)) + 2*(-1)^n)/4 - Lambert Klasen (lambert.klasen(AT)gmx.net), Oct 09 2005
a(n) = (A001541(n) + (-1)^n)/2. - R. J. Mathar, Nov 20 2009
a(n) = 5*a(n-1) + 5*a(n-2) - a(n-3), with a(0)=1, a(1)=1, a(2)=9. - Harvey P. Dale, May 20 2012
(a(n)) = tesseq(- .5'j + .5'k - .5j' + .5k' - 2'ii' + 'jj' - 'kk' + .5'ij' + .5'ik' + .5'ji' + 'jk' + .5'ki' + 'kj' + e), apart from initial term. - Creighton Dement, Nov 16 2004
a(n) = A302946(n)/4. - Eric W. Weisstein, Apr 17 2018
E.g.f.: exp(-x)*(1 + exp(4*x)*cosh(2*sqrt(2)*x))/2. - Stefano Spezia, Aug 03 2024

A095342 Number of elements in n-th string generated by a Kolakoski(5,1) rule starting with a(1)=1.

Original entry on oeis.org

1, 1, 5, 5, 17, 25, 61, 109, 233, 449, 917, 1813, 3649, 7273, 14573, 29117, 58265, 116497, 233029, 466021, 932081, 1864121, 3728285, 7456525, 14913097, 29826145, 59652341, 119304629, 238609313, 477218569, 954437197, 1908874333, 3817748729
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

Each string is derived from the previous string using the Kolakoski(5,1) rule and the additional condition: "string begins with 1 if previous string ends with 5 and vice versa". The strings are 1 -> 5 -> 11111 -> 51515 -> 11111511111511111 -> ... and each one contains 1,1,5,5,17,... elements.
Equals inverse binomial transform of A025579. - Gary W. Adamson, Mar 04 2010

Crossrefs

Cf. A025579 . - Gary W. Adamson, Mar 04 2010

Programs

  • GAP
    List([1..35], n-> (2^(n+2) + (-1)^n*(5-6*n))/9); # G. C. Greubel, Dec 26 2019
  • Magma
    [(2^(n+2) + (-1)^n*(5-6*n))/9: n in [1..35]]; // G. C. Greubel, Dec 26 2019
    
  • Maple
    seq( (2^(n+2) + (-1)^n*(5-6*n))/9, n=1..35); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[(2^(n+2) + (-1)^n*(5-6*n))/9, {n,35}] (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    vector(35, n, (2^(n+2) + (-1)^n*(5-6*n))/9) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    [(2^(n+2) + (-1)^n*(5-6*n))/9 for n in (1..35)] # G. C. Greubel, Dec 26 2019
    

Formula

a(1) = a(2) = 1, a(n) = a(n-1) + 2*a(n-2) - 2*(-1)^n.
From R. J. Mathar, Apr 01 2010: (Start)
G.f.: x*(1+x+2*x^2)/((1-2*x)*(1+x)^2).
a(n) = (2^(n+2) + (-1)^n*(5-6*n))/9. (End)
E.g.f.: (exp(2*x) - 9 + (5+6*x)*exp(-x))/9. - G. C. Greubel, Dec 26 2019

A095343 Length of n-th string generated by a Kolakoski(7,1) rule starting with a(1)=1.

Original entry on oeis.org

1, 1, 7, 7, 31, 49, 145, 289, 727, 1591, 3775, 8545, 19873, 45505, 105127, 241639, 557023, 1281937, 2953009, 6798817, 15657847, 36054295, 83027839, 191190721, 440274241, 1013846401, 2334669127, 5376208327, 12380215711, 28508840689
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

Each string is derived from the previous string using the Kolakoski(7,1) rule and the additional condition: "string begins with 1 if previous string ends with 5 and vice versa". The strings are 1 -> 7 -> 1111111 -> 7171717 -> 11111117111111171111111711111117 -> ... and each one contains 1,1,7,7,31,... elements.

Crossrefs

Programs

  • GAP
    a:=[1,1];; for n in [3..35] do a[n]:=a[n-1]-3*a[n-2]-3*(-1)^n; od; a; # G. C. Greubel, Dec 26 2019
  • Magma
    I:=[1,1]; [n le 2 select I[n] else Self(n-1) + 3*Self(n-2) - 3*(-1)^n: n in [1..35]]; // G. C. Greubel, Dec 26 2019
    
  • Maple
    seq(coeff(series(x*(1+x+3*x^2)/((1+x)*(1-x-3*x^2)), x, n+1), x, n), n = 0..35); # G. C. Greubel, Dec 26 2019
  • Mathematica
    Table[ 3*(-1)^n + 2*Sqrt[3]^n*(Sqrt[3]*Fibonacci[n, 1/Sqrt[3]] - Fibonacci[n+1, 1/Sqrt[3]]), {n,35}]//FullSimplify (* G. C. Greubel, Dec 26 2019 *)
  • PARI
    vector(35, n, round(3*(-1)^n + 2*(sqrt(3)/I)^n*(sqrt(3)*I* polchebyshev(n-1, 2, I/(2*sqrt(3))) - polchebyshev(n, 2, I/(2*sqrt(3)))) )) \\ G. C. Greubel, Dec 26 2019
    
  • Sage
    def A095343_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x+3*x^2)/((1+x)*(1-x-3*x^2)) ).list()
    a=A095343_list(35); a[1:] # G. C. Greubel, Dec 26 2019
    

Formula

a(1) = a(2) = 1, a(n) = a(n-1) + 3*a(n-2) - 3*(-1)^n.
G.f.: x*(1+x+3*x^2)/((1+x)*(1-x-3*x^2)). - Colin Barker, Jul 02 2012
a(n) = 3*(-1)^n + 2*(sqrt(3)/i)^n*(sqrt(3)*i*ChebyshevU(n, i/(2*sqrt(3))) - ChebyshevU(n-1, i/(2*sqrt(3)))). - G. C. Greubel, Dec 26 2019

A123270 a(0)=1, a(1)=1, a(n) = 5*a(n-1) + 4*a(n-2).

Original entry on oeis.org

1, 1, 9, 49, 281, 1601, 9129, 52049, 296761, 1692001, 9647049, 55003249, 313604441, 1788035201, 10194593769, 58125109649, 331403923321, 1889520055201, 10773215969289, 61424160067249, 350213664213401, 1996764961336001
Offset: 0

Views

Author

Philippe Deléham, Oct 09 2006

Keywords

Comments

First differences give {0, 8, 40, 232, 1320, 7528, 42920, ...} = 8*A015537(n) = 8 * {0, 1, 5, 29, 165, 941, 5365, ...}. - Alexander Adamchuk, Nov 03 2006

Crossrefs

Programs

  • Haskell
    a123270 n = a123270_list !! n
    a123270_list = 1 : 1 : zipWith (-) (map (* 5) $
       zipWith (+) (tail a123270_list) a123270_list) a123270_list
    -- Reinhard Zumkeller, Aug 16 2013
  • Mathematica
    LinearRecurrence[{5,4},{1,1},30] (* Harvey P. Dale, Jul 25 2011 *)

Formula

a(n) = Sum_{k=0..n} 4^(n-k)*A122542(n,k).
G.f.: (1-4*x)/(1-5*x-4*x^2).
a(n) = 1 + 8*Sum_{k=0..n} A015537(k). - Alexander Adamchuk, Nov 03 2006

A095345 a(n) is the length of the n-th run in A095346.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

This is the first sequence reached in the infinite process described in the A066983 comment line.
(a(n)) is a morphic sequence, i.e., a letter to letter projection of a fixed point of a morphism. The morphism is 1->121,2->3,1,3->313. The fixed point is the fixed point 121312131312... starting with 1. The letter-to-letter map is 1->1, 2->1, 3->3. See also the comments in A108103. - Michel Dekking, Jan 06 2018

Examples

			A095346 begins: 3,1,3,1,1,1,3,1,3,1,1,1,3,1,1,1,... and length or runs of 3's and 1's are 1,1,1,3,1,1,1,3,1,3,...
		

References

  • F. M. Dekking: "What is the long range order in the Kolakoski sequence?" in: The Mathematics of Long-Range Aperiodic Order, ed. R. V. Moody, Kluwer, Dordrecht (1997), pp. 115-125.

Crossrefs

Formula

a(n)=3 if n=2*ceiling(k*phi) for some k where phi=(1+sqrt(5))/2, otherwise a(n)=1. [Benoit Cloitre, Mar 02 2009]

A095346 a(n) is the length of the n-th run of A095345.

Original entry on oeis.org

3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1
Offset: 1

Views

Author

Benoit Cloitre, Jun 03 2004

Keywords

Comments

This is the second sequence reached in the infinite process described in A066983 comment line.
(a(n)) is a morphic sequence, i.e., a letter to letter projection of a fixed point of a morphism. The morphism is 1->121,2->3,1,3->313. The fixed point is the fixed point 3131213131213... starting with 3. The letter-to-letter map is 1->1, 2->1, 3->3. See also COMMENTS of A108103. - Michel Dekking, Jan 06 2018

Examples

			A095345 begins : 1,1,1,3,1,1,1,3,1,3,...,.. and length or runs of 1's and 3's are 3,1,3,1,1,1,...
		

References

  • F. M. Dekking: "What is the long range order in the Kolakoski sequence?" in: The Mathematics of Long-Range Aperiodic Order, ed. R. V. Moody, Kluwer, Dordrecht (1997), pp. 115-125.

Crossrefs

Formula

a(n)=3 if n=1+2*floor(phi*k) for some k where phi=(1+sqrt(5))/2, else a(n)=1. [Benoit Cloitre, Mar 02 2009]

A124389 A square array of Kolakoski string lengths, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 5, 1, 1, 1, 1, 7, 5, 7, 1, 1, 1, 1, 9, 17, 7, 9, 1, 1, 1, 1, 17, 25, 31, 9, 11, 1, 1, 1, 1, 25, 61, 49, 49, 11, 13, 1, 1, 1, 1, 43, 109, 145, 81, 71, 13, 15, 1, 1, 1
Offset: 0

Views

Author

Paul Barry, Oct 30 2006

Keywords

Comments

Rows of square array include A066983,A095342,A095343,A095344. See A066983 for description of Kolakoski strings. Sums of antidiagonals is A124390.

Examples

			Square array begins
1, 1, 1, 1, 1, 1, 1...
1, 1, 1, 3, 3, 7, 9...
1, 1, 1, 5, 5, 17, 25...
1, 1, 1, 7, 7, 31, 49...
1, 1, 1, 9, 9, 49, 81...
1, 1, 1, 11, 11, 71, 121...
1, 1, 1, 13, 13, 97, 169...
As a number triangle, triangle begins
1,
1, 1,
1, 1, 1,
1, 1, 1, 1,
1, 3, 1, 1, 1,
1, 3, 5, 1, 1, 1,
1, 7, 5, 7, 1, 1, 1,
1, 9, 17, 7, 9, 1, 1, 1,
1, 17, 25, 31, 9, 11, 1, 1, 1
		

Formula

Row k of square array has g.f. (1+x-kx^2)/((1+x)(1-x-kx^2))
Showing 1-7 of 7 results.