A143972
Eigentriangle by rows, A143971 * (A108300 * 0^(n-k)); 1<=k<=1.
Original entry on oeis.org
1, 4, 1, 7, 4, 5, 10, 7, 20, 16, 13, 10, 35, 64, 53, 16, 13, 50, 112, 212, 175, 19, 16, 65, 160, 371, 700, 578, 22, 19, 80, 208, 530, 1225, 2312, 1909, 25, 28, 95, 256, 689, 1750, 4046, 7636, 6305, 28, 25, 110, 304, 848, 2275, 5780, 23363, 25220, 20824
Offset: 1
First few rows of the triangle =
1;
4, 1;
7, 4, 5;
10, 7, 10, 16;
13, 10, 35, 64, 53;
16, 13, 50, 112, 212, 175;
19, 16, 65, 160, 371, 700, 578;
22, 19, 80, 208, 530, 1225, 2312, 1909;
25, 22, 95, 256, 689, 1750, 4046, 7636, 6305;
... Example: row 4 = (10, 7, 20, 16) = termwise products of (10, 7, 4, 1) and (1, 1, 5, 16) = (10*1, 7*1, 4*5, 1*16), where (10, 7, 4, 1) = row 4 of triangle A143971.
A228916
Indices of primes in sequence A108300.
Original entry on oeis.org
1, 3, 9, 15, 39, 225, 231, 363, 687, 1299, 1335, 1809, 2367, 12735
Offset: 1
-
seq=RecurrenceTable[{a[n]==3*a[n-1]+a[n-2],a[0]==1,a[1]==5},a,{n,1,1000}]; Select[Range[1000],PrimeQ[seq[[#]]]&]
A052924
Expansion of g.f.: (1-x)/(1 - 3*x - x^2).
Original entry on oeis.org
1, 2, 7, 23, 76, 251, 829, 2738, 9043, 29867, 98644, 325799, 1076041, 3553922, 11737807, 38767343, 128039836, 422886851, 1396700389, 4612988018, 15235664443, 50319981347, 166195608484, 548906806799, 1812916028881
Offset: 0
encyclopedia(AT)pommard.inria.fr, Jan 25 2000
- L. Euler, Introductio in analysin infinitorum, 1748, section 338. English translation by John D. Blanton, Introduction to Analysis of the Infinite, 1988, Springer, p. 286.
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Sergio Falcón, The k-Fibonacci difference sequences, Chaos, Solitons & Fractals, Volume 87, June 2016, Pages 153-157.
- Sergio Falcón and Ángel Plaza, On the Fibonacci k-numbers, Chaos, Solitons & Fractals 2007; 32(5): 1615-24.
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 909
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (3,1).
-
a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Jun 09 2019
-
R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2) )); // G. C. Greubel, Jun 09 2019
-
spec:= [S,{S=Sequence(Prod(Sequence(Z),Union(Z,Z,Prod(Z,Z))))}, unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
seq(coeff(series((1-x)/(1-3*x-x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 16 2019
-
CoefficientList[Series[(1-x)/(1-3*x-x^2), {x,0,30}], x] (* G. C. Greubel, Jun 09 2019 *)
-
Vec((1-x)/(1-3*x-x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
-
((1-x)/(1-3*x-x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 09 2019
A152187
a(n) = 3*a(n-1) + 5*a(n-2), with a(0)=1, a(1)=5.
Original entry on oeis.org
1, 5, 20, 85, 355, 1490, 6245, 26185, 109780, 460265, 1929695, 8090410, 33919705, 142211165, 596232020, 2499751885, 10480415755, 43940006690, 184222098845, 772366329985, 3238209484180, 13576460102465, 56920427728295
Offset: 0
A374439
Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.
Original entry on oeis.org
1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0
Triangle starts:
[ 0] [1]
[ 1] [1, 2]
[ 2] [1, 2, 1]
[ 3] [1, 2, 2, 2]
[ 4] [1, 2, 3, 4, 1]
[ 5] [1, 2, 4, 6, 3, 2]
[ 6] [1, 2, 5, 8, 6, 6, 1]
[ 7] [1, 2, 6, 10, 10, 12, 4, 2]
[ 8] [1, 2, 7, 12, 15, 20, 10, 8, 1]
[ 9] [1, 2, 8, 14, 21, 30, 20, 20, 5, 2]
[10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
| n | A039834 & A000045 | A000032 | A000129 | A048654 |
| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|
| | Fibonacci | Lucas | Pell | Pell* |
| 0 | -1 | 1 | 1 | 1 |
| 1 | 1 | 3 | 0 | 4 |
| 2 | 0 | 4 | 1 | 9 |
| 3 | 1 | 7 | 2 | 22 |
| 4 | 1 | 11 | 5 | 53 |
| 5 | 2 | 18 | 12 | 128 |
| 6 | 3 | 29 | 29 | 309 |
| 7 | 5 | 47 | 70 | 746 |
| 8 | 8 | 76 | 169 | 1801 |
| 9 | 13 | 123 | 408 | 4348 |
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way):
A022087,
A055389,
A118658,
A052542,
A163271,
A371596,
A324969,
A212804,
A077985,
A069306,
A215928.
-
function T(n,k) // T = A374439
if k lt 0 or k gt n then return 0;
elif k le 1 then return k+1;
else return T(n-1,k) + T(n-2,k-2);
end if;
end function;
[T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
-
A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
# Alternative, using the function qStirling2 from A333143:
T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
seq(seq(T(n, k), k = 0..n), n = 0..10);
-
A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
-
from functools import cache
@cache
def T(n: int, k: int) -> int:
if k > n: return 0
if k < 2: return k + 1
return T(n - 1, k) + T(n - 2, k - 2)
-
from math import comb as binomial
def T(n: int, k: int) -> int:
o = k & 1
return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
-
def P(n, x):
if n < 0: return P(n, x)
return sum(T(n, k)*x**k for k in range(n + 1))
def sgn(x: int) -> int: return (x > 0) - (x < 0)
# Table of interpolated sequences
print("| n | A039834 & A000045 | A000032 | A000129 | A048654 |")
print("| n | -P(n,-1) | P(n,1) |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
print("| | Fibonacci | Lucas | Pell | Pell* |")
f = "| {0:2d} | {1:9d} | {2:4d} | {3:5d} | {4:4d} |"
for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
-
from sage.combinat.q_analogues import q_stirling_number2
def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025
A182001
Riordan array ((2*x+1)/(1-x-x^2), x/(1-x-x^2)).
Original entry on oeis.org
1, 3, 1, 4, 4, 1, 7, 9, 5, 1, 11, 20, 15, 6, 1, 18, 40, 40, 22, 7, 1, 29, 78, 95, 68, 30, 8, 1, 47, 147, 213, 185, 105, 39, 9, 1, 76, 272, 455, 466, 320, 152, 49, 10, 1, 123, 495, 940, 1106, 891, 511, 210, 60, 11, 1, 199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1
Offset: 0
Triangle begins :
1;
3, 1;
4, 4, 1;
7, 9, 5, 1;
11, 20, 15, 6, 1;
18, 40, 40, 22, 7, 1;
29, 78, 95, 68, 30, 8, 1;
47, 147, 213, 185, 105, 39, 9, 1;
76, 272, 455, 466, 320, 152, 49, 10, 1;
123, 495, 940, 1106, 891, 511, 210, 60, 11, 1;
199, 890, 1890, 2512, 2317, 1554, 770, 280, 72, 12, 1;
(0, 3, -5/3, -1/3, 0, 0, ...) DELTA (1, 0, -2/3, 2/3, 0, 0, ...) begins:
1;
0, 1;
0, 3, 1;
0, 4, 4, 1;
0, 7, 9, 5, 1;
0, 11, 20, 15, 6, 1;
0, 18, 40, 40, 22, 7, 1;
-
function T(n,k)
if k lt 0 or k gt n then return 0;
elif k eq n then return 1;
elif k eq 0 then return Lucas(n+1);
else return T(n-1,k) + T(n-1,k-1) + T(n-2,k);
end if; return T; end function;
[T(n,k): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
-
with(combinat);
T:= proc(n, k) option remember;
if k<0 or k>n then 0
elif k=n then 1
elif k=0 then fibonacci(n+2) + fibonacci(n)
else T(n-1,k) + T(n-1,k-1) + T(n-2,k)
fi; end:
seq(seq(T(n, k), k=0..n), n=0..10); # G. C. Greubel, Feb 18 2020
-
With[{m = 10}, CoefficientList[CoefficientList[Series[(1+2*x)/(1-x-y*x-x^2), {x, 0, m}, {y, 0, m}], x], y]] // Flatten (* Georg Fischer, Feb 18 2020 *)
T[n_, k_]:= T[n, k]= If[k<0||k>n, 0, If[k==n, 1, If[k==0, LucasL[n+1], T[n-1, k] + T[n-1, k-1] + T[n-2, k] ]]]; Table[T[n, k], {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2020 *)
a(29) corrected by and a(55)-a(65) from
Georg Fischer, Feb 18 2020
Showing 1-6 of 6 results.
Comments