A123971
Triangle T(n,k), read by rows, defined by T(n,k)=3*T(n-1,k)-T(n-1,k-1)-T(n-2,k), T(0,0)=1, T(1,0)=2, T(1,1)=-1, T(n,k)=0 if k<0 or if k>n.
Original entry on oeis.org
1, 2, -1, 5, -5, 1, 13, -19, 8, -1, 34, -65, 42, -11, 1, 89, -210, 183, -74, 14, -1, 233, -654, 717, -394, 115, -17, 1, 610, -1985, 2622, -1825, 725, -165, 20, -1, 1597, -5911, 9134, -7703, 3885, -1203, 224, -23, 1, 4181, -17345, 30691, -30418, 18633, -7329
Offset: 0
Triangle begins:
1
2, -1
5, -5, 1
13, -19, 8, -1
34, -65, 42, -11, 1
89, -210, 183, -74, 14, -1
233, -654, 717, -394, 115, -17, 1
Triangle (0, 2, 1/2, 1/2, 0, 0, ...) DELTA (1, -2, 0, 0, ...) begins:
1
0, 1
0, 2, -1
0, 5, -5, 1
0, 13, -19, 8, -1
0, 34, -65, 42, -11, 1
0, 89, -210, 183, -74, 14, -1
0, 233, -654, 717, -394, 115, -17, 1
Cf.
A094954,
A098495,
A123971,
A126124,
A152063,
A001519,
A079935,
A004253,
A001653,
A049685,
A070997,
A070998,
A072256,
A078922,
A077417,
A085260,
A001570,
A001870,
A126124.
-
Mathematica ( general k th center) Clear[M, T, d, a, x, k] k = 3 T[n_, m_, d_] := If[ n == m && n < d && m < d, k, If[n == m - 1 || n == m + 1, -1, If[n == m == d, k - 1, 0]]] M[d_] := Table[T[n, m, d], {n, 1, d}, {m, 1, d}] Table[M[d], {d, 1, 10}] Table[Det[M[d]], {d, 1, 10}] Table[Det[M[d] - x*IdentityMatrix[d]], {d, 1, 10}] a = Join[{M[1]}, Table[CoefficientList[ Det[M[d] - x*IdentityMatrix[d]], x], {d, 1, 10}]] Flatten[a] MatrixForm[a] Table[NSolve[Det[M[d] - x*IdentityMatrix[d]] == 0, x], {d, 1, 10}] Table[x /. NSolve[Det[M[d] - x*IdentityMatrix[d]] == 0, x][[d]], {d, 1, 10}]
-
T(n,k)=polcoeff(polcoeff(Ser((1-x)/(1+(y-3)*x+x^2)),n,x),n-k,y) \\ Ralf Stephan, Dec 12 2013
-
@CachedFunction
def A123971(n,k): # With T(0,0) = 1!
if n< 0: return 0
if n==0: return 1 if k == 0 else 0
h = 2*A123971(n-1,k) if n==1 else 3*A123971(n-1,k)
return A123971(n-1,k-1) - A123971(n-2,k) - h
for n in (0..9): [A123971(n,k) for k in (0..n)] # Peter Luschny, Nov 20 2012
Original entry on oeis.org
0, 5, 495, 48510, 4753490, 465793515, 45643010985, 4472549283020, 438264186724980, 42945417749765025, 4208212675290247475, 412361896760694487530, 40407257669872769530470, 3959498889750770719498535, 387990483937905657741325965, 38019107927025003687930446040
Offset: 0
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (I).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (II).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (III).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (IV).
- Index entries for linear recurrences with constant coefficients, signature (99,-99,1).
A095685
Expansion of (1+x)^4/(1-11*x+11*x^2-x^3).
Original entry on oeis.org
1, 15, 160, 1600, 15856, 156976, 1553920, 15382240, 152268496, 1507302736, 14920758880, 147700286080, 1462082101936, 14473120733296, 143269125231040, 1418218131577120, 14038912190540176, 138970903773824656, 1375670125547706400, 13617730351703239360
Offset: 0
-
CoefficientList[Series[(1 + x)^4/(1 - 11*x + 11*x^2 - x^3), {x, 0, 20}], x] (* Wesley Ivan Hurt, Dec 27 2023 *)
-
Vec((1+x)^4/(1-11*x+11*x^2-x^3) + O(x^25)) \\ Colin Barker, Mar 05 2016
Original entry on oeis.org
0, 30, 2970, 291060, 28520940, 2794761090, 273858065910, 26835295698120, 2629585120349880, 257672506498590150, 25249276051741484850, 2474171380564166925180, 242443546019236617182820, 23756993338504624316991210, 2327942903627433946447955790, 228114647562150022127582676240
Offset: 0
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (I).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (II).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (III).
- Editors, L'Intermédiaire des Mathématiciens, Query 4500: The equation x(x+1)/2 = y*(y+1)/3, L'Intermédiaire des Mathématiciens, 22 (1915), 255-260 (IV).
- Index entries for linear recurrences with constant coefficients, signature (99,-99,1).
A269028
a(n) = 40*a(n - 1) - a(n - 2) for n>1, a(0) = 1, a(1) = 1.
Original entry on oeis.org
1, 1, 39, 1559, 62321, 2491281, 99588919, 3981065479, 159143030241, 6361740144161, 254310462736199, 10166056769303799, 406387960309415761, 16245352355607326641, 649407706263983649879, 25960062898203738668519, 1037753108221885563090881
Offset: 0
Cf.
A001519,
A001835,
A001653,
A049685,
A070997,
A070998,
A072256,
A078922,
A160682,
A007805,
A075839,
A157014,
A159664,
A159668,
A157877,
A238379,
A097315.
-
[n le 2 select 1 else 40*Self(n-1)-Self(n-2): n in [1..20]]; // Vincenzo Librandi, Feb 19 2016
-
Table[Cosh[n Log[20 + Sqrt[399]]] - Sqrt[19/21] Sinh[n Log[20 + Sqrt[399]]], {n, 0, 17}]
Table[(2^(-n - 2) (38 (40 - 2 Sqrt[399])^n + 2 Sqrt[399] (40 - 2 Sqrt[399])^n - 38 (40 + 2 Sqrt[399])^n + 2 Sqrt[399] (40 + 2 Sqrt[399])^n))/Sqrt[399], {n, 0, 17}]
LinearRecurrence[{40, -1}, {1, 1}, 17]
A290284
Number of pairs of integers (x,y) satisfying the Diophantine equation x^2 - A000037(n)*y^2 = m such that x/y gives a convergent series towards sqrt(A000037(n)).
Original entry on oeis.org
3, 3, 5, 4, 5, 4, 7, 6, 5, 15, 8, 5, 9, 7, 12, 6, 10, 12, 9, 6, 11, 9, 12, 21, 7, 17, 9, 10, 11, 7, 13, 10, 9, 9, 19, 8, 20, 15, 13, 24, 12, 8, 15, 12, 16, 27, 16, 13, 9, 14, 27, 17, 12
Offset: 1
For A000037(4) = 6, a(4) = 4 we have the following sequences of pairs (x,y):
m = 1: x(0) = 1, x(1) = 5, x(i) = 10*x(i-1) - x(i-2) as in A001079(i) and y(0) = 0, y(1) = 2, y(i) = 10*y(i-1) - y(i-2) as in A001078(i);
m = -6: x(0) = 0, x(1) = 12, x(i) = 10*x(i-1) - x(i-2) as in A004291(i) (for i > 0) and y(0) = 1, y(1) = 5, y(i) = 10*y(i-1) - y(i-2) as in A001079(i);
m = -5: x(0) = 1, x(1) = 17, x(i) = 10*x(i-1) - x(i-2) and y(0) = 1, y(1) = 7, y(i) = 10*y(i-1) - y(i-2);
m = -2: x(0) = 2, x(1) = 22, x(i) = 10*x(i-1) - x(i-2) and y(0) = 1, y(1) = 9, y(i) = 10*y(i-1) - y(i-2) as in A072256(i+1).
In some cases a combination of A000037(n) and m has more than one integer pair sequence, for example A000037(5) = 7 and m = -3 has two integer pair sequences:
x(0) = 2, x(1) = 37, x(i) = 16*x(i-1) - x(i-2) and y(0) = 1, y(1) = 14, y(i) = 16*y(i-1) - y(i-2);
x(0) = -2, x(1) = 5, x(i) = 16*x(i-1) - x(i-2) and y(0) = 1, y(1) = 2, y(i) = 16*y(i-1) - y(i-2).
For A000037(4) = 6, the sequence observed from x^2 - 6y^2 = 3 is not in the convergent series of sqrt(6) due to for example x1/y1 = 2643/1079 = sqrt(6) + 5.259842e-7 while the smaller x,y pair, x2/y2 = 2158/881 from x^2 - 6y^2 = -2 is a fraction closer to sqrt(5), 2158/881 = sqrt(6) - 5.259841e-7.
-
from fractions import Fraction
def FracSqrt(p):
a = Fraction(p/1)
b = Fraction(1/1)
e = Fraction(10**(-200))
while a-b > e:
a = (a+b)/2
b = p/a
return a
print("number: ")
pp = int(input())
p = FracSqrt(pp)
n = 0
while n >= 0:
n = n+1
q = p.limit_denominator(n)
if (n == 1) or (q != q0):
t = q*n
m = t*t-pp*n*n
print(n,q,m)
q0 = q
Comments