A035513 Wythoff array read by falling antidiagonals.
1, 2, 4, 3, 7, 6, 5, 11, 10, 9, 8, 18, 16, 15, 12, 13, 29, 26, 24, 20, 14, 21, 47, 42, 39, 32, 23, 17, 34, 76, 68, 63, 52, 37, 28, 19, 55, 123, 110, 102, 84, 60, 45, 31, 22, 89, 199, 178, 165, 136, 97, 73, 50, 36, 25, 144, 322, 288, 267, 220, 157, 118, 81, 58, 41, 27, 233, 521
Offset: 1
A022086 Fibonacci sequence beginning 0, 3.
0, 3, 3, 6, 9, 15, 24, 39, 63, 102, 165, 267, 432, 699, 1131, 1830, 2961, 4791, 7752, 12543, 20295, 32838, 53133, 85971, 139104, 225075, 364179, 589254, 953433, 1542687, 2496120, 4038807, 6534927, 10573734, 17108661, 27682395, 44791056, 72473451, 117264507
Offset: 0
Comments
First differences of A111314. - Ross La Haye, May 31 2006
Pisano period lengths: 1, 3, 1, 6, 20, 3, 16, 12, 8, 60, 10, 6, 28, 48, 20, 24, 36, 24, 18, 60, ... . - R. J. Mathar, Aug 10 2012
For n>=6, a(n) is the number of edge covers of the union of two cycles C_r and C_s, r+s=n, with a single common vertex. - Feryal Alayont, Oct 17 2024
References
- A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 7,17.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Tanya Khovanova, Recursive Sequences
- Index entries for linear recurrences with constant coefficients, signature (1,1).
Crossrefs
Programs
-
Magma
[3*Fibonacci(n): n in [0..40]]; // Vincenzo Librandi, Dec 31 2016
-
Maple
BB := n->if n=0 then 3; > elif n=1 then 0; > else BB(n-2)+BB(n-1); > fi: > L:=[]: for k from 1 to 34 do L:=[op(L),BB(k)]: od: L; # Zerinvary Lajos, Mar 19 2007 with (combinat):seq(sum((fibonacci(n,1)),m=1..3),n=0..32); # Zerinvary Lajos, Jun 19 2008
-
Mathematica
LinearRecurrence[{1, 1}, {0, 3}, 40] (* Arkadiusz Wesolowski, Aug 17 2012 *) Table[Fibonacci[n + 4] + Fibonacci[n - 4] - 4 Fibonacci[n], {n, 0, 40}] (* Bruno Berselli, Dec 30 2016 *) Table[3 Fibonacci[n], {n, 0, 40}] (* Vincenzo Librandi, Dec 31 2016 *)
-
PARI
a(n)=3*fibonacci(n) \\ Charles R Greathouse IV, Nov 06 2014
-
SageMath
def A022086(n): return 3*fibonacci(n) print([A022086(n) for n in range(41)]) # G. C. Greubel, Apr 10 2025
Formula
a(n) = 3*Fibonacci(n).
a(n) = F(n-2) + F(n+2) for n>1, with F=A000045.
a(n) = round( ((6*phi-3)/5) * phi^n ) for n>2. - Thomas Baruchel, Sep 08 2004
a(n) = A119457(n+1,n-1) for n>1. - Reinhard Zumkeller, May 20 2006
G.f.: 3*x/(1-x-x^2). - Philippe Deléham, Nov 19 2008
a(n) = A187893(n) - 1. - Filip Zaludek, Oct 29 2016
E.g.f.: 6*sinh(sqrt(5)*x/2)*exp(x/2)/sqrt(5). - Ilya Gutkovskiy, Oct 29 2016
a(n) = F(n+4) + F(n-4) - 4*F(n), F = A000045. - Bruno Berselli, Dec 29 2016
A119457 Triangle read by rows: T(n, 1) = n, T(n, 2) = 2*(n-1) for n>1 and T(n, k) = T(n-1, k-1) + T(n-2, k-2) for 2 < k <= n.
1, 2, 2, 3, 4, 3, 4, 6, 6, 5, 5, 8, 9, 10, 8, 6, 10, 12, 15, 16, 13, 7, 12, 15, 20, 24, 26, 21, 8, 14, 18, 25, 32, 39, 42, 34, 9, 16, 21, 30, 40, 52, 63, 68, 55, 10, 18, 24, 35, 48, 65, 84, 102, 110, 89, 11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144, 12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233
Offset: 1
Examples
Triangle begins as: 1; 2, 2; 3, 4, 3; 4, 6, 6, 5; 5, 8, 9, 10, 8; 6, 10, 12, 15, 16, 13; 7, 12, 15, 20, 24, 26, 21; 8, 14, 18, 25, 32, 39, 42, 34; 9, 16, 21, 30, 40, 52, 63, 68, 55; 10, 18, 24, 35, 48, 65, 84, 102, 110, 89; 11, 20, 27, 40, 56, 78, 105, 136, 165, 178, 144; 12, 22, 30, 45, 64, 91, 126, 170, 220, 267, 288, 233;
Links
- G. C. Greubel, Rows n = 1..50 of the triangle, flattened
- Eric Weisstein's World of Mathematics, Fibonacci Number
Crossrefs
Main diagonal: A023607(n).
Columns: A000027(n) (k=1), A005843(n-1) (k=2), A008585(n-2) (k=3), A008587(n-3) (k=4), A008590(n-4) (k=5), A008595(n-5) (k=6), A008603(n-6) (k=7).
Programs
-
Magma
A119457:= func< n,k | (n-k+1)*Fibonacci(k+1) >; [A119457(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Apr 16 2025
-
Mathematica
(* First program *) T[n_, 1] := n; T[n_ /; n > 1, 2] := 2 n - 2; T[n_, k_] /; 2 < k <= n := T[n, k] = T[n - 1, k - 1] + T[n - 2, k - 2]; Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Dec 01 2021 *) (* Second program *) A119457[n_,k_]:= (n-k+1)*Fibonacci[k+1]; Table[A119457[n,k], {n,13}, {k,n}]//Flatten (* G. C. Greubel, Apr 16 2025 *)
-
SageMath
def A119457(n,k): return (n-k+1)*fibonacci(k+1) print(flatten([[A119457(n,k) for k in range(1,n+1)] for n in range(1,13)])) # G. C. Greubel, Apr 16 2025
Formula
T(n, k) = (n-k+1)*T(k,k) for 1 <= k < n, with T(n, n) = A000045(n+1).
From G. C. Greubel, Apr 15 2025: (Start)
T(n, k) = (n-k+1)*Fibonacci(k+1).
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.
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
Comments
There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Examples
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 |
Links
- Paolo Xausa, Rows n = 0..150 of the triangle, flattened
- Peter Luschny, Illustrating the polynomials.
Crossrefs
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Programs
-
Magma
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
-
Maple
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);
-
Mathematica
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 *)
-
Python
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)
-
Python
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
-
Python
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))))
-
SageMath
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
Formula
T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025
A356991 a(n) = b(n) + b(n - b(n)) for n >= 2, where b(n) = A356998(n).
2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 47, 47, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 76, 76, 76, 76, 76, 77, 78, 79, 80
Offset: 2
Comments
The sequence is slow, that is, for n >= 2, a(n+1) - a(n) is either 0 or 1. The sequence is unbounded.
The line graph of the sequence {a(n)} thus consists of a series of plateaus (where the value of the ordinate a(n) is unchanged with increasing values of the abscissa n) joined by lines of slope 1.
The sequence of plateau heights begins 4, 7, 11, 18, 29, 47, 76, 123, 199, ..., the Lucas sequence {A000032(k): k >= 3}. The plateaus start at absiccsa values n = 4, 8, 12, 20, 32, 52, 84, 136, ..., the sequence {A022087(k): k >= 2}, and end at abscissa values n = 5, 8, 13, 21, 34, 55, 89, ..., the Fibonacci sequence {A000045(k): k >= 5}.
Other sequences defined in terms of b(n) = A356998(n) that are similarly related to the Lucas numbers include {n - b(b(b(2*n - b(n)))): n >= 1} beginning 0, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 7, 8, 9, 10, 11, 11, 11, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 17, 18, 19, ... and {2*n - b(2*n - b(2*n - b(n))) : n >= 1} beginning 1, 3, 4, 5, 7, 7, 9, 11, 11, 12, 14, 16, 18, 18, 18, 19, 21, 23, 25, 27, 29, 29, 29, 29, 29, 31, .... Neither sequence is slow.
Programs
-
Maple
b := proc(n) option remember; if n = 1 then 1 else n - b(b(n - b(b(b(n-1))))) end if; end proc: seq( b(n) + b(n - b(n) ), n = 2..100);
Formula
The sequence is completely determined by the initial values a(2) = 2, a(3) = 3 and the pair of formulas:
1) for k >= 3, a(4*F(k-1) + j) = L(k) for 0 <= j <= F(k-4), where F(-1) = 1 and
2) for k >= 3, a(F(k+2) + j) = L(k) + j for 0 <= j <= L(k-1).
A258160 a(n) = 8*Lucas(n).
16, 8, 24, 32, 56, 88, 144, 232, 376, 608, 984, 1592, 2576, 4168, 6744, 10912, 17656, 28568, 46224, 74792, 121016, 195808, 316824, 512632, 829456, 1342088, 2171544, 3513632, 5685176, 9198808, 14883984, 24082792, 38966776, 63049568, 102016344, 165065912
Offset: 0
Links
- Bruno Berselli, Table of n, a(n) for n = 0..300
- Tanya Khovanova, Recursive Sequences: a(n) = a(n-1)+a(n-2).
- Index entries for linear recurrences with constant coefficients, signature (1,1).
Crossrefs
Programs
-
Magma
[8*Lucas(n): n in [0..40]];
-
Mathematica
Table[8 LucasL[n], {n, 0, 40}] CoefficientList[Series[8*(2 - x)/(1 - x - x^2), {x, 0, 50}], x] (* G. C. Greubel, Dec 21 2017 *)
-
PARI
a(n)=([0,1; 1,1]^n*[16;8])[1,1] \\ Charles R Greathouse IV, Oct 07 2015
-
Sage
[8*lucas_number2(n, 1, -1) for n in (0..40)]
Formula
G.f.: 8*(2 - x)/(1 - x - x^2).
a(n) = Fibonacci(n+6) - Fibonacci(n-6), where Fibonacci(-6..-1) = -8, 5, -3, 2, -1, 1 (see similar sequences listed in Crossrefs).
a(n) = Lucas(n+4) + Lucas(n) + Lucas(n-4), where Lucas(-4..-1) = 7, -4, 3, -1.
a(n) = a(n-1) + a(n-2) for n>1, a(0)=16, a(1)=8.
a(n) = 2*A156279(n).
a(n+1) = 4*A022112(n).
A208085 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with every 2X2 subblock having the same number of equal edges as its horizontal neighbors and a different number from its vertical neighbors, and new values 0..1 introduced in row major order.
8, 20, 12, 56, 20, 24, 164, 32, 56, 36, 488, 52, 134, 60, 72, 1460, 84, 344, 96, 168, 108, 4376, 136, 888, 156, 402, 180, 216, 13124, 220, 2318, 252, 1032, 288, 504, 324, 39368, 356, 6056, 408, 2664, 468, 1206, 540, 648, 118100, 576, 15848, 660, 6954, 756, 3096
Offset: 1
Comments
Table starts
...8..20...56..164..488..1460..4376..13124..39368.118100..354296.1062884
..12..20...32...52...84...136...220....356....576....932....1508....2440
..24..56..134..344..888..2318..6056..15848..41478.108584..284264..744206
..36..60...96..156..252...408...660...1068...1728...2796....4524....7320
..72.168..402.1032.2664..6954.18168..47544.124434.325752..852792.2232618
.108.180..288..468..756..1224..1980...3204...5184...8388...13572...21960
.216.504.1206.3096.7992.20862.54504.142632.373302.977256.2558376.6697854
.324.540..864.1404.2268..3672..5940...9612..15552..25164...40716...65880
Examples
Some solutions for n=4 k=3 ..0..1..0..0....0..1..0..1....0..0..0..0....0..1..1..1....0..0..0..0 ..0..1..0..1....0..0..0..0....1..1..1..1....0..1..0..1....1..0..1..0 ..1..0..1..0....0..0..0..0....1..1..1..1....1..0..1..0....0..1..0..1 ..1..0..1..0....1..0..1..0....1..0..1..0....1..0..1..0....0..0..0..0 ..0..1..0..1....0..1..0..1....0..1..0..1....0..1..0..1....0..0..0..0
Links
- R. H. Hardin, Table of n, a(n) for n = 1..5596
Formula
Empirical for column k:
k=1: a(n) = 3*a(n-2)
k=2..7: a(n) = 3*a(n-2) for n>3
Empirical for row n:
n=1: a(k)=4*a(k-1)-3*a(k-2)
n=2,4,6: a(k)=a(k-1)+a(k-2)
n=3,5,7: a(k)=3*a(k-1)-3*a(k-3)+a(k-4)
A126714 Dual Wythoff array read along antidiagonals.
1, 2, 4, 3, 6, 7, 5, 10, 11, 9, 8, 16, 18, 14, 12, 13, 26, 29, 23, 19, 15, 21, 42, 47, 37, 31, 24, 17, 34, 68, 76, 60, 50, 39, 27, 20, 55, 110, 123, 97, 81, 63, 44, 32, 22, 89, 178, 199, 157, 131, 102, 71, 52, 35, 25, 144, 288, 322, 254, 212, 165, 115, 84, 57, 40, 28
Offset: 1
Comments
The dual Wythoff array is the dispersion of the sequence w given by w(n)=2+floor(n*x), where x=(golden ratio), so that w=2+A000201(n). For a discussion of dispersions, see A191426. - Clark Kimberling, Jun 03 2011
Examples
Array starts 1 2 3 5 8 13 21 34 55 89 144 4 6 10 16 26 42 68 110 178 288 466 7 11 18 29 47 76 123 199 322 521 843 9 14 23 37 60 97 157 254 411 665 1076 12 19 31 50 81 131 212 343 555 898 1453 15 24 39 63 102 165 267 432 699 1131 1830 17 27 44 71 115 186 301 487 788 1275 2063 20 32 52 84 136 220 356 576 932 1508 2440 22 35 57 92 149 241 390 631 1021 1652 2673 25 40 65 105 170 275 445 720 1165 1885 3050 28 45 73 118 191 309 500 809 1309 2118 3427
References
- Clark Kimberling, "Stolarsky Interspersions," Ars Combinatoria 39 (1995) 129-138. See page 135 for the dual Wythoff array and other dual arrays. - Clark Kimberling, Oct 29 2009
Links
- P. Hegarty, U. Larsson, Permutations of the natural numbers with prescribed difference multisets, Electr. J. Combin. Numb. Theory 6 (2006) #A03.
Crossrefs
First three rows identical to A035506. First column is A007066. First row is A000045. 2nd row is essentially A006355. 3rd row is essentially A000032. 4th row essentially A000285. 5th row essentially A013655 or A001060. 6th row essentially A022086 or A097135. 7th row essentially A022120. 8th row essentially A022087. 9th row essentially A022130. 10th row essentially A022088. 11th row essentially A022095. 12th row essentially A022089 etc.
Cf. A035513 (Wythoff array).
Programs
-
Maple
Tn1 := proc(T,nmax,row) local n,r,c,fnd; n := 1; while true do fnd := false; for r from 1 to row do for c from 1 to nmax do if T[r,c] = n then fnd := true; fi; od; if T[r,nmax] < n then RETURN(-1); fi; od; if fnd then n := n+1; else RETURN(n); fi; od; end; Tn2 := proc(T,nmax,row,ai1) local n,r,c,fnd; for r from 1 to row do for c from 1 to nmax do if T[r,c]+1 = ai1 then RETURN(T[r,c+1]+1); fi; od; od; RETURN(-1); end; T := proc(nmax) local a,col,row; a := array(1..nmax,1..nmax); for col from 1 to nmax do a[1,col] := combinat[fibonacci](col+1); od; for row from 2 to nmax do a[row,1] := Tn1(a,nmax,row-1); a[row,2] := Tn2(a,nmax,row-1,a[row,1]); for col from 3 to nmax do a[row,col] := a[row,col-2]+a[row,col-1]; od; od; RETURN(a); end; nmax := 12; a := T(nmax); for d from 1 to nmax do for row from 1 to d do printf("%d, ",a[row,d-row+1]); od; od;
-
Mathematica
(* program generates the dispersion array T of the complement of increasing sequence f[n] *) r = 40; r1 = 12; (* r=# rows of T, r1=# rows to show *) c = 40; c1 = 12; (* c=# cols of T, c1=# cols to show *) x = GoldenRatio; f[n_] := Floor[n*x + 2] (* f(n) is complement of column 1 *) mex[list_] := NestWhile[#1 + 1 &, 1, Union[list][[#1]] <= #1 &, 1, Length[Union[list]]] rows = {NestList[f, 1, c]}; Do[rows = Append[rows, NestList[f, mex[Flatten[rows]], r]], {r}]; t[i_, j_] := rows[[i, j]]; (* the array T *) TableForm[Table[t[i, j], {i, 1, 10}, {j, 1,10}]] (* Dual Wythoff array, A126714 *) Flatten[Table[t[k, n - k + 1], {n, 1, c1}, {k, 1, n}]] (* array as a sequence *) (* Program by Peter J. C. Moses, Jun 01 2011; added here by Clark Kimberling, Jun 03 2011 *)
A192746 Constant term of the reduction by x^2 -> x+1 of the polynomial p(n,x) defined below in Comments.
1, 5, 9, 17, 29, 49, 81, 133, 217, 353, 573, 929, 1505, 2437, 3945, 6385, 10333, 16721, 27057, 43781, 70841, 114625, 185469, 300097, 485569, 785669, 1271241, 2056913, 3328157, 5385073, 8713233, 14098309, 22811545, 36909857, 59721405, 96631265
Offset: 0
Keywords
Comments
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Feng-Zhen Zhao, The log-behavior of some sequences related to the generalized Leonardo numbers, Integers (2024) Vol. 24, Art. No. A82.
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1).
Programs
-
GAP
List([0..30], n-> 4*Fibonacci(n+2)-3); # G. C. Greubel, Jul 24 2019
-
Magma
[4*Fibonacci(n+2)-3: n in [0..30]]; // G. C. Greubel, Jul 24 2019
-
Mathematica
(* First program *) q = x^2; s = x + 1; z = 40; p[0, n_]:= 1; p[n_, x_]:= x*p[n-1, x] +3n +2; Table[Expand[p[n, x]], {n, 0, 7}] reduce[{p1_, q_, s_, x_}]:= FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1] t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}]; u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192746 *) u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192747 *) (* Clark Kimberling, Jul 09 2011 *) (* Additional programs *) a[0]=1;a[1]=5;a[n_]:=a[n]=a[n-1]+a[n-2]+3;Table[a[n],{n,0,36}] (* Gerry Martens, Jul 04 2015 *) 4*Fibonacci[Range[0,40]+2]-3 (* G. C. Greubel, Jul 24 2019 *)
-
PARI
vector(30, n, n--; 4*fibonacci(n+2)-3) \\ G. C. Greubel, Jul 24 2019
-
Sage
[4*fibonacci(n+2)-3 for n in (0..30)] # G. C. Greubel, Jul 24 2019
Formula
G.f.: (1+3*x-x^2)/((1-x)*(1-x-x^2)), so the first differences are (essentially) A022087. - R. J. Mathar, May 04 2014
a(n) = 4*Fibonacci(n+2)-3. - Gerry Martens, Jul 04 2015
A230127 Number of binary strings of length n avoiding "squares" (that is, repeated blocks of the form xx) with |x| > 1.
1, 2, 4, 8, 12, 20, 26, 38, 42, 52, 56, 56, 48, 42, 32, 22, 10, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0
Comments
Entringer et al. showed that a(n) = 0 for all n >= 19.
Examples
a(4) = 12 because there are 16 binary strings of length 4, but 4 of these strings (namely 0000, 0101, 1010, and 1111) repeat a substring of length 2. Thus a(4) = 16 - 4 = 12. a(18) = 2 because there are 2 strings of length 18 not containing any "squares" of length greater than 1: 010011000111001101 and 101100111000110010.
Links
- Nathaniel Johnston, C code for computing this sequence
- R. C. Entringer, D. E. Jackson and J. A. Schatz, On nonrepetitive sequences, J. Combin. Theory Ser. A. 16 (1974), 159-164.
Programs
-
Mathematica
a[n_] := a[n] = Select[PadLeft[#, n]& /@ IntegerDigits[Range[0, 2^n-1], 2], {} == SequencePosition[#, {b__, b__} /; Length[{b}]>1, 1]&] // Length; Table[Print[n, " ", a[n]]; a[n], {n, 0, 20}] (* Jean-François Alcover, Nov 10 2021 *)
Comments
Examples
References
Links
Crossrefs
Programs
Maple
Mathematica
PARI
Python
Python
Formula
Extensions