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

A078697 Duplicate of A066629.

Original entry on oeis.org

1, 2, 5, 8, 15, 24, 41, 66, 109, 176, 287, 464, 753, 1218, 1973, 3192, 5167, 8360, 13529
Offset: 0

Views

Author

Keywords

A066983 a(n+2) = a(n+1) + a(n) + (-1)^n, with a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 9, 17, 25, 43, 67, 111, 177, 289, 465, 755, 1219, 1975, 3193, 5169, 8361, 13531, 21891, 35423, 57313, 92737, 150049, 242787, 392835, 635623, 1028457, 1664081, 2692537, 4356619, 7049155, 11405775, 18454929, 29860705, 48315633, 78176339
Offset: 1

Views

Author

Benoit Cloitre, Jan 27 2002

Keywords

Comments

Length of strings given by a successive substitution of a "modified" Kolakoski-(3, 1) sequence. Starting with 1, using the rule "string begins with 1 if previous string ends with 3, string begins with 3 if previous string ends with 1" then applying the classical Kolakoski-(3,1) rule. This gives: 1 -> 3 -> 111 -> 313 -> 1113111 -> 313111313 -> 11131113131113111 and the length of string are 1, 1, 3, 3, 7, 9, 17, ... At step n, length = a(n+1). This substitution leads to two sequences: 1, 1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, ... and 3, 1, 3, 1, 1, 1, 3, 1, 3, 1, 1, 1, 3, ... - Benoit Cloitre, Jun 01 2004
Lengths of comparators in subsequent layers of correction network F_n. - Grzegorz Stachowiak (gst(AT)ii.uni.wroc.pl), Nov 28 2004
Convolution of F(n+1) and A105812(n). Action of inverse of sequence array for F(n-1)*(-1)^n on F(n+1). - Paul Barry, Oct 29 2006

References

  • Omur Deveci, The Pell-Padovan sequences and the Jacobsthal-Padovan sequences in finite groups, Utilitas Mathematica, 98 (2015), 257-270.

Crossrefs

Programs

  • GAP
    a:=[1,1];; for n in [3..40] do a[n]:=a[n-1]+a[n-2]+(-1)^n; od; a; # Muniru A Asiru, Aug 09 2018
    
  • Magma
    [n le 2 select 1 else Self(n-1)+Self(n-2)+(-1)^n: n in [1..50]]; // Vincenzo Librandi, Aug 13 2018
    
  • Maple
    seq(coeff(series(x*(1+x-x^2)/((1+x)*(1-x-x^2)), x,n+1),x,n),n=1..40); # Muniru A Asiru, Aug 09 2018
  • Mathematica
    Table[ Floor[ GoldenRatio^(k-1) ] - Floor[ GoldenRatio^(k-1) / Sqrt[5] ], {k, 1, 100} ]  (* Federico Provvedi, Mar 26 2013 *)
    LinearRecurrence[{0, 2, 1}, {1, 1, 1}, 40] (* Vincenzo Librandi, Aug 13 2018 *)
  • PARI
    { for (n=1, 250, if (n>2, a=a1 + a2 + (-1)^n; a2=a1; a1=a, a=a1=1; a=a2=1); write("b066983.txt", n, " ", a) ) } \\ Harry J. Smith, Apr 15 2010
    
  • PARI
    vector(40, n, 2*fibonacci(n-2) + (-1)^n) \\ G. C. Greubel, Dec 26 2019
    
  • Python
    from sympy import fibonacci
    def A066983(n): return (fibonacci(n-2)<<1)+(-1 if n&1 else 1) # Chai Wah Wu, May 05 2025
  • Sage
    [2*fibonacci(n-2) + (-1)^n for n in (1..40)] # G. C. Greubel, Dec 26 2019
    

Formula

For n > 4, a(n-2) = floor(2 * phi^n/sqrt(5)) + (1 + (-1)^n)/2.
a(n) = 2 * Fibonacci(n-2) + (-1)^n. - Vladeta Jovovic, Mar 19 2003
G.f.: x*(1+x-x^2)/((1+x)*(1-x-x^2)). - Paul Barry, Oct 29 2006
a(n) = A066629(n-2) - A066629(n-3), n > 2. - R. J. Mathar, Jan 14 2009
a(n) = floor(phi^(n-1)) - floor(phi^(n-1)/sqrt(5)). - Federico Provvedi, Mar 26 2013
a(1) = a(2) = a(3) = 1; for n > 3, a(n) = 2*a(n-2) + a(n-3). - Taras Goy, Aug 03 2018
a(n) = (-1)^n + (-1 - 3/sqrt(5))*((1/2)*(1 - sqrt(5)))^n + (-1 + 3/sqrt(5))*((1/2)*(1 + sqrt(5)))^n. - Stefano Spezia, Jul 22 2019

Extensions

Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A154691 Expansion of (1+x+x^2) / ((1-x)*(1-x-x^2)).

Original entry on oeis.org

1, 3, 7, 13, 23, 39, 65, 107, 175, 285, 463, 751, 1217, 1971, 3191, 5165, 8359, 13527, 21889, 35419, 57311, 92733, 150047, 242783, 392833, 635619, 1028455, 1664077, 2692535, 4356615, 7049153, 11405771, 18454927, 29860701, 48315631, 78176335
Offset: 0

Views

Author

R. J. Mathar, Jan 14 2009

Keywords

Crossrefs

Programs

  • Haskell
    a154691 n = a154691_list !! n
    a154691_list = 1 : zipWith (+)
                       a154691_list (drop 2 $ map (* 2) a000045_list)
    -- Reinhard Zumkeller, Nov 17 2013
    
  • Magma
    A154691:= func< n | 2*Fibonacci(n+3) - 3 >;
    [A154691(n): n in [0..40]]; // G. C. Greubel, Jan 18 2025
    
  • Maple
    A154691 := proc(n) coeftayl( (1+x+x^2)/(1-x-x^2)/(1-x),x=0,n) ; end proc:
  • Mathematica
    Fibonacci[Range[3,60]]*2 -3 (* Vladimir Joseph Stephan Orlovsky, Mar 19 2010 *)
    CoefficientList[Series[(1 + x + x^2)/((1 - x - x^2)(1 - x)), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 18 2012 *)
  • PARI
    Vec((1+x+x^2) / ((1-x-x^2)*(1-x)) + O(x^60)) \\ Colin Barker, Feb 01 2017
    
  • Python
    def A154691(n): return 2*fibonacci(n+3) - 3
    print([A154691(n) for n in range(41)]) # G. C. Greubel, Jan 18 2025

Formula

a(n+1) - a(n) = A006355(n+3) = A055389(n+3).
a(n) = A066629(n-1) + A066629(n).
a(n) = A006355(n+4) - 3 = A078642(n+1) - 3.
a(n+1) = a(n) + 2*A000045(n+2). - Reinhard Zumkeller, Nov 17 2013
From Colin Barker, Feb 01 2017: (Start)
a(n) = -3 + (2^(1-n)*((1-r)^n*(-2+r) + (1+r)^n*(2+r))) / r where r=sqrt(5).
a(n) = 2*a(n-1) - a(n-3) for n>2. (End)
a(n) = 2*Fibonacci(n+3) - 3. - Greg Dresden, Oct 10 2020
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 2*sqrt(5)*sinh(sqrt(5)*x/2))/5 - 3*exp(x). - Stefano Spezia, Apr 09 2025

A154327 Diagonal sums of number triangle A132046.

Original entry on oeis.org

1, 1, 2, 5, 8, 15, 24, 41, 66, 109, 176, 287, 464, 753, 1218, 1973, 3192, 5167, 8360, 13529, 21890, 35421, 57312, 92735, 150048, 242785, 392834, 635621, 1028456, 1664079, 2692536, 4356617, 7049154, 11405773, 18454928, 29860703, 48315632, 78176337, 126491970, 204668309, 331160280, 535828591, 866988872
Offset: 0

Views

Author

Paul Barry, Jan 07 2009

Keywords

Crossrefs

A shifted version of A066629.

Programs

  • Magma
    [0^n-(3+(-1)^n)/2+2*Fibonacci(n+1):n in [0..40]]; // Vincenzo Librandi, Sep 12 2016
  • Mathematica
    Join[{1}, LinearRecurrence[{1, 2, -1, -1}, {1, 2, 5, 8}, 25]] (* G. C. Greubel, Sep 11 2016 *)
    CoefficientList[Series[(1 - x^2 + 2 x^3 + x^4) / ((1 - x^2) (1 - x - x^2)), {x, 0, 50}], x] (* Vincenzo Librandi, Sep 12 2016 *)

Formula

G.f.: (1 - x^2 + 2x^3 + x^4)/( (1-x^2)*(1-x-x^2) ).
a(n) = 0^n - (3 + (-1)^n)/2 + 2*Fibonacci(n+1).

A153864 Triangle read by rows, A000012 * A153860 * (A066983 * 0^(n-k)).

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 1, 2, 2, 3, 2, 2, 2, 6, 3, 1, 2, 2, 6, 6, 7, 2, 2, 2, 6, 6, 14, 9, 1, 2, 2, 6, 6, 14, 18, 17, 2, 2, 2, 6, 6, 14, 18, 34, 25, 1, 2, 2, 6, 6, 14, 18, 34, 50, 43, 2, 2, 2, 6, 6, 14, 18, 34, 50, 86, 67
Offset: 0

Views

Author

Gary W. Adamson, Jan 03 2009

Keywords

Comments

Row sums = A066629: (1, 2, 5, 8, 15, 24, 41, 66, 109,...).
Right border = A066983: (1, 1, 1, 3, 3, 7, 9, 17,...).

Examples

			First few rows of the triangle =
1;
1, 1;
2, 2, 1;
1, 2, 2, 3;
2, 2, 2, 6, 3;
1, 2, 2, 6, 6, 7;
2, 2, 2, 6, 6, 14, 9;
1, 2, 2, 6, 6, 14, 18, 17;
2, 2, 2, 6, 6, 14, 18, 34, 25;
1, 2, 2, 6, 6, 14, 18, 34, 50, 43;
...
		

Crossrefs

Formula

Triangle read by rows, A000012 * A153860 * (A066983 * 0^(n-k))
Given triangle A000012 * A153860 = partial sums of A153860 starting from the top.
(A066983 * 0^n-k) = an infinite lower triangular matrix with A066983 as the
main diagonal: (1, 1, 1, 3, 3, 7, 9, 17, 25,...) and the rest zeros.

A271729 Numbers n such that 2*Fibonacci(n+2)+((-1)^n-3)/2 is a prime.

Original entry on oeis.org

1, 2, 6, 8, 14, 16, 32, 40, 66, 88, 112, 120, 146, 158, 318, 514, 630, 638, 680, 710, 1054, 1630, 2198, 2466, 2696, 2994, 3138, 3654, 3958, 5558, 7008, 11416, 11632, 13510, 19752, 24480
Offset: 1

Views

Author

Vincenzo Librandi, Apr 13 2016

Keywords

Comments

These numbers are the positions of prime numbers in A066629.

Crossrefs

Cf. A066629.

Programs

  • Magma
    [n: n in [0..2000] | IsPrime(2*Fibonacci(n+2)+((-1)^n-3) div 2)];
    
  • Maple
    with(combinat): A271729:=n->`if`(isprime(2*fibonacci(n+2)+((-1)^n-3)/2), n, NULL): seq(A271729(n), n=1..3*10^3); # Wesley Ivan Hurt, Apr 13 2016
  • Mathematica
    Select[Range[10000], PrimeQ[(2 Fibonacci[# + 2] + ((-1)^# - 3) / 2)] &]
  • PARI
    lista(nn) = for(n=1, nn, if(ispseudoprime(2*fibonacci(n+2)+((-1)^n-3)/2), print1(n, ", "))); \\ Altug Alkan, Apr 13 2016
Showing 1-6 of 6 results.