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-8 of 8 results.

A001076 Denominators of continued fraction convergents to sqrt(5).

Original entry on oeis.org

0, 1, 4, 17, 72, 305, 1292, 5473, 23184, 98209, 416020, 1762289, 7465176, 31622993, 133957148, 567451585, 2403763488, 10182505537, 43133785636, 182717648081, 774004377960, 3278735159921, 13888945017644, 58834515230497, 249227005939632, 1055742538989025
Offset: 0

Views

Author

Keywords

Comments

a(2*n+1) with b(2*n+1) := A001077(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation b^2 - 5*a^2 = -1, a(2*n) with b(2*n) := A001077(2*n), n >= 1, give all (positive integer) solutions to Pell equation b^2 - 5*a^2 = +1 (cf. Emerson reference).
Bisection: a(2*n+1) = T(2*n+1, sqrt(5))/sqrt(5) = A007805(n), n >= 0 and a(2*n) = 4*S(n-1,18), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. S(-1,x)=0. See A053120, resp. A049310. S(n,18)=A049660(n+1). - Wolfdieter Lang, Jan 10 2003
Apart from initial terms, this is the Pisot sequence E(4,17), a(n) = floor(a(n-1)^2/a(n-2) + 1/2).
This is also the Horadam sequence (0,1,1,4), having the recurrence relation a(n) = s*a(n-1) + r*a(n-2); for n > 1, where a(0) = 0, a(1) = 1, s = 4, r = 1. a(n) / a(n-1) converges to 5^1/2 + 2 as n approaches infinity. 5^(1/2) + 2 can also be written as (2 * Phi) + 1 and Phi^2 + Phi. - Ross La Haye, Aug 18 2003
Numerators of continued fraction [4, 4, 4, ...], where the convergents to [4, 4, 4, ...] = (4/1, 17/4, 72/17, ...). Let X = the 2 X 2 matrix [0, 1; 1, 4]; then X^n = [a(n-1), a(n); a(n), a(n+1)]; e.g., X^3 = [4, 17; 17, 72]. Let C = the limit of a(n)/a(n-1) = 2 + sqrt(5) = 4.236067977...; then C^n = a(n+1) + (1/C)*a(n), where (1/C) = 0.236067977... . Example: C^3 = 76.01315556..., = 72 + 17*(0.2360679...). - Gary W. Adamson, Dec 15 2007, corrected by Greg Dresden, Sep 16 2019, corrected by Alex Mark, Jul 21 2020
Sqrt(5) = 4/2 + 4/17 + 4/(17*305) + 4/(305*5473) + 4/(5473*98209) + ... . - Gary W. Adamson, Dec 15 2007
a(p) == 20^((p-1)/2) (mod p) for odd primes p. - Gary W. Adamson, Feb 22 2009
a(n) = A167808(3*n). - Reinhard Zumkeller, Nov 12 2009
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 4's along the main diagonal and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Moreover, a(n) is the second binomial transform of (0,1,0,5,0,25,...) (see also A033887). This fact can be proved similarly like the proof of Paul Barry's remark in A033887 by using the following scaling identity for delta-Fibonacci numbers: y^n b(n;x/y) = Sum_{k=0..n} binomial(n,k) (y-1)^(n-k) b(k;x) and the fact that b(n;2) = (1-(-1)^n) 5^floor(n/2). - Roman Witula, Jul 12 2012
Binomial transform of 0, 1, 2, 8, 24, 80, 256, ... (A063727 with offset 1). - R. J. Mathar, Feb 05 2014
For n >= 1, a(n) equals the number of words of length n-1 on alphabet {0,1,...,4} avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
With offset 1 is the INVERT transform of A006190: (1, 3, 10, 33, 109, 360, ...). - Gary W. Adamson, Jul 24 2015
From Rogério Serôdio, Mar 30 2018: (Start)
This is a divisibility sequence (i.e., if n|m then a(n)|a(m)).
gcd(a(n),a(n+k)) = a(gcd(n, k)) for all positive integers n and k. (End)
The initial 0 of this sequence is in contradiction with the fact that 0 is no valid denominator and according to all standard references, the first convergent of a continued fraction is p(0)/q(0) = b(0)/1 where b(0) is the first term of the continued fraction, given by the integer part of the number. One may artificially define q(-1) = 0 to have a recurrent relation q(n) = b(n)*q(n-1) + q(n-2), n >= 1, but then its index should be -1. - M. F. Hasler, Nov 01 2019
Number of 4-compositions of n restricted to odd parts (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
From Michael A. Allen, Feb 15 2023: (Start)
Also called the 4-metallonacci sequence; the g.f. 1/(1-k*x-x^2) gives the k-metallonacci sequence.
a(n+1) is the number of tilings of an n-board (a board with dimensions n X 1) using unit squares and dominoes (with dimensions 2 X 1) if there are 4 kinds of squares available. (End)
a(n) is the smallest nonnegative integer that is the sum of n, but no fewer, Fibonacci numbers including negative-index Fibonacci numbers (A039834), with that sum being a(n) = Sum_{i=0..n-1} A000045(3*i+1). a(n) is also the smallest nonnegative integer that is the sum of n, but no fewer, terms each of which is either a Fibonacci number or the negative of a Fibonacci number. (See A027941 for negatives disallowed.) - Mike Speciner, Oct 08 2023
From Enrique Navarrete, Dec 16 2023: (Start)
a(n) is the number of compositions of n when there are P(k) sorts of parts k, with k,n > = 1, where P(k) = A006190(k) is the k-th 3-metallonacci number (see example below).
In general, the number of compositions with k-metallonacci number of parts is counted by the (k+1)-st metallonacci sequence (note k=1 and k=2 are the Fibonacci and the Pell numbers, respectively). (End).
a(n) is the number of tilings of a 2 X n rectangle missing the top right 1 X 1 cell, using 1 X 1 squares, dominoes and right trominoes. Compare to A110679 which is the same problem but without the missing top right cell. - Greg Dresden and Yilin Zhu, Jul 10 2025

Examples

			1 2 9 38 161 (A001077)
-,-,-,--,---, ...
0 1 4 17 72 (A001076)
G.f. = x + 4*x^2 + 17*x^3 + 72*x^4 + 305*x^5 + 1292*x^6 + 5473*x^7 + 23184*x^8 + ...
From _Enrique Navarrete_, Dec 16 2023: (Start)
From the comment on compositions with 3-metallonacci sorts of parts, A006190(k), there are A006190(1)=1 type of 1, A006190(2)=3 types of 2, A006190(3)=10 types of 3, A006190(4)=33 types of 4, A006190(5)=109 types of 5 and A006190(6)=360 types of 6. The following table gives the number of compositions of n=6:
Composition, number of such compositions, number of compositions of this type:
 6,              1,      360;
 5+1,            2,      218;
 4+2,            2,      198;
 3+3,            1,      100;
 4+1+1,          3,       99;
 3+2+1,          6,      180;
 2+2+2,          1,       27;
 3+1+1+1,        4,       40;
 2+2+1+1,        6,       54;
 2+1+1+1+1,      5,       15;
 1+1+1+1+1+1,    1,        1;
for a total of a(6)=1292 compositions of n=6. (End)
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 23.
  • S. Koshkin, Non-classical linear divisibility sequences ..., Fib. Q., 57 (No. 1, 2019), 68-80. See Table 1.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • V. Thébault, Les Récréations Mathématiques. Gauthier-Villars, Paris, 1952, p. 282.

Crossrefs

Row n=4 of A073133, A172236 and A352361.
Cf. A000045, A001077, A015448, A175183 (Pisano periods).
Partial sums of A033887. First differences of A049652. Bisection of A059973.
Third column of array A028412.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=4*a[n-1]+a[n-2]; od; a; # Muniru A Asiru, Mar 31 2018
    
  • Magma
    I:=[0,1]; [n le 2 select I[n] else 4*Self(n-1) + Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 24 2018
    
  • Maple
    A001076:=-1/(-1+4*z+z**2); # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Join[{0}, Denominator[Convergents[Sqrt[5], 30]]] (* Harvey P. Dale, Dec 10 2011 *)
    a[ n_] := Fibonacci[3*n] / 2; (* Michael Somos, Feb 23 2014 *)
    a[ n_] := ((2 + Sqrt[5])^n - (2 - Sqrt[5])^n) /(2 Sqrt[5]) // Simplify; (* Michael Somos, Feb 23 2014 *)
    LinearRecurrence[{4, 1}, {0, 1}, 26] (* Jean-François Alcover, Sep 23 2017 *)
    a[ n_] := Fibonacci[n, 4]; (* Michael Somos, Nov 02 2021 *)
  • Maxima
    a(n):=sum(4^(n-1-2*k)*binomial(n-k-1,n-2*k-1),k,0,floor((n)/2));/* Vladimir Kruchinin, Oct 02 2022 */
  • MuPAD
    numlib::fibonacci(3*n)/2 $ n = 0..30; // Zerinvary Lajos, May 09 2008
    
  • PARI
    {a(n) = fibonacci(3*n) / 2}; /* Michael Somos, Aug 11 2009 */
    
  • PARI
    {a(n) = imag( (2 + quadgen(20))^n )}; /* Michael Somos, Feb 23 2014 */
    
  • PARI
    {a(n) = polchebyshev(n-1, 2, 2*I)/I^(n-1)}; /* Michael Somos, Nov 02 2021 */
    
  • Sage
    [lucas_number1(n,4,-1) for n in range(23)] # Zerinvary Lajos, Apr 23 2009
    
  • Sage
    [fibonacci(3*n)/2 for n in range(23)] # Zerinvary Lajos, May 15 2009
    

Formula

a(n) = 4*a(n-1) + a(n-2), n > 1. a(0)=0, a(1)=1.
G.f.: x/(1 - 4*x - x^2).
a(n) = ((2+sqrt(5))^n - (2-sqrt(5))^n)/(2*sqrt(5)).
a(n) = A014445(n)/2 = F(3n)/2.
a(n) = ((-i)^(n-1))*S(n-1, 4*i), with i^2 = -1 and S(n, x) := U(n, x/2) Chebyshev's polynomials of the second kind. See A049310. S(-1, x) = 0.
a(n) = Sum_{i=0..n} Sum_{j=0..n} Fibonacci(i+j)*n!/(i!j!(n-i-j)!)/2. - Paul Barry, Feb 06 2004
E.g.f.: exp(2*x)*sinh(sqrt(5)*x)/sqrt(5). - Vladeta Jovovic, Sep 01 2004
a(n) = F(1) + F(4) + F(7) + ... + F(3n-2), for n > 0.
Conjecture: 2a(n+1) = a(n+2) - A001077(n+1). - Creighton Dement, Nov 28 2004
a(n) = Sum_{k=0..n} Sum_{j=0..n} C(n, j)*C(j, k)*F(j)/2. - Paul Barry, Feb 14 2005
a(n) = A048876(n) - A048875(n). - Creighton Dement, Mar 19 2005
Let M = {{0, 1}, {1, 4}}, v[1] = {0, 1}, v[n] = M.v[n - 1]; then a(n) = v[n][[1]]. - Roger L. Bagula, May 29 2005
a(n) = F(n, 4), the n-th Fibonacci polynomial evaluated at x=4. - T. D. Noe, Jan 19 2006
[A015448(n), a(n)] = [1,4; 1,3]^n * [1,0]. - Gary W. Adamson, Mar 21 2008
a(n) = (Sum_{k=0..n} Fibonacci(3*k-2)) + 1. - Gary Detlefs, Dec 26 2010
a(n) = (3*(-1)^n*F(n) + 5*F(n)^3)/2, n >= 0. See the general D. Jennings formula given in a comment on triangle A111125, where also the reference is given. Here the second (k=1) row [3,1] applies. - Wolfdieter Lang, Sep 01 2012
Sum_{k>=1} (-1)^(k-1)/(a(k)*a(k+1)) = (Sum_{k>=1} (-1)^(k-1)/(F_k*F_(k+1)))^3 = phi^(-3), where F_n is the n-th Fibonacci numbers (A000045) and phi is golden ratio (A001622). - Vladimir Shevelev, Feb 23 2013
G.f.: Q(0)*x/(2-4*x), where Q(k) = 1 + 1/(1 - x*(5*k-4)/(x*(5*k+1) - 2/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Oct 11 2013
a(-n) = -(-1)^n * a(n). - Michael Somos, Feb 23 2014
The o.g.f. A(x) = x/(1 - 4*x - x^2) satisfies A(x) + A(-x) + 8*A(x)*A(-x) = 0 or equivalently (1 + 8*A(x))*(1 + 8*A(-x)) = 1. The o.g.f. for A049660 equals -A(sqrt(x))*A(-sqrt(x)). - Peter Bala, Apr 02 2015
From Rogério Serôdio, Mar 30 2018: (Start)
Some properties:
(1) a(n)*a(n+1) = 4*Sum_{k=1..n} a(k)^2;
(2) a(n)^2 + a(n+1)^2 = a(2*n+1);
(3) a(n)^2 - a(n-2)^2 = 4*a(n-1)*(a(n) + a(n-2));
(4) a(m*(p+1)) = a(m*p)*a(m+1) + a(m*p-1)*a(m);
(5) a(n-k)*a(n+k) = a(n)^2 + (-1)^(n+k+1)*a(k)^2;
(6) a(n-1)*a(n+1) = a(n)^2 + (-1)^n (particular case of (5)!);
(7) a(2*n) = 2*a(n)*(2*a(n) + a(n-1));
(8) 3*Sum_{k=2..n+1} a(k)*a(k-1) is equal to a(n+1)^2 if n odd, and is equal to a(n+1)^2 - 1 if n is even;
(9) a(n) - a(n-2*k+1) = alpha(k)*a(n-2*k+1) + a(n-4*k+2), where alpha(k) = (2+sqrt(5))^(2*k-1) + (2-sqrt(5))^(2*k-1);
(10) 31|Sum_{k=n..n+9} a(k), for all positive n. (End)
O.g.f.: x*exp(Sum_{n >= 1} Lucas(3*n)*x^n/n) = x + 4*x^2 + 17*x^3 + .... - Peter Bala, Oct 11 2019
a(n) = Sum_{k=0..floor(n/2)} 4^(n-2*k-1)*C(n-k-1,n-2*k-1). - Vladimir Kruchinin, Oct 02 2022
a(n) = i^(n-1)*S(n-1, -4*i), with i = sqrt(-1), and the Chebyshev S-polynomials (see A049310) with S(n, -1) = 0. - Gary Detlefs and Wolfdieter Lang, Mar 06 2023
G.f.: x/(1 - 4*x - x^2) = Sum_{n >= 0} x^(n+1) * ( Product_{k = 1..n} (m*k + 4 - m + x)/(1 + m*k*x) ) for arbitrary m (a telescoping series). - Peter Bala, May 08 2024
a(n) = 4^(n-1)*hypergeom([(1-n)/2, 1-n/2], [1-n], -1/4) for n > 0. - Peter Luschny, Mar 30 2025
a(n) = a(n-1) + A110679(n-1) + A110679(n-2) = a(n-1) + Fibonacci(3*n-2). - Greg Dresden and Yilin Zhu, Jul 10 2025

A172236 Array A(n,k) = n*A(n,k-1) + A(n,k-2) read by upward antidiagonals, starting A(n,0) = 0, A(n,1) = 1.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 2, 0, 1, 3, 5, 3, 0, 1, 4, 10, 12, 5, 0, 1, 5, 17, 33, 29, 8, 0, 1, 6, 26, 72, 109, 70, 13, 0, 1, 7, 37, 135, 305, 360, 169, 21, 0, 1, 8, 50, 228, 701, 1292, 1189, 408, 34, 0, 1, 9, 65, 357, 1405, 3640, 5473, 3927, 985, 55, 0, 1, 10, 82, 528, 2549, 8658, 18901, 23184, 12970, 2378, 89, 0, 1, 11, 101, 747, 4289, 18200, 53353, 98145, 98209, 42837, 5741, 144
Offset: 1

Views

Author

Roger L. Bagula, Jan 29 2010

Keywords

Comments

Equals A073133 with an additional column A(.,0).
If the first column and top row are deleted, antidiagonal reading yields A118243.
Adding a top row of 1's and antidiagonal reading downwards yields A157103.
Antidiagonal sums are 0, 1, 2, 5, 12, 32, 93, 297, 1035, 3911, 15917, 69350, ....
From Jianing Song, Jul 14 2018: (Start)
All rows have strong divisibility, that is, gcd(A(n,k_1), A(n,k_2)) = A(n,gcd(k_1,k_2)) holds for all k_1, k_2 >= 0.
Let E(n,m) be the smallest number l such that m divides A(n,l), we have: for odd primes p that are not divisible by n^2 + 4, E(n,p) divides p - ((n^2+4)/p) if p == 3 (mod 4) and (p - ((n^2+4)/p))/2 if p == 1 (mod 4). E(n,p) = p for odd primes p that are divisible by n^2 + 4. E(n,2) = 2 for even n and 3 for odd n. Here ((n^2+4)/p) is the Legendre symbol. A prime p such that p^2 divides T(n,E(n,p)) is called an n-Wall-Sun-Sun prime.
E(n,p^e) <= p^(e-1)*E(n,p) for all primes p. If p^2 does not divide A(n, E(n,p)), then E(n,p^e) = p^(e-1)*E(n,p) for all exponent e. Specially, for primes p >= 5 that are divisible by n^2 + 4, p^2 is never divisible by A(n,p), so E(n,p^e) = p^e as described above. E(n,m_1*m_2) = lcm(E(n,m_1),E(n,m_2)) if gcd(m_1,m_2) = 1.
Let pi(n,m) be the Pisano period of A(n, k) modulo m, i.e, the smallest number l such that A(n, k+1) == T(n,k) (mod m) holds for all k >= 0, we have: for odd primes p that are not divisible by n^2 - 4, pi(n,p) divides p - 1 if ((n^2+4)/p) = 1 and 2(p+1) if ((n^2+4)/p) = -1. pi(n,p) = 4p for odd primes p that are divisible by n^2 + 4. pi(n,2) = 2 even n and 3 for odd n.
pi(n,p^e) <= p^(e-1)*pi(n,p) for all primes p. If p^2 does not divide A(n, E(n,p)), then pi(n,p^e) = p^(e-1)*pi(n,p) for all exponent e. Specially, for primes p >= 5 that are divisible by n^2 + 4, p^2 is never divisible by A(n, p), so pi(n,p^e) = 4p^e as described above. pi(n,m_1*m_2) = lcm(pi(n,m_1), pi(n,m_2)) if gcd(m_1,m_2) = 1.
If n != 2, the largest possible value of pi(n,m)/m is 4 for even n and 6 for odd n. For even n, pi(n,p^e) = 4p^e; for odd n, pi(n,2p^e) = 12p^e, where p is any odd prime factor of n^2 + 4. For n = 2 it is 8/3, obtained by m = 3^e.
Let z(n,m) be the number of zeros in a period of A(n, k) modulo m, i.e., z(n,m) = pi(n,m)/E(n,m), then we have: z(n,p) = 4 for odd primes p that are divisible by n^2 + 4. For other odd primes p, z(n,p) = 4 if E(n,p) is odd; 1 if E(n,p) is even but not divisible by 4; 2 if E(n,p) is divisible by 4; see the table below. z(n,2) = z(n,4) = 1.
Among all values of z(n,p) when p runs through all odd primes that are not divisible by n^2 + 4, we have:
((n^2+4)/p)...p mod 8....proportion of 1.....proportion of 2.....proportion of 4
......1..........1......1/6 (conjectured)...2/3 (conjectured)...1/6 (conjectured)*
......1..........5......1/2 (conjectured)...........0...........1/2 (conjectured)*
......1.........3,7.............1...................0...................0
.....-1.........1,5.............0...................0...................1
.....-1.........3,7.............0...................1...................0
* The result is that among all odd primes that are not divisible by n^2 + 4, 7/24 of them are with z(n,p) = 1, 5/12 are with z(n,p) = 2 and 7/24 are with z(n,p) = 4 if n^2 + 4 is a twice a square; 1/3 of them are with z(n,p) = 1, 1/3 are with z(n,p) = 2 and 1/3 are with z(n,p) = 4 otherwise. [Corrected by Jianing Song, Jul 06 2019]
z(n,p^e) = z(n,p) for all odd primes p; z(n,2^e) = 1 for even n and 2 for odd n, e >= 3.
(End)
From Michael A. Allen, Mar 06 2023: (Start)
Removing the first (n=0) row of A352361 gives this sequence.
Row n is the n-metallonacci sequence.
A(n,k) is (for k>0) the number of tilings of a (k-1)-board (a board with dimensions (k-1) X 1) using unit squares and dominoes (with dimensions 2 X 1) if there are n kinds of squares available. (End)

Examples

			The array, A(n, k), starts in row n = 1 with columns k >= 0 as
  0      1      1      2      3      5      8
  0      1      2      5     12     29     70
  0      1      3     10     33    109    360
  0      1      4     17     72    305   1292
  0      1      5     26    135    701   3640
  0      1      6     37    228   1405   8658
  0      1      7     50    357   2549  18200
  0      1      8     65    528   4289  34840
  0      1      9     82    747   6805  61992
  0      1     10    101   1020  10301 104030
  0      1     11    122   1353  15005 166408
Antidiagonal triangle, T(n, k), begins as:
  0;
  0, 1;
  0, 1, 1;
  0, 1, 2,  2;
  0, 1, 3,  5,   3;
  0, 1, 4, 10,  12,   5;
  0, 1, 5, 17,  33,  29,    8;
  0, 1, 6, 26,  72, 109,   70,   13;
  0, 1, 7, 37, 135, 305,  360,  169,  21;
  0, 1, 8, 50, 228, 701, 1292, 1189, 408, 34;
		

Crossrefs

Rows n include: A000045 (n=1), A000129 (n=2), A006190 (n=3), A001076 (n=4), A052918 (n=5), A005668 (n=6), A054413 (n=7), A041025 (n=8), A099371 (n=9), A041041 (n=10), A049666 (n=11), A041061 (n=12), A140455 (n=13), A041085 (n=14), A154597 (n=15), A041113 (n=16), A178765 (n=17), A041145 (n=18), A243399 (n=19), A041181 (n=20). (Note that there are offset shifts for rows n = 5, 7, 8, 10, 12, 14, 16..20.)
Columns k include: A000004 (k=0), A000012 (k=1), A000027 (k=2), A002522 (k=3), A054602 (k=4), A057721 (k=5), A124152 (k=6).
Entry points for A(n,k) modulo m: A001177 (n=1), A214028 (n=2), A322907 (n=3).
Pisano period for A(n,k) modulo m: A001175 (n=1), A175181 (n=2), A175182 (n=3), A175183 (n=4), A175184 (n=5), A175185 (n=6).
Number of zeros in a period for A(n,k) modulo m: A001176 (n=1), A214027 (n=2), A322906 (n=3).
Sums include: A304357, A304359.
Similar to: A073133.

Programs

  • Magma
    A172236:= func< n,k | k le 1 select k else Evaluate(DicksonSecond(k-1,-1), n-k) >;
    [A172236(n,k): k in [0..n-1], n in [1..13]]; // G. C. Greubel, Sep 29 2024
    
  • Mathematica
    A172236[n_,k_]:=Fibonacci[k, n-k];
    Table[A172236[n, k], {n,15}, {k,0,n-1}]//Flatten
  • PARI
    A(n, k) = if (k==0, 0, if (k==1, 1, n*A(n, k-1) + A(n, k-2)));
    tabl(nn) = for(n=1, nn, for (k=0, nn, print1(A(n, k), ", ")); print); \\ Jianing Song, Jul 14 2018 (program from Michel Marcus; see also A316269)
    
  • PARI
    A(n, k) = ([n, 1; 1, 0]^k)[2, 1] \\ Jianing Song, Nov 10 2018
    
  • SageMath
    def A172236(n,k): return sum(binomial(k-j-1,j)*(n-k)^(k-2*j-1) for j in range(1+(k-1)//2))
    flatten([[A172236(n,k) for k in range(n)] for n in range(1,14)]) # G. C. Greubel, Sep 29 2024

Formula

A(n,k) = (((n + sqrt(n^2 + 4))/2)^k - ((n-sqrt(n^2 + 4))/2)^k)/sqrt(n^2 + 4), n >= 1, k >= 0. - Jianing Song, Jun 27 2018
For n >= 1, Sum_{i=1..k} 1/A(n,2^i) = ((u^(2^k-1) + v^(2^k-1))/(u + v)) * (1/A(n,2^k)), where u = (n + sqrt(n^2 + 4))/2, v = (n - sqrt(n^2 + 4))/2 are the two roots of the polynomial x^2 - n*x - 1. As a result, Sum_{i>=1} 1/A(n,2^i) = (n^2 + 4 - n*sqrt(n^2 + 4))/(2*n). - Jianing Song, Apr 21 2019
From G. C. Greubel, Sep 29 2024: (Start)
A(n, k) = F_{k}(n) (Fibonacci polynomials F_{n}(x)) (array).
T(n, k) = F_{k}(n-k) (antidiagonal triangle).
Sum_{k=0..n-1} T(n, k) = A304357(n) - (1-(-1)^n)/2.
Sum_{k=0..n-1} (-1)^k*T(n, k) = (-1)*A304359(n) + (1-(-1)^n)/2.
T(2*n, n) = A084844(n).
T(2*n+1, n+1) = A084845(n). (End)

Extensions

More terms from Jianing Song, Jul 14 2018

A175181 Pisano period of the 2-Fibonacci numbers A000129.

Original entry on oeis.org

1, 2, 8, 4, 12, 8, 6, 8, 24, 12, 24, 8, 28, 6, 24, 16, 16, 24, 40, 12, 24, 24, 22, 8, 60, 28, 72, 12, 20, 24, 30, 32, 24, 16, 12, 24, 76, 40, 56, 24, 10, 24, 88, 24, 24, 22, 46, 16, 42, 60, 16, 28, 108, 72, 24, 24, 40, 20, 40, 24, 124, 30, 24, 64, 84, 24, 136
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A000129 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 2 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[2*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s != t, cnt++]; cnt, {n, 100}] (* T. D. Noe, Jul 09 2012 *)

A175182 Pisano period of the 3-Fibonacci numbers A006190.

Original entry on oeis.org

1, 3, 2, 6, 12, 6, 16, 12, 6, 12, 8, 6, 52, 48, 12, 24, 16, 6, 40, 12, 16, 24, 22, 12, 60, 156, 18, 48, 28, 12, 64, 48, 8, 48, 48, 6, 76, 120, 52, 12, 28, 48, 42, 24, 12, 66, 96, 24, 112, 60, 16, 156, 26, 18, 24, 48, 40, 84, 24, 12, 30, 192, 48, 96, 156, 24, 136, 48, 22, 48, 144
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A006190 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 3 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[3*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, T. D. Noe *)

A175185 Pisano period of the 6-Fibonacci numbers A005668.

Original entry on oeis.org

1, 2, 2, 4, 20, 2, 16, 8, 6, 20, 24, 4, 6, 16, 20, 16, 36, 6, 8, 20, 16, 24, 48, 8, 100, 6, 18, 16, 60, 20, 30, 32, 24, 36, 80, 12, 12, 8, 6, 40, 40, 16, 42, 24, 60, 48, 96, 16, 112, 100, 36, 12, 26, 18, 120, 16, 8, 60, 40, 20, 124, 30, 48, 64, 60, 24, 22, 36, 48, 80, 70, 24, 148
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A005668 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 6 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[6*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, after T. D. Noe *)

A175184 Pisano period of the 5-Fibonacci numbers, A052918 preceded by 0.

Original entry on oeis.org

1, 3, 8, 6, 2, 24, 6, 12, 8, 6, 24, 24, 12, 6, 8, 24, 36, 24, 40, 6, 24, 24, 22, 24, 10, 12, 8, 6, 116, 24, 64, 48, 24, 36, 6, 24, 76, 120, 24, 12, 28, 24, 88, 24, 8, 66, 96, 24, 42, 30, 72, 12, 52, 24, 24, 12, 40, 348, 58, 24, 124, 192, 24, 96, 12, 24, 66, 36, 88, 6, 70, 24, 148
Offset: 1

Views

Author

R. J. Mathar, Mar 01 2010

Keywords

Comments

Period of the sequence defined by reading A052918 modulo n.

Crossrefs

Programs

  • Maple
    F := proc(k,n) option remember; if n <= 1 then n; else k*procname(k,n-1)+procname(k,n-2) ; end if; end proc:
    Pper := proc(k,m) local cha, zer,n,fmodm ; cha := [] ; zer := [] ; for n from 0 do fmodm := F(k,n) mod m ; cha := [op(cha),fmodm] ; if fmodm = 0 then zer := [op(zer),n] ; end if; if nops(zer) = 5 then break; end if; end do ; if [op(1..zer[2],cha) ] = [ op(zer[2]+1..zer[3],cha) ] and [op(1..zer[2],cha)] = [ op(zer[3]+1..zer[4],cha) ] and [op(1..zer[2],cha)] = [ op(zer[4]+1..zer[5],cha) ] then return zer[2] ; elif [op(1..zer[3],cha) ] = [ op(zer[3]+1..zer[5],cha) ] then return zer[3] ; else return zer[5] ; end if; end proc:
    k := 5 ; seq( Pper(k,m),m=1..80) ;
  • Mathematica
    Table[s = t = Mod[{0, 1}, n]; cnt = 1; While[tmp = Mod[5*t[[2]] + t[[1]], n]; t[[1]] = t[[2]]; t[[2]] = tmp; s!= t, cnt++]; cnt, {n, 100}] (* Vincenzo Librandi, Dec 20 2012, after T. D. Noe *)

A175289 Pisano period of A002605 modulo n.

Original entry on oeis.org

1, 1, 3, 1, 24, 3, 48, 1, 9, 24, 10, 3, 12, 48, 24, 1, 144, 9, 180, 24, 48, 10, 22, 3, 120, 12, 27, 48, 840, 24, 320, 1, 30, 144, 48, 9, 36, 180, 12, 24, 280, 48, 308, 10, 72, 22, 46, 3, 336, 120, 144, 12, 936, 27, 120, 48, 180, 840, 29, 24, 60, 320, 144, 1, 24, 30, 1122, 144
Offset: 1

Views

Author

R. J. Mathar, Mar 24 2010

Keywords

Comments

a(79)=6240. [John W. Layman, Aug 10 2010]

Examples

			Reading 0, 1, 2, 6, 16, 44, 120, 328, 896, 2448,.. modulo 12 gives 0, 1, 2, 6, 4, 8, 0, 4, 8, 0, 4, 8 ,.. with period length a(n=12)= 3.
		

Crossrefs

Programs

  • Mathematica
    a={1};For[n=2,n<=80,n++,{x={{0,1}}; t={1,1}; While[ !MemberQ[x,t], {xl = x[[ -1]]; AppendTo[x,t]; t={Mod[2*(t[[1]]+xl[[1]]),n], Mod[2*(t[[2]] + xl[[2]]),n]};}]; p = Flatten[Position[x,t]][[1]]; AppendTo[a, Length[x] - p+1];}]; Print[a]; (* John W. Layman, Aug 10 2010 *)

Extensions

Terms beyond a(28)=48 from John W. Layman, Aug 10 2010

A175291 Pisano period of A006130 modulo n.

Original entry on oeis.org

1, 3, 1, 6, 24, 3, 24, 6, 3, 24, 120, 6, 156, 24, 24, 12, 16, 3, 90, 24, 24, 120, 22, 6, 120, 156, 9, 24, 28, 24, 240, 24, 120, 48, 24, 6, 171, 90, 156, 24, 336, 24, 42, 120, 24, 66, 736, 12, 168, 120, 16, 156, 52, 9, 120, 24, 90, 84, 3480, 24, 20, 240, 24, 48, 312, 120, 748, 48, 22, 24, 5040, 6, 888, 171, 120, 90, 120, 156, 39
Offset: 1

Views

Author

R. J. Mathar, Mar 24 2010

Keywords

Examples

			Reading 0, 1, 1, 4, 7, 19, 40, 97, 217, 508, 1159, 2683, 6160, 14209, ... modulo n=7 gives 0, 1, 1, 4, 0, 5, 5, 6, 0, 4, 4, 2, 0, 6, 6, 3, 0, 2, 2, 1, 0, 3, 3, 5, 0, 1, 1, 4, 0, 5, 5, 6, 0, 4, 4, 2, 0, 6, 6, 3, 0, ... with period a(n=7)=24.
		

Crossrefs

Extensions

a(9) corrected by R. J. Mathar, Apr 18 2010
Showing 1-8 of 8 results.