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.

A291219 p-INVERT of (0,1,0,1,0,1,...), where p(S) = 1 - S - S^3.

Original entry on oeis.org

1, 1, 3, 5, 11, 21, 42, 83, 163, 323, 635, 1255, 2473, 4880, 9625, 18985, 37451, 73869, 145715, 287421, 566954, 1118331, 2205947, 4351307, 8583091, 16930447, 33395857, 65874464, 129939569, 256310161, 505580371, 997274197, 1967156763, 3880282533, 7653987242
Offset: 0

Views

Author

Clark Kimberling, Aug 24 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
In the following guide to p-INVERT sequences using s = (1,0,1,0,1,...) = A000035, in some cases t(1,0,1,0,1,...) is a shifted version of the indicated sequence.
p(S) t(1,0,1,0,1,...)
1 - S A000045 (Fibonacci numbers)
1 - S^2 A147600
1 - S^3 A291217
1 - S^5 A291218
1 - S - S^2 A289846
1 - S - S^3 A291219
1 - S - S^4 A291220
1 - S^3- S^6 A291221
1 - S^2- S^3 A291222
1 - S^3- S^4 A291223
1 - 2S A052542
1 - 3S A006190
(1 - S)^2 A239342
(1 - S)^3 A276129
(1 - S)^4 A291224
(1 - S)^5 A291225
(1 - S)^6 A291226
1 - S - 2 S^2 A291227
1 - 2 S - 2 S^2 A291228
1 - 3 S - 2 S^2 A060801
(1 - S)(1 - 2 S) A291229
(1 - S)(1 - 2 S)(1 - 3 S) A291230
(1 - S)(1 - 2 S)(1 - 3 S)( 1 - 4 S) A291231
(1 - 2 S)^2 A291264
(1 - 3 S)^2 A291232
1 - S - S^2 - S^3 A291233
1 - S - S^2 - S^3 - S^4 A291234
1 - S - S^2 - S^3 - S^4 - S^5 A291235
(1 - S)(1 - 3 S) A291236
(1 - S)(1 - 2S)( 1 - 4S) A291237
(1 - S)^2 (1 - 2S) A291238
(1 - S^2) (1 - 2S) A291239
(1 - S^3)^2 A291240
1 - S - S^2 + S^3 A291241
1 - 2 S - S^2 + S^3 A291242
1 - 3 S + S^2 A291243
1 - 4 S + S^2 A291244
1 - 5 S + S^2 A291245
1 - 6 S + S^2 A291246
1 - S - S^2 - S^3 + S^4 A291247
1 - S - S^2 - S^3 - S^4 + S^5 A291248
1 - S - S^2 - S^3 + S^4 + S^5 A291249
1 - S - 2 S^2 + 2 S^3 A291250
1 - 3 S^2 + 2 S^3 A291251 (includes negative terms)
(1 - S^3)^3 A291252
(1 - S - S^2)^2 A291253
(1 - 2 S - S^2)^2 A291254
(1 - S - 2 S^2)^2 A291255

Crossrefs

Programs

  • Magma
    I:=[1,1,3,5,11,21]; [n le 6 select I[n] else Self(n-1)+3*Self(n-2)-Self(n-3)-3*Self(n-4)+Self(n-5)+Self(n-6): n in [1..45]]; // Vincenzo Librandi, Aug 25 2017
  • Mathematica
    z = 60; s = x/(1 - x^2); p = 1 - s - s^3;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000035 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A291219 *)
    LinearRecurrence[{1, 3, -1, -3, 1, 1}, {1, 1, 3, 5, 11, 21}, 50] (* Vincenzo Librandi, Aug 25 2017 *)

Formula

G.f.: -(1 - x^2 + x^4)/(-1 + x + 3*x^2 - x^3 - 3*x^4 + x^5 + x^6).
a(n) = a(n-1) + 3*a(n-2) - a(n-3) - 3*a(n-4) + a(n-5) + a(n-6) for n >= 7.

A163355 Permutation of integers for constructing Hilbert curve in N x N grid.

Original entry on oeis.org

0, 1, 3, 2, 14, 15, 13, 12, 4, 7, 5, 6, 8, 11, 9, 10, 16, 19, 17, 18, 20, 21, 23, 22, 30, 29, 31, 28, 24, 25, 27, 26, 58, 57, 59, 56, 54, 53, 55, 52, 60, 61, 63, 62, 50, 51, 49, 48, 32, 35, 33, 34, 36, 37, 39, 38, 46, 45, 47, 44, 40, 41, 43, 42, 234, 235, 233, 232, 236, 239
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Inverse: A163356. A163357 & A163359 give two variants of Hilbert curve in N x N grid. Cf. also A163332.
Second and third "powers": A163905, A163915.
In range [A000302(n-1)..A024036(n)] of this permutation, the number of cycles is given by A163910, number of fixed points seems to be given by A147600(n-1) (fixed points themselves: A163901). Max. cycle sizes is given by A163911 and LCM's of all cycle sizes by A163912.

Programs

  • Maple
    A057300 := proc(n)
        option remember;
        `if`(n=0, 0, procname(iquo(n, 4, 'r'))*4+[0, 2, 1, 3][r+1])
    end proc:
    A163355 := proc(n)
        option remember ;
        local d,base4,i,r ;
        if n <= 1 then
            return n ;
        end if;
        base4 := convert(n,base,4) ;
        d := op(-1,base4) ;
        i := nops(base4)-1 ;
        r := n-d*4^i ;
        if ( d=1 and type(i,even) ) or ( d=2 and type(i,odd)) then
            4^i+procname(A057300(r)) ;
        elif d= 3 then
            2*4^i+procname(A057300(r)) ;
        else
            3*4^i+procname(4^i-1-r) ;
        end if;
    end proc:
    seq(A163355(n),n=0..100) ; # R. J. Mathar, Nov 22 2023
  • PARI
    A057300(n) = { my(t=1, s=0); while(n>0,  if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); };
    A163355(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); if(((1==d)&&!(i%2))||((2==d)&&(i%2)), f+A163355(A057300(r)), if(3==d,f+f+A163355(A057300(r)), (3*f)+A163355(f-1-r)))); \\ Antti Karttunen, Apr 14 2018

Formula

a(0) = 0, and given d=1, 2 or 3, then a((d*(4^i))+r)
= (4^i) + a(A057300(r)), if d=1 and i is even, or if d=2 and i is odd
= 2*(4^i) + a(A057300(r)), if d=3,
= 3*(4^i) + a((4^i)-1-r) in other cases.
From Alan Michael Gómez Calderón, May 06 2025: (Start)
a(3*A000695(n)) = 2*A000695(n);
a(3*(A000695(n) + 2^A000695(2*m))) = 2*(A000695(n) + 2^A000695(2*m)) for m >= 2;
a((2 + 16^n)*2^(-1 + 4*m)) = 4^(2*(n + m) - 1) + (11*16^m - 2)/3. (End)

Extensions

Links to further derived sequences added by Antti Karttunen, Sep 21 2009

A005013 a(n) = 3*a(n-2) - a(n-4), a(0)=0, a(1)=1, a(2)=1, a(3)=4. Alternates Fibonacci (A000045) and Lucas (A000032) sequences for even and odd n.

Original entry on oeis.org

0, 1, 1, 4, 3, 11, 8, 29, 21, 76, 55, 199, 144, 521, 377, 1364, 987, 3571, 2584, 9349, 6765, 24476, 17711, 64079, 46368, 167761, 121393, 439204, 317811, 1149851, 832040, 3010349, 2178309, 7881196, 5702887, 20633239, 14930352, 54018521, 39088169, 141422324
Offset: 0

Views

Author

Keywords

Comments

S(n,sqrt(5)), with the Chebyshev polynomials A049310, is an integer sequence in the real quadratic number field Q(sqrt(5)) with basis numbers <1,phi>, phi:=(1+sqrt(5))/2. S(n,sqrt(5)) = A(n) + 2*B(n)*phi, with A(n)= a(n+1)*(-1)^n and B(n)= A147600(n-1), n>=0, with A147600(-1):=0.
a(n) = p(n+1) where p(x) is the unique degree-(n-1) polynomial such that p(k) = Fibonacci(k) for k = 1, ..., n. - Michael Somos, Jan 08 2012
Row sums of A227431. - Richard R. Forberg, Jul 29 2013
This is the sequence of Lehmer numbers u_n(sqrt(R),Q) with the parameters R = 5 and Q = 1. It is a strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence satisfies a linear recurrence of order four. - Peter Bala, Apr 18 2014
The sequence of convergents of the 2-periodic continued fraction [0; 1, -5, 1, -5, ...] = 1/(1 - 1/(5 - 1/(1 - 1/(5 - ...)))) = (1/2)*(5 - sqrt(5)) begins [0/1, 1/1, 5/4, 4/3, 15/11, 11/8, 40/29, ...]; the denominators give the present sequence. The sequence of numerators [0, 1, 5, 4, 15, 11, 40, ...] is A203976. Cf. A108412 and A026741. - Peter Bala, May 19 2014
Define a binary operation o on the real numbers by x o y = x*sqrt(1 + y^2) + y*sqrt(1 + x^2). The operation o is commutative and associative with identity 0. We have (1/2)*a(2*n + 1) = 1/2 o 1/2 o ... o 1/2 (2*n + 1 terms) and (1/2)*sqrt(5)* a(2*n) = 1/2 o 1/2 o ... o 1/2 (2*n terms). Cf. A084068 and A049629. - Peter Bala, Mar 23 2018

Examples

			G.f. = x + x^2 + 4*x^3 + 3*x^4 + 11*x^5 + 8*x^6 + 29*x^7 + 21*x^8 + 76*x^9 + ...
a(3) = 4 since p(x) = (x^2 - 3*x + 4) / 2 interpolates p(1) = 1, p(2) = 1, p(3) = 2, and p(4) = 4. - _Michael Somos_, Jan 08 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • GAP
    a:=[0,1,1,4];; for n in [5..40] do a[n]:=3*a[n-2]-a[n-4]; od; a; # Muniru A Asiru, Oct 21 2018
  • Haskell
    a005013 n = a005013_list !! n
    a005013_list = alt a000045_list a000032_list where
       alt (f::fs) (:l:ls) = f : l : alt fs ls
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    I:=[0,1,1,4]; [n le 4 select I[n]  else 3*Self(n-2) - Self(n-4): n in [1..40]]; // Vincenzo Librandi, Feb 09 2016
    
  • Maple
    with(combinat): A005013 := n-> if n mod 2 = 0 then fibonacci(n) else fibonacci(n+1)+fibonacci(n-1); fi;
    A005013:=z*(z**2+z+1)/((z**2+z-1)*(z**2-z-1)); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    CoefficientList[Series[(x + x^2 + x^3)/(1 - 3x^2 + x^4), {x, 0, 40}], x]
    f[n_] = Product[(1 + 4*Sin[k*Pi/n]^2), {k, 1, Floor[(n - 1)/2]}]; a = Table[f[n], {n, 0, 30}]; Round[a]; FullSimplify[ExpandAll[a]] (* Roger L. Bagula and Gary W. Adamson, Nov 26 2008 *)
    LinearRecurrence[{0, 3, 0, -1}, {0, 1, 1, 4}, 100] (* G. C. Greubel, Feb 08 2016 *)
  • PARI
    {a(n) = if( n%2, fibonacci(n+1) + fibonacci(n-1), fibonacci(n))}; /* Michael Somos, Jan 08 2012 */
    
  • PARI
    {a(n) = if( n<0, -a(-n), subst( polinterpolate( vector( n, k, fibonacci(k))), x, n+1))}; /* Michael Somos, Jan 08 2012 */
    

Formula

a(1) = a(2) = 1, a(3) = 4, a(n) = (a(n-1) * a(n-2) - 1) / a(n-3), unless n=3. a(-n) = -a(n).
a(2n) = A001906(n), a(2n+1) = A002878(n). a(n)=F(n+1)+(-1)^(n+1)F(n-1). - Mario Catalani (mario.catalani(AT)unito.it), Sep 20 2002
G.f.: x*(1+x+x^2)/((1-x-x^2)*(1+x-x^2)).
a(n) = Product_{k=1..floor((n-1)/2)} (1 + 4*sin(k*Pi/n)^2). - Roger L. Bagula and Gary W. Adamson, Nov 26 2008
Binomial transform is A096140. - Michael Somos, Apr 13 2012
From Peter Bala, Apr 18 2014: (Start)
a(n) = (alpha^n - beta^n)/(alpha - beta) for n odd, and a(n) = (alpha^n - beta^n)/(alpha^2 - beta^2) for n even, where alpha = (1/2)*(sqrt(5) + 1) and beta = (1/2)*(sqrt(5) - 1). Equivalently, a(n) = U(n-1, sqrt(5)/2) for n odd and a(n) = (1/sqrt(5))*U(n-1, sqrt(5)/2) for n even, where U(n,x) is the Chebyshev polynomial of the second kind. (End)
E.g.f.: (Phi/sqrt(5))*exp(-Phi*x)*(exp(x)-1)*(exp(sqrt(5)*x) - 1/(Phi)^2), where Phi = (1+sqrt(5))/2. - G. C. Greubel, Feb 08 2016
a(n) = (5^floor((n-1)/2)/2^(n-1))*Sum_{k=0..n-1} binomial(n-1,k)/5^floor(k/2). - Tony Foster III, Oct 21 2018
a(n) = hypergeom([(1 - n)/2, (n + 1) mod 2 - n/2], [1 - n], -4) for n >= 2. - Peter Luschny, Sep 03 2019

Extensions

Additional comments from Michael Somos, Jun 01 2000

A163356 Inverse permutation to A163355, related to Hilbert's curve in N x N grid.

Original entry on oeis.org

0, 1, 3, 2, 8, 10, 11, 9, 12, 14, 15, 13, 7, 6, 4, 5, 16, 18, 19, 17, 20, 21, 23, 22, 28, 29, 31, 30, 27, 25, 24, 26, 48, 50, 51, 49, 52, 53, 55, 54, 60, 61, 63, 62, 59, 57, 56, 58, 47, 46, 44, 45, 39, 37, 36, 38, 35, 33, 32, 34, 40, 41, 43, 42, 128, 130, 131, 129, 132, 133
Offset: 0

Views

Author

Antti Karttunen, Jul 29 2009

Keywords

Crossrefs

Inverse: A163355.
Second and third "powers": A163906, A163916. See also A059252-A059253.
In range [A000302(n-1)..A024036(n)] of this permutation, the number of cycles is given by A163910, number of fixed points seems to be given by A147600(n-1) (fixed points themselves: A163901). Max. cycle sizes is given by A163911 and LCM's of all cycle sizes by A163912.
Cf. also A302844, A302846, A302781.

Programs

  • PARI
    A057300(n) = { my(t=1,s=0); while(n>0, if(1==(n%4),n++,if(2==(n%4),n--)); s += (n%4)*t; n >>= 2; t <<= 2); (s); };
    A163356(n) = if(!n,n,my(i = (#binary(n)-1)\2, f = 4^i, d = (n\f)%4, r = (n%f)); (((((2+(i%2))^d)%5)-1)*f) + if(3==d,f-1-A163356(r),A057300(A163356(r)))); \\ Antti Karttunen, Apr 14 2018

Formula

a(0) = 0, and provided that d=1, 2 or 3, then a((d*(4^i))+r) = (((2+(i mod 2))^d mod 5)-1) * [either A024036(i) - a(r), if d is 3, and A057300(a(r)) in other cases].
From Antti Karttunen, Apr 14 2018: (Start)
A059905(a(n)) = A059253(n).
A059906(a(n)) = A059252(n).
a(n) = A000695(A059253(n)) + 2*A000695(A059252(n)).
(End)

Extensions

Links to further derived sequences and a nicer Scheme function & formula added by Antti Karttunen, Sep 21 2009

A165404 The positions of zeros in the top row of A163898 (and A163899).

Original entry on oeis.org

0, 1, 4, 6, 7, 16, 18, 19, 24, 25, 28, 30, 31, 64, 66, 67, 72, 73, 76, 78, 79, 96, 97, 100, 102, 103, 112, 114, 115, 120, 121, 124, 126, 127, 256, 258, 259, 264, 265, 268, 270, 271, 288, 289, 292, 294, 295, 304, 306, 307, 312, 313, 316, 318, 319, 384, 385, 388
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Comments

Equivalently, the positions of ones in the top row of A163904.

Crossrefs

a(n) = A025581(A165403(n)). Same sequence in binary: A165406. For n>0, A147600(n-1) seems to give the number of terms with binary width n. See also A163901.

A165406 Sequence A165404 shown in binary, or equivalently, sequence A163901 in quaternary base.

Original entry on oeis.org

0, 1, 100, 110, 111, 10000, 10010, 10011, 11000, 11001, 11100, 11110, 11111, 1000000, 1000010, 1000011, 1001000, 1001001, 1001100, 1001110, 1001111, 1100000, 1100001, 1100100, 1100110, 1100111, 1110000, 1110010, 1110011
Offset: 0

Views

Author

Antti Karttunen, Sep 19 2009

Keywords

Crossrefs

a(n) = A007088(A165404(n)) = A007090(A163901(n)). For n>0, A147600(n-1) seems to give the number of terms with n binary digits.

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

Original entry on oeis.org

1, 2, 3, 6, 8, 16, 21, 42, 55, 110, 144, 288, 377, 754, 987, 1974, 2584, 5168, 6765, 13530, 17711, 35422, 46368, 92736, 121393, 242786, 317811, 635622, 832040, 1664080, 2178309, 4356618, 5702887, 11405774, 14930352, 29860704, 39088169, 78176338, 102334155
Offset: 1

Views

Author

Gary W. Adamson, Sep 18 2007

Keywords

Comments

For n>1 A133585(n) + a(n) = A000032(n+1).

Examples

			a(5) = F(6) = 8.
a(6) = 2*a(5) = 2*8 = 16.
		

Crossrefs

Cf. A001906 (bisection), A025169 (bisection), A000032, A133586.

Programs

  • Maple
    A133586aux := proc(n,k)
        add(A133080(n,j)*A133566(j,k),j=k..n) ;
    end proc:
    A000045 := proc(n)
        combinat[fibonacci](n) ;
    end proc:
    A133586 := proc(n)
        add(A133586aux(n,j)*A000045(j),j=0..n) ;
    end proc: # R. J. Mathar, Jun 20 2015
  • Mathematica
    CoefficientList[Series[(1 + 2 x)/((x^2 - x - 1) (x^2 + x - 1)), {x, 0, 50}], x] (* Vincenzo Librandi, Jun 21 2015 *)
    LinearRecurrence[{0,3,0,-1},{1,2,3,6},40] (* Harvey P. Dale, Dec 10 2017 *)
  • PARI
    {a(n) = if( n%2, fibonacci(n+1), 2*fibonacci(n))}; /* Michael Somos, Jun 20 2015 */
    
  • PARI
    Vec(x*(1+2*x)/((x^2-x-1)*(x^2+x-1)) + O(x^50)) \\ Colin Barker, Mar 28 2016

Formula

Equals A133080 * A133566 * A000045, where A133080 and A133566 are infinite lower triangular matrices and the Fibonacci sequence as a vector (previous definition).
For odd-indexed terms, a(n) = F(n+1). For even-indexed terms, a(n) = 2*a(n-1).
For n>1 A133585(n) + a(n) = A000032(n+1).
a(n) = A147600(n) + 2*A147600(n-1). - R. J. Mathar, Jun 20 2015
a(n) = (2^(-2-n)*((1-sqrt(5))^n*(-5+sqrt(5)) - (-1-sqrt(5))^n*(-3+sqrt(5)) - (-1+sqrt(5))^n*(3+sqrt(5)) + (1+sqrt(5))^n*(5+sqrt(5))))/sqrt(5). - Colin Barker, Mar 28 2016

Extensions

New definition and A-number in previous definition corrected by R. J. Mathar, Jun 20 2015
Showing 1-7 of 7 results.