Original entry on oeis.org
1, 4, 1, 144, 361, 484, 19321, 28224, 128881, 2427364, 1745041, 26501904, 285643801, 64995844, 4675961161, 31354493184, 149793121, 741117817924, 3178942795681, 545370434064, 107989070784841, 292105630845604
Offset: 1
-
I:=[1,4,1]; [n le 3 select I[n] else -Self(n-1) +5*Self(n-2) +125*Self(n-3): n in [1..41]]; // G. C. Greubel, Jan 11 2024
-
LinearRecurrence[{-1,5,125}, {1,4,1}, 40] (* G. C. Greubel, Jan 11 2024 *)
-
Vec((x+5*x^2)/(1+x-5*x^2-125*x^3) + O(x^30)) \\ Michel Marcus, Aug 28 2015
-
@CachedFunction
def a(n): # a = A094423
if (n<4): return (0,1,4,1)[n]
else: return -a(n-1) + 5*a(n-2) + 125*a(n-3)
[a(n) for n in range(1,41)] # G. C. Greubel, Jan 11 2024
A190958
a(n) = 2*a(n-1) - 10*a(n-2), with a(0) = 0, a(1) = 1.
Original entry on oeis.org
0, 1, 2, -6, -32, -4, 312, 664, -1792, -10224, -2528, 97184, 219648, -532544, -3261568, -1197696, 30220288, 72417536, -157367808, -1038910976, -504143872, 9380822016, 23803082752, -46202054656, -330434936832, -198849327104, 2906650714112, 7801794699264
Offset: 0
Sequences of the form a(n) = c*a(n-1) - d*a(n-2), with a(0)=0, a(1)=1:
c/d...1.......2.......3.......4.......5.......6.......7.......8.......9......10
-
I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1)-10*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Sep 17 2011
-
LinearRecurrence[{2,-10}, {0,1}, 50]
-
a(n)=([0,1; -10,2]^n*[0;1])[1,1] \\ Charles R Greathouse IV, Apr 08 2016
-
[lucas_number1(n,2,10) for n in (0..50)] # G. C. Greubel, Jun 10 2022
A006495
Real part of (1 + 2*i)^n, where i is sqrt(-1).
Original entry on oeis.org
1, 1, -3, -11, -7, 41, 117, 29, -527, -1199, 237, 6469, 11753, -8839, -76443, -108691, 164833, 873121, 922077, -2521451, -9653287, -6699319, 34867797, 103232189, 32125393, -451910159, -1064447283, 130656229, 5583548873
Offset: 0
1 + x - 3*x^2 - 11*x^3 - 7*x^4 + 41*x^5 + 117*x^6 + 29*x^7 - 527*x^8 + ...
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 0..200 (a(88) onwards corrected by Sean A. Irvine, Apr 29 2019)
- Beata Bajorska-Harapińska, Barbara Smoleń, and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.
- G. Berzsenyi, Gaussian Fibonacci numbers, Fib. Quart., 15 (1977), 233-236.
- Wikipedia, Lucas sequence.
- Index entries for Lucas sequences.
- Index entries for Gaussian integers and primes.
- Index entries for linear recurrences with constant coefficients, signature (2,-5).
-
A006495:=func< n | Integers()!Real((1+2*Sqrt(-1))^n) >; [ A006495(n): n in [0..30] ]; // Klaus Brockhaus, Feb 04 2011
-
a := n -> hypergeom([1/2 - n/2, -n/2], [1/2], -4):
seq(simplify(a(n)), n=0..28); # Peter Luschny, Jul 26 2020
-
Table[Re[(1+2I)^n],{n,0,29}] (* Giovanni Resta, Mar 28 2006 *)
-
{a(n) = local(A); n++; if( n<1, 0, A = vector(n); A[1] = 1; for( k=2, n, A[k] = (4*k + 1) * A[k-1] - 8 * sum( j=1, k-1, A[j] * A[k-j])); A[n])} /* Michael Somos, Jul 23 2011 */
-
a(n) = real( (1 + 2*I)^n ) \\ Charles R Greathouse IV, Nov 21 2014
-
{a(n) = my(A=1);
A = sum(m=0, n+1, (1 + (-1)^m*I)^m * x^m / (1 - (-1)^m*I*x +x*O(x^n))^(m+1) ); polcoeff(A, n)} \\ Paul D. Hanna, Mar 09 2019
-
[lucas_number2(n,2,5)/2 for n in range(0,30)] # Zerinvary Lajos, Jul 08 2008
A088137
Generalized Gaussian Fibonacci integers.
Original entry on oeis.org
0, 1, 2, 1, -4, -11, -10, 13, 56, 73, -22, -263, -460, -131, 1118, 2629, 1904, -4079, -13870, -15503, 10604, 67717, 103622, 4093, -302680, -617639, -327238, 1198441, 3378596, 3161869, -3812050, -17109707, -22783264, 5762593, 79874978, 142462177, 45299420, -336787691
Offset: 0
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Beata Bajorska-Harapińska, Barbara Smoleń, and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.
- Ronald Orozco López, Deformed Differential Calculus on Generalized Fibonacci Polynomials, arXiv:2211.04450 [math.CO], 2022.
- Mihai Prunescu, On other two representations of the C-recursive integer sequences by terms in modular arithmetic, arXiv:2406.06436 [math.NT], 2024. See p. 18.
- Mihai Prunescu and Lorenzo Sauras-Altuzarra, On the representation of C-recursive integer sequences by arithmetic terms, arXiv:2405.04083 [math.LO], 2024. See p. 16.
- Mihai Prunescu and Joseph M. Shunia, On modular representations of C-recursive integer sequences, arXiv:2502.16928 [math.NT], 2025. See p. 6.
- Wikipedia, Lucas sequence
- Index entries for linear recurrences with constant coefficients, signature (2,-3).
- Index entries for Lucas sequences
-
[n le 2 select n-1 else 2*Self(n-1)-3*Self(n-2): n in [1..50]]; // G. C. Greubel, Oct 22 2018
-
A[0]:= 0: A[1]:= 1:
for n from 2 to 100 do A[n]:= 2*A[n-1] - 3*A[n-2] od:
seq(A[n],n=0..100); # Robert Israel, Aug 05 2014
-
LinearRecurrence[{2,-3},{0,1},40] (* Harvey P. Dale, Nov 03 2014 *)
-
x='x+O('x^50); concat([0], Vec(x/(1-2*x+3*x^2))) \\ G. C. Greubel, Oct 22 2018
-
[lucas_number1(n,2,3) for n in range(0, 38)] # Zerinvary Lajos, Apr 23 2009
A088138
Generalized Gaussian Fibonacci integers.
Original entry on oeis.org
0, 1, 2, 0, -8, -16, 0, 64, 128, 0, -512, -1024, 0, 4096, 8192, 0, -32768, -65536, 0, 262144, 524288, 0, -2097152, -4194304, 0, 16777216, 33554432, 0, -134217728, -268435456, 0, 1073741824, 2147483648, 0, -8589934592, -17179869184, 0, 68719476736, 137438953472
Offset: 0
- Robert Israel, Table of n, a(n) for n = 0..3300
- Beata Bajorska-Harapińska, Barbara Smoleń, and Roman Wituła, On Quaternion Equivalents for Quasi-Fibonacci Numbers, Shortly Quaternaccis, Advances in Applied Clifford Algebras (2019) Vol. 29, 54.
- Wikipedia, Lucas sequence
- Index entries for linear recurrences with constant coefficients, signature (2,-4).
- Index entries for Lucas sequences
-
a:=[0,1];; for n in [3..40] do a[n]:=2*a[n-1]-4*a[n-2]; od; a; # Muniru A Asiru, Oct 23 2018
-
I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1) - 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 15 2018
-
M:= <<1+I,1+I>|>:
T:= <<-I/2,0>|<0,I/2>>:
seq(LinearAlgebra:-Trace(T.M^n),n=0..100); # Robert Israel, Jan 28 2016
-
Join[{a=0,b=1},Table[c=2*b-4*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 17 2011 *)
LinearRecurrence[{2, -4}, {0, 1}, 40] (* Vincenzo Librandi, Jan 29 2016 *)
Table[2^(n-2)*((-1)^Quotient[n-1,3]+(-1)^Quotient[n,3]), {n,0,40}] (*Federico Provvedi,Apr 24 2022*)
-
/* lists powers of any quaternion */
QuaternionToN(a,b,c,d,nmax) = {local (C);C = matrix(nmax+1,4);C[1,1]=1;for(n=2,nmax+1,C[n,1]=a*C[n-1,1]-b*C[n-1,2]-c*C[n-1,3]-d*C[n-1,4];C[n,2]=b*C[n-1,1]+a*C[n-1,2]+d*C[n-1,3]-c*C[n-1,4];C[n,3]=c*C[n-1,1]-d*C[n-1,2]+a*C[n-1,3]+b*C[n-1,4];C[n,4]=d*C[n-1,1]+c*C[n-1,2]-b*C[n-1,3]+a*C[n-1,4];);return (C);} /* Stanislav Sykora, Jun 11 2012 */
-
my(x='x+O('x^30)); concat([0], Vec(x/(1-2*x+4*x^2))) \\ G. C. Greubel, Oct 22 2018
-
a(n) = 2^(n-1)*polchebyshev(n-1, 2, 1/2); \\ Michel Marcus, May 02 2022
-
[lucas_number1(n,2,4) for n in range(0, 39)] # Zerinvary Lajos, Apr 23 2009
A207538
Triangle of coefficients of polynomials v(n,x) jointly generated with A207537; see Formula section.
Original entry on oeis.org
1, 2, 4, 1, 8, 4, 16, 12, 1, 32, 32, 6, 64, 80, 24, 1, 128, 192, 80, 8, 256, 448, 240, 40, 1, 512, 1024, 672, 160, 10, 1024, 2304, 1792, 560, 60, 1, 2048, 5120, 4608, 1792, 280, 12, 4096, 11264, 11520, 5376, 1120, 84, 1, 8192, 24576, 28160, 15360
Offset: 1
First seven rows:
1
2
4...1
8...4
16..12..1
32..32..6
64..80..24..1
(2, 0, 0, 0, 0, ...) DELTA (0, 1/2, -1/2, 0, 0, 0, ...) begins:
1
2, 0
4, 1, 0
8, 4, 0, 0
16, 12, 1, 0, 0
32, 32, 6, 0, 0, 0
64, 80, 24, 1, 0, 0, 0
128, 192, 80, 8, 0, 0, 0, 0
- Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 80-83, 357-358.
-
u[1, x_] := 1; v[1, x_] := 1; z = 16;
u[n_, x_] := u[n - 1, x] + (x + 1)*v[n - 1, x]
v[n_, x_] := u[n - 1, x] + v[n - 1, x]
Table[Factor[u[n, x]], {n, 1, z}]
Table[Factor[v[n, x]], {n, 1, z}]
cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
TableForm[cu]
Flatten[%] (* A207537, |A028297| *)
Table[Expand[v[n, x]], {n, 1, z}]
cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
TableForm[cv]
Flatten[%] (* A207538, |A133156| *)
t[0, 0] = 1; t[n_, k_] := t[n, k] = If[n < 0 || k < 0, 0, 2 t[n - 1, k] + t[n - 2, k - 1]]; Table[t[n, k], {n, 0, 15}, {k, 0, Floor[n/2]}] // Flatten (* Zagros Lalo, Jul 31 2018 *)
t[n_, k_] := t[n, k] = 2^(n - 2 k) * (n - k)!/((n - 2 k)! k!) ; Table[t[n, k], {n, 0, 15}, {k, 0, Floor[n/2]} ] // Flatten (* Zagros Lalo, Jul 31 2018 *)
A006496
Imaginary part of (1+2i)^n.
Original entry on oeis.org
0, 2, 4, -2, -24, -38, 44, 278, 336, -718, -3116, -2642, 10296, 33802, 16124, -136762, -354144, -24478, 1721764, 3565918, -1476984, -20783558, -34182196, 35553398, 242017776, 306268562, -597551756, -2726446322, -2465133864, 8701963882, 29729597084, 15949374758
Offset: 0
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
I:=[0,2]; [n le 2 select I[n] else 2*Self(n-1)-5*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Dec 21 2011
-
LinearRecurrence[{2,-5},{0,2},30] (* Vincenzo Librandi, Dec 21 2011 *)
-
a(n)=([1, -2; 2, 1]^n)[1,2] \\ Charles R Greathouse IV, Dec 22 2011
A088139
a(n) = 2*a(n-1) - 6*a(n-2), a(0)=0, a(1)=1.
Original entry on oeis.org
0, 1, 2, -2, -16, -20, 56, 232, 128, -1136, -3040, 736, 19712, 35008, -48256, -306560, -323584, 1192192, 4325888, 1498624, -22958080, -54907904, 27932672, 385312768, 603029504, -1105817600, -5829812224, -5024718848, 24929435648, 80007184384
Offset: 0
-
a:=[0,1];; for n in [3..30] do a[n]:=2*a[n-1]-6*a[n-2]; od; a; # Muniru A Asiru, Oct 23 2018
-
I:=[0,1]; [n le 2 select I[n] else 2*Self(n-1) - 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Oct 22 2018
-
seq(coeff(series(x/(1-2*x+6*x^2),x,n+1), x, n), n = 0 .. 30); # Muniru A Asiru, Oct 23 2018
-
Join[{a=0,b=1},Table[c=2*b-6*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 17 2011*)
TrigExpand@Table[(6^(n/2) Sin[n ArcTan[Sqrt[5]]])/Sqrt[5], {n, 0, 20}] (* or *)
Table[Sum[(-5)^k Binomial[n, 2 k + 1], {k, 0, n/2}], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 20 2016 *)
LinearRecurrence[{2,-6},{0,1},40] (* Harvey P. Dale, Nov 22 2024 *)
-
x='x+O('x^30); concat([0], Vec(x/(1-2*x+6*x^2))) \\ G. C. Greubel, Oct 22 2018
-
[lucas_number1(n,2,6) for n in range(0, 30)] # Zerinvary Lajos, Apr 23 2009
A116484
Expansion of (-1+3*x)/(5*x^2 + 1 - 2*x).
Original entry on oeis.org
-1, 1, 7, 9, -17, -79, -73, 249, 863, 481, -3353, -9111, -1457, 42641, 92567, -28071, -518977, -897599, 799687, 6087369, 8176303, -14084239, -69049993, -67678791, 209892383, 758178721, 466895527, -2857102551, -8048682737, -1811852719
Offset: 0
- Harvey P. Dale, Table of n, a(n) for n = 0..1000
- J. Riordan, The distribution of crossings of chords joining pairs of 2n points on a circle, Math. Comp., 29 (1975), 215-222.
- J. Riordan, The distribution of crossings of chords joining pairs of 2n points on a circle, Math. Comp., 29 (1975), 215-222. [Annotated scanned copy]
- Index entries for linear recurrences with constant coefficients, signature (2,-5).
-
CoefficientList[Series[(-1+3x)/(5x^2+1-2x),{x,0,40}],x] (* or *) LinearRecurrence[{2,-5},{-1,1},40] (* Harvey P. Dale, Jun 24 2013 *)
A193726
Triangular array: the fusion of polynomial sequences P and Q given by p(n,x)=(x+2)^n and q(n,x)=(x+2)^n.
Original entry on oeis.org
1, 1, 2, 2, 9, 10, 4, 28, 65, 50, 8, 76, 270, 425, 250, 16, 192, 920, 2200, 2625, 1250, 32, 464, 2800, 9000, 16250, 15625, 6250, 64, 1088, 7920, 32000, 77500, 112500, 90625, 31250, 128, 2496, 21280, 103600, 315000, 612500, 743750, 515625, 156250
Offset: 0
First six rows:
1;
1, 2;
2, 9, 10;
4, 28, 65, 50;
8, 76, 270, 425, 250;
16, 192, 920, 2200, 2625, 1250;
-
function T(n, k) // T = A193726
if k lt 0 or k gt n then return 0;
elif n lt 2 then return k+1;
else return 2*T(n-1, k) + 5*T(n-1, k-1);
end if;
end function;
[T(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 02 2023
-
(* First program *)
z = 8; a = 1; b = 2; c = 1; d = 2;
p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
g[n_] := CoefficientList[w[n, x], {x}]
TableForm[Table[Reverse[g[n]], {n, -1, z}]]
Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193726 *)
TableForm[Table[g[n], {n, -1, z}]]
Flatten[Table[g[n], {n, -1, z}]] (* A193727 *)
(* Second program *)
T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n<2, k+1, 2*T[n-1, k] + 5*T[n -1, k-1]]];
Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 02 2023 *)
-
def T(n, k): # T = A193726
if (k<0 or k>n): return 0
elif (n<2): return k+1
else: return 2*T(n-1, k) + 5*T(n-1, k-1)
flatten([[T(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 02 2023
Showing 1-10 of 12 results.
Comments