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.

A114697 Expansion of (1+x+x^2)/((1-x^2)*(1-2*x-x^2)); a Pellian-related sequence.

Original entry on oeis.org

1, 3, 9, 22, 55, 133, 323, 780, 1885, 4551, 10989, 26530, 64051, 154633, 373319, 901272, 2175865, 5253003, 12681873, 30616750, 73915375, 178447501, 430810379, 1040068260, 2510946901, 6061962063, 14634871029, 35331704122, 85298279275, 205928262673
Offset: 0

Views

Author

Creighton Dement, Feb 18 2006

Keywords

Comments

Generating floretion: (- .5'j + .5'k - .5j' + .5k' + 'ii' - .5'ij' - .5'ik' - .5'ji' - .5'ki')*('i + 'j + i').

Crossrefs

Programs

  • Mathematica
    Table[(3*LucasL[n, 2] +10*Fibonacci[n, 2] -3 +(-1)^n)/4, {n,0,30}] (* G. C. Greubel, May 24 2021 *)
  • PARI
    Vec((1+x+x^2)/((1-x^2)*(1-2*x-x^2)) + O(x^40)) \\ Colin Barker, Jun 24 2015
    
  • Sage
    [(4*lucas_number1(n+2,2,-1) -2*lucas_number1(n+1,2,-1) -3 +(-1)^n)/4 for n in (0..30)] # G. C. Greubel, May 24 2021

Formula

a(n+2) - 2*a(n+1) + a(n) = A111955(n+2).
G.f.: (1+x+x^2)/((1-x)*(1+x)*(1-2*x-x^2)).
From Raphie Frank, Oct 01 2012: (Start)
a(2*n) = A216134(2*n+1).
a(2*n+1) = A006452(2*n+3)-1.
Lim_{n->infinity} a(n+1)/a(n) = A014176. (End)
a(n) = (2*A078343(n+2) - A010694(n))/4. - R. J. Mathar, Oct 02 2012
From Colin Barker, May 26 2016: (Start)
a(n) = ( 2*(-3 +(-1)^n) + (6-5*sqrt(2))*(1-sqrt(2))^n + (1+sqrt(2))^n*(6+5*sqrt(2)) )/8.
a(n) = 2*a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) for n>3. (End)
a(n) = (3*A002203(n) + 10*A000129(n) - 3 + (-1)^n)/4. - G. C. Greubel, May 24 2021

A115008 a(n) = a(n-1) + a(n-3) + a(n-4).

Original entry on oeis.org

1, 0, 2, 4, 5, 7, 13, 22, 34, 54, 89, 145, 233, 376, 610, 988, 1597, 2583, 4181, 6766, 10946, 17710, 28657, 46369, 75025, 121392, 196418, 317812, 514229, 832039, 1346269, 2178310, 3524578, 5702886, 9227465, 14930353, 24157817, 39088168
Offset: 0

Views

Author

Creighton Dement, Feb 23 2006

Keywords

Comments

a(n+2) - a(n+1) - a(n) gives match to A000034, apart from signs.

Crossrefs

Programs

  • Magma
    A115008:= func< n | Fibonacci(n+1) - (n mod 2) + 2*0^((n+1) mod 4) >;
    [A115008(n): n in [0..50]]; // G. C. Greubel, Aug 24 2025
    
  • Mathematica
    Table[Fibonacci[n+1] -I^(n-1)*Mod[n,2], {n,0,50}] (* G. C. Greubel, Aug 24 2025 *)
  • SageMath
    def A115008(n): return fibonacci(n+1) -i**(n-1)*(n%2)
    print([A115008(n) for n in range(51)]) # G. C. Greubel, Aug 24 2025

Formula

a(2*n) = A000045(2*n+1) = A001519(n).
G.f.: (1-x+2*x^2+x^3)/((1+x^2)*(1-x-x^2)).
a(2*n+1) = (-1)^(n+1) + A001906(n+1) (compare with a similar property for A116697) - Creighton Dement, Mar 31 2006
From G. C. Greubel, Aug 24 2025: (Start)
a(n) = A000045(n+1) - i^(n-1)*(n mod 2).
E.g.f.: exp(x/2)*(cosh(p*x) + (1/(2*p))*sinh(p*x)) - sin(x), where 2*p = sqrt(5). (End)

A116697 a(n) = -a(n-1) - a(n-3) + a(n-4).

Original entry on oeis.org

1, 1, -2, 2, -2, 5, -9, 13, -20, 34, -56, 89, -143, 233, -378, 610, -986, 1597, -2585, 4181, -6764, 10946, -17712, 28657, -46367, 75025, -121394, 196418, -317810, 514229, -832041, 1346269, -2178308, 3524578, -5702888
Offset: 0

Views

Author

Creighton Dement, Feb 23 2006

Keywords

Crossrefs

Cf. A186679 (first differences).

Programs

  • Haskell
    a116697 n = a116697_list !! n
    a116697_list = [1,1,-2,2]
                   ++ (zipWith (-) a116697_list
                                   $ zipWith (+) (tail a116697_list)
                                                 (drop 3 a116697_list))
    a128535_list = 0 : (map negate $ map a116697 [0,2..])
    a001519_list = 1 : map a116697 [1,3..]
    a186679_list = zipWith (-) (tail a116697_list) a116697_list
    a128533_list = map a186679 [0,2..]
    a081714_list = 0 : (map negate $ map a186679 [1,3..])
    a075193_list = 1 : -3 : (zipWith (+) a186679_list $ drop 2 a186679_list)
    -- Reinhard Zumkeller, Feb 25 2011
    
  • Magma
    A116697:= func< n | (-1)^Floor((n+1)/2)*(1+(-1)^n)/2 -(-1)^n*Fibonacci(n) >;
    [A116697(n): n in [0..50]]; // G. C. Greubel, Jun 08 2025
    
  • Mathematica
    LinearRecurrence[{-1,0,-1,1},{1,1,-2,2},40] (* Harvey P. Dale, Nov 04 2011 *)
  • SageMath
    def A116697(n): return (-1)^(n//2)*((n+1)%2) - (-1)^n*fibonacci(n)
    print([A116697(n) for n in range(51)]) # G. C. Greubel, Jun 08 2025

Formula

G.f.: (1 + 2*x - x^2 + x^3)/((1 + x^2)*(1 + x - x^2)).
a(2*n+1) = A000045(2*n+1) = A001519(n).
a(2*n) = - A128535(n+1). - Reinhard Zumkeller, Feb 25 2011
a(n) = A056594(n) - (-1)^n*A000045(n). - Bruno Berselli, Feb 26 2011
E.g.f.: cos(x) + (2/sqrt(5))*exp(-x/2)*sinh(sqrt(5)*x/2). - G. C. Greubel, Jun 08 2025

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

Original entry on oeis.org

1, 0, 2, 5, 5, 4, 13, 29, 34, 39, 89, 176, 233, 313, 610, 1115, 1597, 2328, 4181, 7277, 10946, 16687, 28657, 48416, 75025, 117297, 196418, 326003, 514229, 815656, 1346269, 2211077, 3524578, 5637351, 9227465
Offset: 0

Views

Author

Creighton Dement, Feb 23 2006

Keywords

Crossrefs

Programs

  • Magma
    A116698:= func< n | Fibonacci(n+1) -((n mod 2) -2*0^((n+1) mod 4))*2^Floor(n/2) >;
    [A116898(n): n in [0..50]]; // G. C. Greubel, Aug 24 2025
    
  • Mathematica
    CoefficientList[Series[(1-x+3x^2+x^3)/((1-x-x^2)(1+2x^2)),{x,0,100}],x] (* or *) LinearRecurrence[{1,-1,2,2},{1,0,2,5},100] (* Harvey P. Dale, May 14 2022 *)
    Table[Fibonacci[n+1] -I^(n-1)*Mod[n,2]*2^Floor[n/2], {n,0,50}] (* G. C. Greubel, Aug 24 2025 *)
  • PARI
    Vec((1-x +3*x^2 +x^3)/((1-x-x^2)*(1+2*x^2)) + O(x^40)) \\ Colin Barker, May 18 2019
    
  • SageMath
    def A116898(n): return fibonacci(n+1) - (-1)**((n-1)//2)*(n%2)*2**(n//2)
    print([A116898(n) for n in range(51)]) # G. C. Greubel, Aug 24 2025

Formula

a(2*n) = A000045(2*n+1) = A001519(n).
a(n) = a(n-1) - a(n-2) + 2*a(n-3) + 2*a(n-4) for n > 3. - Colin Barker, May 18 2019
From G. C. Greubel, Aug 24 2025: (Start)
a(n) = A000045(n+1) - (-1)^floor((n-1)/2) * (n mod 2) * 2^floor(n/2).
E.g.f.: exp(x/2)*(cosh(sqrt(5)*x/2) + (1/sqrt(5))*sinh(sqrt(5)*x/2)) - sin(sqrt(2)*x)/sqrt(2). (End)

A248126 a(n) = n^2 with each digit repeated.

Original entry on oeis.org

11, 44, 99, 1166, 2255, 3366, 4499, 6644, 8811, 110000, 112211, 114444, 116699, 119966, 222255, 225566, 228899, 332244, 336611, 440000, 444411, 448844, 552299, 557766, 662255, 667766, 772299, 778844, 884411, 990000, 996611, 11002244, 11008899, 11115566
Offset: 1

Views

Author

Jon Perry, Nov 01 2014

Keywords

Comments

Inspired by A116699.

Examples

			13^2 = 169, so a(13) = 116699.
		

Crossrefs

Programs

  • JavaScript
    for (i=1;i<40;i++) {
    s=(i*i).toString();
    for (j=0;j
    				
  • Mathematica
    a248126[n_Integer] :=
    Module[{m}, m := IntegerDigits[n^2];
      FromDigits[Flatten[Transpose[List[m, m]]]]]; a248126 /@ Range[34] (* Michael De Vlieger, Nov 06 2014 *)
    Table[FromDigits[Riffle[id=IntegerDigits[n^2],id]],{n,40}] (* Harvey P. Dale, Dec 19 2015 *)
  • PARI
    a(n)= my(d = 11*digits(n^2)); fromdigits(d, 100) \\ David A. Corneth, Dec 02 2023
    
  • Python
    def a(n): return int("".join(d*2 for d in str(n**2)))
    print([a(n) for n in range(1, 35)]) # Michael S. Branicky, Dec 02 2023

A179257 Number of permutations of length n which avoid the patterns 321 and 1324.

Original entry on oeis.org

1, 1, 2, 5, 13, 32, 72, 148, 281, 499, 838, 1343, 2069, 3082, 4460, 6294, 8689, 11765, 15658, 20521, 26525, 33860, 42736, 53384, 66057, 81031, 98606, 119107, 142885, 170318, 201812, 237802, 278753, 325161, 377554, 436493, 502573, 576424, 658712, 750140, 851449
Offset: 0

Views

Author

Vincent Vatter, Jul 05 2010

Keywords

Examples

			There are 13 permutations of length 4 which avoid these two patterns, so a(4)=13.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{6,-15,20,-15,6,-1},{1,1,2,5,13,32},50] (* Harvey P. Dale, May 19 2024 *)

Formula

a(n) = 1+binomial(n,2)+binomial(n+2,5).
G.f.: 1-x*(x^5-4*x^4+7*x^3-8*x^2+4*x-1)/(x-1)^6. - Colin Barker, Aug 02 2012
a(n) = 1+A027658(n-2). - R. J. Mathar, Aug 19 2022

Extensions

a(0)=1 prepended by Alois P. Heinz, Jul 05 2018
Showing 1-6 of 6 results.