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

A141532 Inverse binomial transform of A141425.

Original entry on oeis.org

1, 1, 1, -2, 4, -8, 7, 22, -125, 376, -878, 1756, -3143, 5188, -8189, 13102, -22928, 45856, -101549, 232618, -524285, 1137148, -2362874, 4725748, -9185771, 17574376, -33554429, 64717378, -127043276, 254086552, -515347553, 1052218462, -2147483645
Offset: 0

Views

Author

Paul Curtz, Aug 12 2008

Keywords

Comments

This is the inverse binomial transform of A141425 if interpreted with offset 0.

Crossrefs

Programs

  • Magma
    I:=[1,1,-2,4,-8]; [1] cat [n le 5 select I[n] else -6*Self(n-1) -15*Self(n-2) -20*Self(n-3) -15*Self(n-4) -6*Self(n-5): n in [1..40]]; // G. C. Greubel, Mar 30 2021
    
  • Mathematica
    LinearRecurrence[{-6,-15,-20,-15,-6}, {1,1,1,-2,4,-8}, 40] (* G. C. Greubel, Mar 30 2021 *)
  • Sage
    def A141532_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1 +7*x +22*x^2 +39*x^3 +42*x^4 +27*x^5)/((1+x+x^2)*(1+3*x+3*x^2)*(1+2*x)) ).list()
    A141532_list(40) # G. C. Greubel, Mar 30 2021

Formula

G.f.: (1 +7*x +22*x^2 +39*x^3 +42*x^4 +27*x^5)/((1+x+x^2)*(1+3*x+3*x^2)*(1+2*x)). - R. J. Mathar, Nov 11 2008
From G. C. Greubel, Mar 30 2021: (Start)
a(n) = (9/2)*[n=0] + (-2)^(n-1) - (3/2)*( ChebyshevU(n, -1/2) + 2*ChebyshevU(n-1, -1/2) + 3^((n-1)/2)*(sqrt(3)*ChebyshevU(n, -sqrt(3)/2) + 2*ChebyshevU(n-1, -sqrt(3)/2)) ).
a(n) = (9/2)*[n=0] + (-2)^(n-1) - (3/2)*(A049347(n) + 2*A049347(n-1) + A000748(n) + 2*A000748(n-1) ). (End)

Extensions

Extended by R. J. Mathar, Nov 11 2008

A141533 The first subdiagonal of the array of A141425 and its higher order differences.

Original entry on oeis.org

1, -1, -2, 23, 28, -7, 22, 251, 376, 149, 658, 3143, 5188, 4913, 13102, 42611, 75376, 101549, 232618, 612863, 1137148, 1831433, 3928582, 9185771, 17574376, 31162949, 64717378, 141392183, 275609908, 515347553, 1052218462, 2212053731, 4359537376, 8396224349
Offset: 1

Views

Author

Paul Curtz, Aug 12 2008

Keywords

Examples

			A141425 and its first, second, third differences etc. in followup rows define an array T(n,m):
..1...2...4...5...7...8...1...2...4...5...
..1...2...1...2...1..-7...1...2...1...2...
..1..-1...1..-1..-8...8...1..-1...1..-1...
.-2...2..-2..-7..16..-7..-2...2..-2..-7...
..4..-4..-5..23.-23...5...4..-4..-5..23...
.-8..-1..28.-46..28..-1..-8..-1..28.-46...
..7..29.-74..74.-29..-7...7..29.-74..74...
.22.-103.148.-103..22..14..22.-103.148.-103...
-125.251.-251.125..-8...8.-125.251.-251.125...
376.-502.376.-133..16.-133.376.-502.376.-133...
Then a(n) = T(n+1,n) .
		

Formula

a(2*n)+a(2*n+1)= 0, 21, 21, 273, 525, 3801,... (multiples of 21).
a(n)= +a(n-1) -a(n-2) +3*a(n-3) +6*a(n-4). G.f.: x*(1-2*x+21*x^3)/((1-2*x) * (1+x) * (3*x^2+1)). [R. J. Mathar, Nov 22 2009]
a(n)= (3*(-1)^n+2^n-A128019(n+1))/2. [R. J. Mathar, Nov 22 2009]

Extensions

Edited and extended by R. J. Mathar, Nov 22 2009

A141516 The main diagonal of the array of A141425 and its higher order differences.

Original entry on oeis.org

1, 2, 1, -7, -23, -1, 7, -103, -251, -133, -149, -1387, -3143, -3001, -4913, -19663, -42611, -55693, -101549, -291667, -612863, -960001, -1831433, -4460023, -9185771, -15980053, -31162949, -69500347, -141392183, -261261001
Offset: 0

Views

Author

Paul Curtz, Aug 11 2008

Keywords

Comments

The sequence A141425 and higher order differences in subsequent rows starts (see A141533):
1, 2, 4, 5, 7, 8, 1, 2, 4, 5, 7, 8, 1, 2, 4,...
1, 2, 1, 2, 1,-7, 1, 2, 1, 2, 1,-7, 1, 2, 1, 2,...
1,-1, 1, -1, -8, 8, 1,-1, 1, -1, -8, 8, 1, -1,..
-2, 2,-2, -7, 16,-7,-2, 2,-2, -7, 16,-7, -2,..
4,-4,-5, 23,-23, 5, 4,-4,-5, 23,-23, 5, 4,..
-8,-1,28,-46, 28,-1,-8,-1,28,-46, 28,-1,..
Reading downwards the main diagonal of this array defines the sequence.

Programs

  • Maple
    A108411 := proc(n) 3^floor(n/2) ; end proc:
    A141516 := proc(n) if n = 0 then 1; else (-3*(-1)^n-2^n+3*(-1)^(floor((n-1)/2))*A108411(n))/2 ; end if; end proc: # R. J. Mathar, Mar 08 2011
  • Mathematica
    LinearRecurrence[{1,-1,3,6},{1,2,1,-7,-23},30] (* Harvey P. Dale, Nov 23 2022 *)

Formula

a(n) = ( -3*(-1)^n -2^n +3*(-1)^(floor((n-1)/2))*A108411(n) )/2, n>0. - R. J. Mathar, Mar 08 2011
a(2n)+a(2n+1)= -A002023(n-1) = -3*A081294(n), n>0.
a(4n)+a(4n+1)+a(4n+2)+a(4n+3) = -120*16^(n-1), n>0.
a(4n+2)+a(4n+3)+a(4n+4)+a(4n+5) = -30*A001025(n).
G.f. x*(-2+x+6*x^2+21*x^3) / ( (2*x-1)*(1+x)*(3*x^2+1) ). - R. J. Mathar, Mar 08 2011

A141493 Ordered different numbers in A141425=b(n) and differences.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 16, 22, 23, 28, 29, 46, 74, 103
Offset: 0

Views

Author

Paul Curtz, Aug 10 2008

Keywords

Comments

First six numbers of a(n) and b(n) are the same.

Crossrefs

Cf. A103118.

A001651 Numbers not divisible by 3.

Original entry on oeis.org

1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40, 41, 43, 44, 46, 47, 49, 50, 52, 53, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 70, 71, 73, 74, 76, 77, 79, 80, 82, 83, 85, 86, 88, 89, 91, 92, 94, 95, 97, 98, 100, 101, 103, 104
Offset: 1

Views

Author

Keywords

Comments

Inverse binomial transform of A084858. - Benoit Cloitre, Jun 12 2003
Earliest monotonic sequence starting with (1,2) and satisfying the condition: "a(n)+a(n-1) is not in the sequence." - Benoit Cloitre, Mar 25 2004. [The numbers of the form a(n)+a(n-1) form precisely the complement with respect to the positive integers. - David W. Wilson, Feb 18 2012]
a(1) = 1; a(n) is least number which is relatively prime to the sum of all the previous terms. - Amarnath Murthy, Jun 18 2001
For n > 3, numbers having 3 as an anti-divisor. - Alexandre Wajnberg, Oct 02 2005
Also numbers n such that (n+1)*(n+2)/6 = A000292(n)/n is an integer. - Ctibor O. Zizka, Oct 15 2010
Notice the property described by Gary Detlefs in A113801: more generally, these numbers are of the form (2*h*n + (h-4)*(-1)^n-h)/4 (h, n natural numbers), therefore ((2*h*n + (h-4)*(-1)^n - h)/4)^2 - 1 == 0 (mod h); in this case, a(n)^2 - 1 == 0 (mod 3). - Bruno Berselli, Nov 17 2010
A001651 mod 9 gives A141425. - Paul Curtz, Dec 31 2010. (Correct for the modified offset 1. - M. F. Hasler, Apr 07 2015)
The set of natural numbers (1, 2, 3, ...), sequence A000027; represents the numbers of ordered compositions of n using terms in the signed set: (1, 2, -4, -5, 7, 8, -10, -11, 13, 14, ...). This follows from (1, 2, 3, ...) being the INVERT transform of A011655, signed and beginning: (1, 1, 0, -1, -1, 0, 1, 1, 0, ...). - Gary W. Adamson, Apr 28 2013
Union of A047239 and A047257. - Wesley Ivan Hurt, Dec 19 2013
Numbers whose sum of digits (and digital root) is != 0 (mod 3). - Joerg Arndt, Aug 29 2014
The number of partitions of 3*(n-1) into at most 2 parts. - Colin Barker, Apr 22 2015
a(n) is the number of partitions of 3*n into two distinct parts. - L. Edson Jeffery, Jan 14 2017
Conjectured (and like even easily proved) to be the graph bandwidth of the complete bipartite graph K_{n,n}. - Eric W. Weisstein, Apr 24 2017
Numbers k such that Fibonacci(k) mod 4 = 1 or 3. Equivalently, sequence lists the indices of the odd Fibonacci numbers (see A014437). - Bruno Berselli, Oct 17 2017
Minimum value of n_3 such that the "rectangular spiral pattern" is the optimal solution for Ripà's n_1 X n_2 x n_3 Dots Problem, for any n_1 = n_2. For example, if n_1 = n_2 = 5, n_3 = floor((3/2)*(n_1 - 1)) + 1 = a(5). - Marco Ripà, Jul 23 2018
For n >= 54, a(n) = sat(n, P_n), the minimum number of edges in a P_n-saturated graph on n vertices, where P_n is the n-vertex path (see Dudek, Katona, and Wojda, 2003; Frick and Singleton, 2005). - Danny Rorabaugh, Nov 07 2017
From Roger Ford, May 09 2021: (Start)
a(n) is the smallest sum of arch lengths for the top arches of a semi-meander with n arches. An arch length is the number of arches covered + 1.
/\ The top arch has a length of 3. /\ The top arch has a length of 3.
/ \ Both bottom arches have a //\\ The middle arch has a length of 2.
//\/\\ length of 1. ///\\\ The bottom arch has a length of 1.
Example: a(6) = 8 /\ /\
//\\ /\ //\\ /\ 2 + 1 + 1 + 2 + 1 + 1 = 8. (End)
This is the lexicographically earliest increasing sequence of positive integers such that no polynomial of degree d can be fitted to d+2 consecutive terms (equivalently, such that no iterated difference is zero). - Pontus von Brömssen, Dec 26 2021

Examples

			G.f.: x + 2*x^2 + 4*x^3 + 5*x^4 + 7*x^5 + 8*x^6 + 10*x^7 + 11*x^8 + 13*x^9 + ...
		

References

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

Crossrefs

Programs

  • GAP
    Filtered([0..110],n->n mod 3<>0); # Muniru A Asiru, Jul 24 2018
    
  • Haskell
    a001651 = (`div` 2) . (subtract 1) . (* 3)
    a001651_list = filter ((/= 0) . (`mod` 3)) [1..]
    -- Reinhard Zumkeller, Jul 07 2012, Aug 23 2011
    
  • Magma
    [3*(2*n-1)/4-(-1)^n/4: n in [1..80]]; // Vincenzo Librandi, Jun 07 2011
    
  • Maple
    A001651 := n -> 3*floor(n/2) - (-1)^n; # Corrected by M. F. Hasler, Apr 07 2015
    A001651:=(1+z+z**2)/(z+1)/(z-1)**2; # Simon Plouffe in his 1992 dissertation
    a[1]:=1:a[2]:=2:for n from 3 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=1..69); # Zerinvary Lajos, Mar 16 2008, offset corrected by M. F. Hasler, Apr 07 2015
  • Mathematica
    Select[Table[n,{n,200}],Mod[#,3]!=0&] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011 *)
    Drop[Range[200 + 1], {1, -1, 3}] - 1 (* József Konczer, May 24 2016 *)
    Floor[(3 Range[70] - 1)/2] (* Eric W. Weisstein, Apr 24 2017 *)
    CoefficientList[Series[(x^2 + x + 1)/((x - 1)^2 (x + 1)), {x, 0, 70}],
      x] (* or *)
    LinearRecurrence[{1, 1, -1}, {1, 2, 4}, 70] (* Robert G. Wilson v, Jul 25 2018 *)
  • PARI
    {a(n) = n + (n-1)\2}; /* Michael Somos, Jan 15 2011 */
    
  • PARI
    x='x+O('x^100); Vec(x*(1+x+x^2)/((1-x)*(1-x^2))) \\ Altug Alkan, Oct 22 2015
    
  • Python
    print([k for k in range(1, 105) if k%3]) # Michael S. Branicky, Sep 06 2021
    
  • Python
    def A001651(n): return (n<<1)-(n>>1)-1 # Chai Wah Wu, Mar 05 2024

Formula

a(n) = 3 + a(n-2) for n > 2.
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3.
a(2*n+1) = 3*n+1, a(2*n) = 3*n-1.
G.f.: x * (1 + x + x^2) / ((1 - x) * (1 - x^2)). - Michael Somos, Jun 08 2000
a(n) = (4-n)*a(n-1) + 2*a(n-2) + (n-3)*a(n-3) (from the Carlitz et al. article).
a(n) = floor((3*n-1)/2). [Corrected by Gary Detlefs]
a(1) = 1, a(n) = 2*a(n-1) - 3*floor(a(n-1)/3). - Benoit Cloitre, Aug 17 2002
a(n+1) = 1 + n - n mod 2 + (n + n mod 2)/2. - Reinhard Zumkeller, Dec 17 2002
a(1) = 1, a(n+1) = a(n) + (a(n) mod 3). - Reinhard Zumkeller, Mar 23 2003
a(1) = 1, a(n) = 3*(n-1) - a(n-1). - Benoit Cloitre, Apr 12 2003
a(n) = 3*(2*n-1)/4 - (-1)^n/4. - Benoit Cloitre, Jun 12 2003
Nearest integer to (Sum_{k>=n} 1/k^3)/(Sum_{k>=n} 1/k^4). - Benoit Cloitre, Jun 12 2003
Partial sums of A040001. a(n) = A032766(n-1)+1. - Paul Barry, Sep 02 2003
a(n) = T(n, 1) = T(n, n-1), where T is the array in A026386. - Emeric Deutsch, Feb 18 2004
a(n) = sqrt(3*A001082(n)+1). - Zak Seidov, Dec 12 2007
a(n) = A077043(n) - A077043(n-1). - Reinhard Zumkeller, Dec 28 2007
a(n) = A001477(n-1) + A008619(n-1). - Yosu Yurramendi, Aug 10 2008
Euler transform of length 3 sequence [2, 1, -1]. - Michael Somos, Sep 06 2008
A011655(a(n)) = 1. - Reinhard Zumkeller, Nov 30 2009
a(n) = n - 1 + ceiling(n/2). - Michael Somos, Jan 15 2011
a(n) = 3*A000217(n)+1 - 2*Sum_{i=1..n-1} a(i), for n>1. - Bruno Berselli, Nov 17 2010
a(n) = 3*floor(n/2) + (-1)^(n+1). - Gary Detlefs, Dec 29 2011
A215879(a(n)) > 0. - Reinhard Zumkeller, Dec 28 2012 [More precisely, A215879 is the characteristic function of A001651. - M. F. Hasler, Apr 07 2015]
a(n) = 2n - 1 - floor(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = (3n - 2 + (n mod 2)) / 2. - Wesley Ivan Hurt, Mar 31 2014
a(n) = A000217(n) - A000982(n-1). - Bui Quang Tuan, Mar 28 2015
1/1^3 - 1/2^3 + 1/4^3 - 1/5^3 + 1/7^3 - 1/8^3 + ... = 4 Pi^3/(3 sqrt(3)). - M. F. Hasler, Mar 29 2015
E.g.f.: (4 + sinh(x) - cosh(x) + 3*(2*x - 1)*exp(x))/4. - Ilya Gutkovskiy, May 24 2016
a(n) = a(n+k-1) + a(n-k) - a(n-1) for n > k >= 0. - Bob Selcoe, Feb 03 2017
a(n) = -a(1-n) for all n in Z. - Michael Somos, Jul 31 2018
a(n) = n + A004526(n-1). - David James Sycamore, Sep 06 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Dec 04 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=1} (1 - (-1)^n/a(n)) = 1.
Product_{n>=2} (1 + (-1)^n/a(n)) = 2*Pi/(3*sqrt(3)) (A248897). (End)

Extensions

This is a list, so the offset should be 1. I corrected this and adjusted some of the comments and formulas. Other lines probably also need to be adjusted. - N. J. A. Sloane, Jan 01 2011
Offset of pre-2011 formulas verified or corrected by M. F. Hasler, Apr 07-18 2015 and by Danny Rorabaugh, Oct 23 2015

A153130 Period 6: repeat [1, 2, 4, 8, 7, 5].

Original entry on oeis.org

1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5
Offset: 0

Views

Author

Paul Curtz, Dec 19 2008

Keywords

Comments

Digital root of 2^n.
A regular version of Pitoun's sequence: a(n) = A029898(n+1).
Also obtained from permutations of A141425, A020806, A070366, A153110, A153990, A154127, A154687, or A154815.
This sequence and its (again period 6) repeated differences produce the table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, -1, -2, -4, 1, 2, 4, -1, -2, ...
1, 2, -5, -1, -2, 5, 1, 2, -5, -1, -2, ...
1, -7, 4, -1, 7, -4, 1, -7, 4, -1, 7, ...
-8, 11, -5, 8,-11, 5, -8, 11, -5, 8,-11, ...
19,-16, 13,-19, 16,-13, 19,-16, 13,-19, 16, ...
-35, 29,-32, 35,-29, 32,-35, 29,-32, 35,-29, ...
64,-61, 67,-64, 61,-67, 64,-61, 67,-64, 61, ...
If each entry of this table is read modulo 9 we obtain the very regular table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
Also the decimal expansion of the constant 125/1001. - R. J. Mathar, Jan 23 2009
Digital root of the powers of any number congruent to 2 mod 9. - Alonso del Arte, Jan 26 2014

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. digital roots of powers of c mod 9: c = 4, A100402; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) + a(n+3) = 9 = A010734(n).
G.f.: (1+x+2x^2+5x^3)/((1-x)(1+x)(1-x+x^2)). - R. J. Mathar, Jan 23 2009
a(n) = A082365(n) mod 9. - Paul Curtz, Mar 31 2009
a(n) = -1/2*cos(Pi*n) - 3*cos(1/3*Pi*n) - 3^(1/2)*sin(1/3*Pi*n) + 9/2. - Leonid Bedratyuk, May 13 2012
a(n) = A010888(A004000(n+1)). - Ivan N. Ianakiev, Nov 27 2014
From Wesley Ivan Hurt, Apr 20 2015: (Start)
a(n) = a(n-6) for n>5.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (2+3*(n-1 mod 3))*(n mod 2) + (1+3*(-n mod 3))*(n-1 mod 2). (End)
a(n) = 2^n mod 9. - Nikita Sadkov, Oct 06 2018
From Stefano Spezia, Mar 20 2025: (Start)
E.g.f.: 4*cosh(x) - exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 5*sinh(x).
a(n) = A007953(2*a(n-1)) = A010888(2*a(n-1)). (End)

Extensions

Edited by R. J. Mathar, Apr 09 2009

A146501 Period 6: repeat [4,8,7,5,1,2].

Original entry on oeis.org

4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2
Offset: 0

Views

Author

Paul Curtz, Oct 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,0,-1,1},{4,8,7,5},102] (* Ray Chandler, Jul 15 2015 *)
    PadRight[{},120,{4,8,7,5,1,2}] (* Harvey P. Dale, Apr 01 2024 *)

Formula

G.f.: (4+4*x-x^2+2*x^3)/((1-x)*(1+x)*(1-x+x^2)). - Jaume Oliver Lafont, Aug 30 2009

Extensions

Extended by Ray Chandler, Jul 15 2015

A153110 Period 6: repeat [1, 5, 7, 2, 4, 8].

Original entry on oeis.org

1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8, 1, 5, 7, 2, 4, 8
Offset: 0

Views

Author

Paul Curtz, Dec 18 2008

Keywords

Comments

Also A141425^5 mod 9. See A020806.

Crossrefs

Programs

Formula

From R. J. Mathar, Mar 08 2011: (Start)
a(n) = - a(n-1) + a(n-3) + a(n-4) for n>3.
G.f.: (2*x+1)^3 / ( (1-x)*(1+x)*(1+x+x^2) ). (End)
a(n) = (9-cos(n*Pi)-4*sqrt(3)*cos((1-4*n)*Pi/6))/2. - Wesley Ivan Hurt, Jun 17 2016

A154127 Period 6: repeat [1, 2, 5, 8, 7, 4].

Original entry on oeis.org

1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2, 5, 8, 7, 4, 1, 2
Offset: 0

Views

Author

Paul Curtz, Jan 05 2009

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Feb 25 2009, Mar 09 2009: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
G.f.: (1+x+3*x^2+4*x^3)/((1-x)*(1+x)*(x^2-x+1)). (End)
a(n) = (27-cos(n*Pi)-20*cos(n*Pi/3)-4*sqrt(3)*sin(n*Pi/3))/6. - Wesley Ivan Hurt, Jun 17 2016

Extensions

Corrected numerator in g.f R. J. Mathar, Mar 09 2009

A166517 a(n) = (3 + 5*(-1)^n + 6*n)/4.

Original entry on oeis.org

2, 1, 5, 4, 8, 7, 11, 10, 14, 13, 17, 16, 20, 19, 23, 22, 26, 25, 29, 28, 32, 31, 35, 34, 38, 37, 41, 40, 44, 43, 47, 46, 50, 49, 53, 52, 56, 55, 59, 58, 62, 61, 65, 64, 68, 67, 71, 70, 74, 73, 77, 76, 80, 79, 83, 82, 86, 85, 89, 88, 92, 91, 95, 94, 98, 97, 101, 100, 104, 103, 107
Offset: 0

Views

Author

Vincenzo Librandi, Oct 16 2009

Keywords

Comments

A sequence defined by a(1)=1, a(n)=k*n-a(n-1), k a constant parameter, has recurrence a(n)= 3*a(n-1) -3*a(n-2) +a(n-3). Its generating function is x*(1+2*(k-1)*x+(1-k)*x^2)/((1+x)*(1-x)^2). The closed form is a(n) = k*n/2+k/4+(-1)^n*(3*k/4-1). This applies with k=3 to this sequence here, and for example to sequences A165033, and A166519-A166525. - R. J. Mathar, Oct 17 2009
From Paul Curtz, Feb 20 2010: (Start)
Also: A001651, terms swapped by pairs.
a(n) mod 9 defines a period-6 sequence which is a permutation of A141425. (End)

Crossrefs

Programs

  • Magma
    [(3 +5*(-1)^n+6*n)/4: n in [0..80]]; // Vincenzo Librandi, Sep 13 2013
  • Mathematica
    CoefficientList[Series[(2 x^2 - x + 2)/((1 + x) (x - 1)^2), {x, 0, 80}], x] (* Harvey P. Dale, Mar 25 2011 *)
    Table[(3 + 5 (-1)^n + 6 n) / 4, {n, 0, 100}] (* Vincenzo Librandi, Sep 13 2013 *)

Formula

a(n) = 3*n - a(n-1).
From Paul Curtz, Feb 20 2010: (Start)
a(n+1)-a(n) = (-1)^(n+1)*A010685(n).
Second differences: |a(n+2)-2*a(n+1)+a(n)| = A010716(n).
a(2*n) + a(2*n+1) = A016945(n) = 6*n+3.
a(2*n) = A016945(n).
a(2*n+1) = A016777(n). (End)
G.f. ( 2-x+2*x^2 ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011
E.g.f.: (1/4)*exp(-x)*(5 + 3*exp(2*x) + 6*x*exp(2*x)). - G. C. Greubel, May 15 2016
Sum_{n>=0} (-1)^(n+1)/a(n) = Pi/(3*sqrt(3)) (A073010). - Amiram Eldar, Feb 24 2023

Extensions

a(0)=2 added by Paul Curtz, Feb 20 2010
Showing 1-10 of 21 results. Next