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.

A015441 Generalized Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, 7, 13, 55, 133, 463, 1261, 4039, 11605, 35839, 105469, 320503, 953317, 2876335, 8596237, 25854247, 77431669, 232557151, 697147165, 2092490071, 6275373061, 18830313487, 56482551853, 169464432775, 508359743893, 1525146340543, 4575304803901, 13726182847159
Offset: 0

Views

Author

Keywords

Comments

a(n) is the coefficient of x^(n-1) in the bivariate Fibonacci polynomials F(n)(x,y) = xF(n-1)(x,y) + yF(n-2)(x,y), F(0)(x,y)=0, F(1)(x,y)=1, when y=6x^2. - Mario Catalani (mario.catalani(AT)unito.it), Dec 06 2002
For n>=1: number of length-(n-1) words with letters {0,1,2,3,4,5,6,7} where no two consecutive letters are nonzero, see fxtbook link below. - Joerg Arndt, Apr 08 2011
Starting with offset 1 and convolved with (1, 3, 3, 3, ...) = A003462: (1, 4, 13, 40, ...). - Gary W. Adamson, May 28 2009
a(n) is identical to its inverse binomial transform signed. Differences: A102901. - Paul Curtz, Feb 23 2010
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n>=2, 7*a(n-2) equals the number of 7-colored compositions of n with all parts >=2, such that no adjacent parts have the same color. - Milan Janjic, Nov 26 2011
Pisano period lengths: 1, 1, 1, 2, 20, 1, 6, 2, 3, 20, 5, 2, 12, 6, 20, 4, 16, 3, 18, 20, ... - R. J. Mathar, Aug 10 2012
A015441 and A015518 are the only integer sequences (from the family of homogeneous linear recurrence relation of order 2 with positive integer coefficients with initial values a(0)=0 and a(1)=1) whose ratio a(n+1)/a(n) converges to 3 as n approaches infinity. - Felix P. Muga II, Mar 14 2014
This is an autosequence of the first kind: the array of successive differences shows a main diagonal of zeros and the inverse binomial transform is identical to the sequence (with alternating signs). - Pointed out by Paul Curtz, Dec 05 2016
First two upper diagonals: A000400(n).
This is a variation on the Starhex honeycomb configuration A332243, see illustration in links. It is an alternating pattern of the 2nd iteration of the centered hexagonal numbers A003215 and centered 12-gonal 'Star' numbers A003154. - John Elias, Oct 06 2021

Examples

			G.f. = x + x^2 + 7*x^3 + 13*x^4 + 55*x^5 + 133*x^6 + 463*x^7 + 1261*x^8 + ...
		

Crossrefs

Programs

  • Magma
    I:=[0,1]; [n le 2 select I[n] else Self(n-1) + 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 24 2018
  • Maple
    A015441:=n->(1/5)*((3^n)-((-2)^n)); seq(A015441(n), n=0..30); # Wesley Ivan Hurt, Mar 14 2014
  • Mathematica
    a[n_]:=(MatrixPower[{{1,4},{1,-2}},n].{{1},{1}})[[2,1]]; Table[Abs[a[n]], {n,-1,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
    LinearRecurrence[{1,6},{0,1},30] (* Harvey P. Dale, Apr 26 2011 *)
    CoefficientList[Series[x/((1 + 2 x) (1 - 3 x)), {x, 0, 29}], x] (* Michael De Vlieger, Dec 05 2016 *)
  • PARI
    {a(n) = (3^n - (-2)^n) / 5};
    
  • Sage
    [lucas_number1(n,1,-6) for n in range(0, 27)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/((1+2*x)*(1-3*x)).
a(n) = a(n-1) + 6*a(n-2).
a(n) = (1/5)*((3^n)-((-2)^n)). - henryk.wicke(AT)stud.uni-hannover.de
E.g.f.: (exp(3*x) - exp(-2*x))/5. - Paul Barry, Apr 20 2003
a(n+1) = Sum_{k=0..ceiling(n/2)} 6^k*binomial(n-k, k). - Benoit Cloitre, Mar 06 2004
a(n) = (A000244(n) - A001045(n+1)(-1)^n - A001045(n)(-1)^n)/5. - Paul Barry, Apr 27 2004
The binomial transform of [1,1,7,13,55,133,463,...] is A122117. - Philippe Deléham, Oct 19 2006
a(n+1) = Sum_{k=0..n} A109466(n,k)*(-6)^(n-k). - Philippe Deléham, Oct 26 2008
a(n) = 3a(n-1) + (-1)^(n+1)*A000079(n-1). - Paul Curtz, Feb 23 2010
G.f.: Q(0) -1, where Q(k) = 1 + 6*x^2 + (k+2)*x - x*(k+1 + 6*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 06 2013
a(n) = (Sum_{1<=k<=n, k odd} binomial(n,k)*5^(k-1))/2^(n-1). - Vladimir Shevelev, Feb 05 2014
a(-n) = -(-1)^n * a(n) / 6^n for all n in Z. - Michael Somos, Mar 18 2014
From Peter Bala, Apr 01 2015: (Start)
Sum_{n >= 0} a(n+1)*x^n = exp( Sum_{n >= 1} A087451(n)*x^n/n ).
For k = 0, 1, 2, ... and for n >= 1, (5^k)*a(n) | a((5^k)*n).
The expansion of exp( Sum_{n >= 1} a(5*n)/(5*a(n))*x^n/n ) has integral coefficients. Cf. A001656. (End)
From Peter Bala, Jun 27 2025: (Start)
Sum_{n >= 1} (-6)^n/(a(n)*a(n+1)) = -2, since (-6)^n/(a(n)*a(n+1)) = (-2)^n/a(n) - (-2)^(n+1)/a(n+1) for n >= 1.
The following are examples of telescoping infinite products:
Product_{n >= 0} (1 + 6^n/a(2*n+2)) = 6, since (1 + 6^(2*n-1)/a(4*n))*(1 + 6^(2*n)/a(4*n+2)) = (6 - 4^(n+1)/b(n)) / (6 - 4^n/b(n-1)), where b(n) = (2*4^n + 3*9^n)/5 = A096951(n). Similarly,
Product_{n >= 1} (1 - 6^n/a(2*n+2)) = 3/13.
Product_{n >= 0} (1 + (-6)^n/a(2*n+2)) = 6/5.
Product_{n >= 1} (1 - (-6)^n/a(2*n+2)) = 15/13.
exp( Sum_{n >= 1} a(2*n)/a(n)*x^n/n ) = Sum_{n >= 0} a(n+1)*x^n. (End)

A201455 a(n) = 3*a(n-1) + 4*a(n-2) for n>1, a(0)=2, a(1)=3.

Original entry on oeis.org

2, 3, 17, 63, 257, 1023, 4097, 16383, 65537, 262143, 1048577, 4194303, 16777217, 67108863, 268435457, 1073741823, 4294967297, 17179869183, 68719476737, 274877906943, 1099511627777, 4398046511103, 17592186044417, 70368744177663, 281474976710657
Offset: 0

Views

Author

Bruno Berselli, Jan 09 2013

Keywords

Comments

This is the Lucas sequence V(3,-4).
Inverse binomial transform of this sequence is A087451.

Crossrefs

Cf. for the same recurrence with initial values (i,i+1): A015521 (Lucas sequence U(3,-4); i=0), A122117 (i=1), A189738 (i=3).
Cf. for similar closed form: A014551 (2^n+(-1)^n), A102345 (3^n+(-1)^n), A087404 (5^n+(-1)^n).

Programs

  • Magma
    [n le 1 select n+2 else 3*Self(n)+4*Self(n-1): n in [0..25]];
    
  • Mathematica
    RecurrenceTable[{a[n] == 3 a[n - 1] + 4 a[n - 2], a[0] == 2, a[1] == 3}, a[n], {n, 25}]
  • Maxima
    a[0]:2$ a[1]:3$ a[n]:=3*a[n-1]+4*a[n-2]$ makelist(a[n], n, 0, 25);
    
  • PARI
    Vec((2-3*x)/((1+x)*(1-4*x)) + O(x^30)) \\ Michel Marcus, Jun 26 2015

Formula

G.f.: (2-3*x)/((1+x)*(1-4*x)).
a(n) = 4^n+(-1)^n.
a(n) = A086341(A047524(n)) for n>0, a(0)=2.
a(n) = [x^n] ( (1 + 3*x + sqrt(1 + 6*x + 25*x^2))/2 )^n for n >= 1. - Peter Bala, Jun 23 2015
a(n) = (2/4^n) * Sum_{k = 0..n} binomial(4*n+1, 4*k). - Peter Bala, Feb 06 2019

A283653 Numbers k such that 3^k + (-2)^k is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 17, 29, 31, 53, 59, 101, 277, 647, 1061, 2381, 2833, 3613, 3853, 3929, 5297, 7417, 90217, 122219, 173191, 256199, 336353, 485977, 591827, 1059503
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 12 2017

Keywords

Comments

Numbers j such that both 3^j + (-2)^j and 3^j + (-4)^j are primes: 0, 3, 4, 17, 59, ...
See Michael Somos comment in A082101.
Probably this is just A057468 with 0,2,4 added, because we already know that if another even number belong to this sequence it must be greater than log_3(10^16000000) = about 3.3*10^7. This is because 3^n+2^n can be a prime with n>0 only if n is a power of 2. - Giovanni Resta, Mar 12 2017

Examples

			4 is in this sequence because 3^4 + (-2)^4 = 97 is prime.
		

Crossrefs

Cf. A174326. Subsequence of A087451. Supersequence of A057468.
Cf. A082101.

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(3^n+(-2)^n)];
    
  • Mathematica
    Select[Range[0, 10000], PrimeQ[3^# + (-2)^#] &] (* G. C. Greubel, Jul 29 2018 *)
  • PARI
    is(n)=isprime(3^n+(-2)^n) \\ Charles R Greathouse IV, Mar 16 2017

A140796 a(n)=a(n-1)+6a(n-2), n>2.

Original entry on oeis.org

1, 5, 14, 44, 128, 392, 1160, 3512, 10472, 31544, 94376, 283640, 849896, 2551736, 7651112, 22961528, 68868200, 206637368, 619846568, 1859670776, 5578750184, 16736774840, 50209275944, 150629924984, 451885580648, 1355665130552
Offset: 0

Views

Author

Paul Curtz, Jul 15 2008

Keywords

Comments

The binomial transform is A037481.
The recurrence of the definition is also satisfied by A087451, A102901 and A140725.

Crossrefs

Programs

  • Mathematica
    Join[{1},LinearRecurrence[{1,6},{5,14},30]] (* Harvey P. Dale, Nov 20 2011 *)

Formula

a(n+1)-3a(n) = (-1)^n*A000079(n-1), n>0.
d(n+1)-3d(n) = (-1)^(n+1)*A000079(n-1), n>0, where d(n) is the sequence of pair sums d(n)= a(n)+a(n+1)=6, 19, 58, 172,...
O.g.f.: (1+x)(3x+1)/((2x+1)(1-3x)). - R. J. Mathar, Jul 29 2008
a(n) = (-1)^(n+1)*2^n/10+8*3^n/5, n>0. - R. J. Mathar, Jul 29 2008
a(n) = A140725(n)+A140725(n+1). - Philippe Deléham, Nov 17 2013

Extensions

Edited and extended by R. J. Mathar, Jul 29 2008

A087452 G.f.: (2-x)/((1+3x)(1-4x)); e.g.f.: exp(4x) + exp(-3x); a(n) = 4^n + (-3)^n.

Original entry on oeis.org

2, 1, 25, 37, 337, 781, 4825, 14197, 72097, 242461, 1107625, 4017157, 17308657, 65514541, 273218425, 1059392917, 4338014017, 17050729021, 69106897225, 273715645477, 1102998412177, 4387586157901, 17623567104025, 70274600998837, 281757406247137
Offset: 0

Views

Author

Paul Barry, Sep 06 2003

Keywords

Comments

Generalized Lucas-Jacobsthal numbers.

Crossrefs

Programs

Formula

a(n) = (-3)^n+4^n.
a(n) = a(n-1) + 12*a(n-2) for n > 1; a(0)=2, a(1)=1. - Philippe Deléham, Sep 19 2009
a(n) = 2*A053404(n) - A053404(n-1), n > 0. - Ralf Stephan, Jul 21 2013

A317793 a(n) = (4^n + (-3)^n + 2^n + (-1)^n)/2.

Original entry on oeis.org

1, 15, 22, 177, 406, 2445, 7162, 36177, 121486, 554325, 2009602, 8656377, 32761366, 136617405, 529712842, 2169039777, 8525430046, 34553579685, 136858084882, 551499730377, 2193794127526, 8811785649165, 35137304693722, 140878711512177, 562526325893806
Offset: 1

Views

Author

Jinyuan Wang, Aug 07 2018

Keywords

Comments

This sequence is an extension of A014551; the sequences A014551(n) = 2^n + (-1)^n, a(n) = 4^n + (-3)^n + 2^n + (-1)^n and b(n) = 6^n + (-5)^n + 4^n + (-3)^n + 2^n + (-1)^n, ... can be considered to be of the same type.
For k>0, a(4k-2)/5, a(2k)/3 and a(2k+1)/2 are integers.

Crossrefs

Programs

  • Magma
    [(4^n+(-3)^n+2^n+(-1)^n)/2: n in [1..30]]; // Vincenzo Librandi, Aug 08 2018
  • Mathematica
    CoefficientList[ Series[(-48x^3 - 21x^2 + 13x + 1)/(24x^4 + 14x^3 - 13x^2 - 2x + 1), {x, 0, 25}], x]  (* or *)LinearRecurrence[{2, 13, -14, -24}, {1, 15, 22, 177}, 26] (* Robert G. Wilson v, Aug 07 2018 *)
  • PARI
    Vec(x*(1 + 13*x - 21*x^2 - 48*x^3) / ((1 + x)*(1 - 2*x)*(1 + 3*x)*(1 - 4*x)) + O(x^40)) \\ Colin Barker, Aug 07 2018
    

Formula

a(n) = (4^n + (-3)^n + 2^n + (-1)^n)/2 for n > 0.
From Colin Barker, Aug 07 2018: (Start)
G.f.: x*(1 + 13*x - 21*x^2 - 48*x^3) / ((1 + x)*(1 - 2*x)*(1 + 3*x)*(1 - 4*x)).
a(n) = 2*a(n-1) + 13*a(n-2) - 14*a(n-3) - 24*a(n-4) for n>4.
(End)
E.g.f.: (cosh(3*x/2) + cosh(7*x/2))*(cosh(x/2) + sinh(x/2)) - 2. - Stefano Spezia, Mar 20 2022

Extensions

More terms from Colin Barker, Aug 07 2018
Showing 1-6 of 6 results.