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-10 of 17 results. Next

A006190 a(n) = 3*a(n-1) + a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 3, 10, 33, 109, 360, 1189, 3927, 12970, 42837, 141481, 467280, 1543321, 5097243, 16835050, 55602393, 183642229, 606529080, 2003229469, 6616217487, 21851881930, 72171863277, 238367471761, 787274278560, 2600190307441, 8587845200883, 28363725910090
Offset: 0

Views

Author

Keywords

Comments

Denominators of continued fraction convergents to (3+sqrt(13))/2. - Benoit Cloitre, Jun 14 2003
a(n) and A006497(n) occur in pairs: (a,b): (1,3), (3,11), (10,36), (33,119), (109,393), ... such that b^2 - 13a^2 = 4(-1)^n. - Gary W. Adamson, Jun 15 2003
Form the 4-node graph with matrix A = [1,1,1,1; 1,1,1,0; 1,1,0,1; 1,0,1,1]. Then this sequence counts the walks of length n from the vertex with degree 5 to one (any) of the other vertices. - Paul Barry, Oct 02 2004
a(n+1) is the binomial transform of A006138. - Paul Barry, May 21 2006
a(n+1) is the diagonal sum of the exponential Riordan array (exp(3x),x). - Paul Barry, Jun 03 2006
Number of paths in the right half-plane from (0,0) to the line x=n-1, consisting of steps U=(1,1), D=(1,-1), h=(1,0) and H=(2,0). Example: a(3)=10 because we have hh, H, UD, DU, hU, Uh, UU, hD, Dh and DD. - Emeric Deutsch, Sep 03 2007
Equals INVERT transform of A000129. Example: a(5) = 109 = (29, 12, 5, 2, 1) dot (1, 1, 3, 10, 33) = (29 + 12 + 15 + 20 + 33). - Gary W. Adamson, Aug 06 2010
For n >= 2, a(n) equals the permanent of the (n-1) X (n-1) tridiagonal matrix with 3's along the main diagonal, 1's along the superdiagonal and subdiagonal, and 0's everywhere else. - John M. Campbell, Jul 08 2011
These numbers could also be called "bronze Fibonacci numbers". Indeed, for n >= 1, F(n+1) = ceiling(phi*F(n)), if n is even and F(n+1) = floor(phi*F(n)), if n is odd, where phi is the golden ratio; analogously, for Pell numbers (A000129), or "silver Fibonacci numbers", P(n+1) = ceiling(delta*a(n)), if n is even and P(n+1) = floor(delta*a(n)), if n is odd, where delta = delta_S = 1 + sqrt(2) is the silver ratio. Here, for n >= 1, we have a(n+1) = ceiling(c*a(n)), if n is even and a(n+1) = floor(c*a(n)), if n is odd, where c = (3 + sqrt(13))/2 is the bronze ratio (cf. comment in A098316). - Vladimir Shevelev, Feb 23 2013
Let p(n,x) denote the Fibonacci polynomial, defined by p(1,x) = 1, p(2,x) = x, p(n,x) = x*p(n-1,x) + p(n-2,x). Let q(n,x) be the numerator polynomial of the rational function p(n, x + 1 + 1/x). Then q(n,1) = a(n). - Clark Kimberling, Nov 04 2013
The (1,1)-entry of the matrix A^n where A = [0,1,0; 1,2,1; 1,1,2]. - David Neil McGrath, Jul 18 2014
a(n+1) counts closed walks on K2, containing three loops on the other vertex. Equivalently the (1,1)-entry of A^(n+1) where the adjacency matrix of digraph is A = (0,1; 1,3). - David Neil McGrath, Oct 29 2014
For n >= 1, a(n) equals the number of words of length n-1 on alphabet {0,1,2,3} avoiding runs of zeros of odd lengths. - Milan Janjic, Jan 28 2015
With offset 1 is the INVERTi transform of A001076. - Gary W. Adamson, Jul 24 2015
Apart from the initial 0, this is the p-INVERT transform of (1,0,1,0,1,0,...) for p(S) = 1 - 3 S. See A291219. - Clark Kimberling, Sep 02 2017
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)
Numbers of straight-chain fatty acids involving oxo and/or hydroxy groups, if cis-/trans isomerism and stereoisomerism are neglected. - Stefan Schuster, Apr 04 2018
Number of 3-compositions of n restricted to odd parts (and allowed zeros); see Hopkins & Ouvry reference. - Brian Hopkins, Aug 17 2020
From Michael A. Allen, Jan 25 2023: (Start)
Also called the 3-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 3 kinds of squares available. (End)
a(n) is the number of compositions of n when there are P(k) sorts of parts k, with k,n >= 1, P(k) = A000129(k) is the k-th Pell number (see example below). - Enrique Navarrete, Dec 15 2023

Examples

			From _Enrique Navarrete_, Dec 15 2023: (Start)
From the comment on compositions with Pell number of parts, A000129(k), there are A000129(1)=1 type of 1, A000129(2)=2 types of 2, A000129(3)=5 types of 3, A000129(4)=12 types of 4, A000129(5)=29 types of 5 and A000129(6)=70 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,     70;
  5+1,            2,     58;
  4+2,            2,     48;
  3+3,            1,     25;
  4+1+1,          3,     36;
  3+2+1,          6,     60;
  2+2+2,          1,      8;
  3+1+1+1,        4,     20;
  2+2+1+1,        6,     24;
  2+1+1+1+1,      5,     10;
  1+1+1+1+1+1,    1,      1;
for a total of a(6)=360 compositions of n=6. (End).
		

References

  • H. L. Abbott and D. Hanson, A lattice path problem, Ars Combin., 6 (1978), 163-178.
  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 128.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • L.-N. Machaut, Query 3436, L'Intermédiaire des Mathématiciens, 16 (1909), 62-63. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Row sums of Pascal's rhombus (A059317). Also row sums of triangle A054456(n, m).
Sequences with g.f. 1/(1-k*x-x^2) or x/(1-k*x-x^2): A000045 (k=1), A000129 (k=2), this sequence (k=3), A001076 (k=4), A052918 (k=5), A005668 (k=6), A054413 (k=7), A041025 (k=8), A099371 (k=9), A041041 (k=10), A049666 (k=11), A041061 (k=12), A140455 (k=13), A041085 (k=14), A154597 (k=15), A041113 (k=16), A178765 (k=17), A041145 (k=18), A243399 (k=19), A041181 (k=20).
Cf. A006497, A052906, A175182 (Pisano periods), A201001 (prime subsequence), A092936 (squares).
Cf. A243399.

Programs

  • GAP
    a:=[0,1];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # Muniru A Asiru, Mar 31 2018
  • Haskell
    a006190 n = a006190_list !! n
    a006190_list = 0 : 1 : zipWith (+) (map (* 3) $ tail a006190_list) a006190_list
    -- Reinhard Zumkeller, Feb 19 2011
    
  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else 3*Self(n-1)+Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    a[0]:=0: a[1]:=1: for n from 2 to 35 do a[n]:= 3*a[n-1]+a[n-2] end do: seq(a[n],n=0..30); # Emeric Deutsch, Sep 03 2007
    A006190:=-1/(-1+3*z+z**2); # Simon Plouffe in his 1992 dissertation, without the leading 0
    seq(combinat[fibonacci](n,3),n=0..30); # R. J. Mathar, Dec 07 2011
  • Mathematica
    a[n_] := (MatrixPower[{{1, 3}, {1, 2}}, n].{{1}, {1}})[[2, 1]]; Table[ a[n], {n, -1, 24}] (* Robert G. Wilson v, Jan 13 2005 *)
    LinearRecurrence[{3,1},{0,1},30] (* or *) CoefficientList[Series[x/ (1-3x-x^2), {x,0,30}], x] (* Harvey P. Dale, Apr 20 2011 *)
    Table[If[n==0, a1=1; a0=0, a2=a1; a1=a0; a0=3*a1+a2], {n, 0, 30}] (* Jean-François Alcover, Apr 30 2013 *)
    Table[Fibonacci[n, 3], {n, 0, 30}] (* Vladimir Reshetnikov, May 08 2016 *)
  • PARI
    a(n)=if(n<1,0,contfracpnqn(vector(n,i,2+(i>1)))[2,1])
    
  • PARI
    a(n)=([1,3;1,2]^n)[2,1] \\ Charles R Greathouse IV, Mar 06 2014
    
  • PARI
    concat([0],Vec(x/(1-3*x-x^2)+O(x^30))) \\ Joerg Arndt, Apr 30 2013
    
  • Sage
    [lucas_number1(n,3,-1) for n in range(0, 30)] # Zerinvary Lajos, Apr 22 2009
    

Formula

G.f.: x/(1 - 3*x - x^2).
From Benoit Cloitre, Jun 14 2003: (Start)
a(3*n) = 2*A041019(5*n-1), a(3*n+1) = A041019(5*n), a(3*n+2) = A041019(5*n+3).
a(2*n) = 3*A004190(n-1); a(3*n) = 10*A041613(n-1) for n >= 1. (End)
From Gary W. Adamson, Jun 15 2003: (Start)
a(n-1) + a(n+1) = A006497(n).
A006497(n)^2 - 13*a(n)^2 = 4(-1)^n. (End)
a(n) = U(n-1, (3/2)i)(-i)^(n-1), i^2 = -1. - Paul Barry, Nov 19 2003
a(n) = Sum_{k=0..n-1} binomial(n-k-1,k)*3^(n-2*k-1). - Paul Barry, Oct 02 2004
a(n) = F(n, 3), the n-th Fibonacci polynomial evaluated at x=3.
Let M = {{0, 1}, {1, 3}}, v[1] = {0, 1}, v[n] = M.v[n - 1]; then a(n) = Abs[v[n][[1]]]. - Roger L. Bagula, May 29 2005 [Or a(n) = [M^(n+1)]{1,1}. - _L. Edson Jeffery, Aug 27 2013]
From Paul Barry, May 21 2006: (Start)
a(n+1) = Sum_{k=0..n} Sum_{j=0..n-k} C(k,j)*C(n-j,k)*2^(k-j).
a(n) = Sum_{k=0..n} Sum_{j=0..n-k} C(k,j)*C(n-j,k)*2^(n-j-k).
a(n+1) = Sum_{k=0..floor(n/2)} C(n-k,k)*3^(n-2*k).
a(n) = Sum_{k=0..n} C(k,n-k)*3^(2*k-n). (End)
E.g.f.: exp(3*x/2)*sinh(sqrt(13)*x/2)/(sqrt(13)/2). - Paul Barry, Jun 03 2006
a(n) = (ap^n - am^n)/(ap - am), with ap = (3 + sqrt(13))/2, am = (3 - sqrt(13))/2.
Let C = (3 + sqrt(13))/2 = exp arcsinh(3/2) = 3.3027756377... Then C^n, n > 0 = a(n)*(1/C) + a(n+1). Let X = the 2 X 2 matrix [0, 1; 1, 3]. Then X^n = [a(n-1), a(n); a(n), a(n+1)]. - Gary W. Adamson, Dec 21 2007
1/3 = 3/(1*10) + 3/(3*33) + 3/(10*109) + 3/(33*360) + 3/(109*1189) + ... . - Gary W. Adamson, Mar 16 2008
a(n) = ((3 + sqrt(13))^n - (3 - sqrt(13))^n)/(2^n*sqrt(13)). - Al Hakanson (hawkuu(AT)gmail.com), Jan 12 2009
a(p) == 13^((p-1)/2) mod p, for odd primes p. - Gary W. Adamson, Feb 22 2009
From Johannes W. Meijer, Jun 12 2010: (Start)
Limit_{k->oo} a(n+k)/a(k) = (A006497(n) + a(n)*sqrt(13))/2.
Limit_{n->oo} A006497(n)/a(n) = sqrt(13). (End)
Sum_{k>=1} (-1)^(k-1)/(a(k)*a(k+1)) = (sqrt(13)-3)/2. - Vladimir Shevelev, Feb 23 2013
From Vladimir Shevelev, Feb 24 2013: (Start)
(1) Expression a(n+1) via a(n): a(n+1) = (3*a(n) + sqrt(13*a(n)^2 + 4*(-1)^n))/2;
(2) a^2(n+1) - a(n)*a(n+2) = (-1)^n;
(3) Sum_{k=1..n} (-1)^(k-1)/(a(k)*a(k+1)) = a(n)/a(n+1);
(4) a(n)/a(n+1) = (sqrt(13)-3)/2 + r(n), where |r(n)| < 1/(a(n+1)*a(n+2)). (End)
a(n) = sqrt(13*(A006497(n))^2 + (-1)^(n-1)*52)/13. - Vladimir Shevelev, Mar 13 2013
Sum_{n >= 1} 1/( a(2*n) + 1/a(2*n) ) = 1/3; Sum_{n >= 1} 1/( a(2*n + 1) - 1/a(2*n + 1) ) = 1/9. - Peter Bala, Mar 26 2015
From Rogério Serôdio, Mar 30 2018: (Start)
Some properties:
(1) a(n)*a(n+1) = 3*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 = 3*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(2*n) = a(n)*(3*a(n) + 2*a(n-1));
(7) 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;
(8) a(n) = alpha(k)*a(n-2*k+1) + a(n-4*k+2), where alpha(k) = ap^(2*k-1) + am^(2*k-1), with ap = (3 + sqrt(13))/2, am = (3 - sqrt(13))/2;
(9) 131|Sum_{k=n..n+9} a(k), for all positive n. (End)
From Kai Wang, Feb 10 2020: (Start)
a(n)^2 - a(n+r)*a(n-r) = (-1)^(n-r)*a(r)^2 - Catalan's identity.
arctan(1/a(2n)) - arctan(1/a(2n+2)) = arctan(a(2)/a(2n+1)).
arctan(1/a(2n)) = Sum_{m>=n} arctan(a(2)/a(2m+1)).
The same formula holds for Fibonacci numbers and Pell numbers. (End)
a(n+2) = 3^(n+1) + Sum_{k=0..n} a(k)*3^(n-k). - Greg Dresden and Gavron Campbell, Feb 22 2022
G.f. = 1/(1-Sum_{k>=1} P(k)*x^k), P(k)=A000129(k) (with a(0)=1). - Enrique Navarrete, Dec 17 2023
G.f.: x/(1 - 3*x - x^2) = Sum_{n >= 0} x^(n+1) *( Product_{k = 1..n} (m*k + 3 - m + x)/(1 + m*k*x) ) for arbitrary m (a telescoping series). - Peter Bala, May 08 2024
Sum_{n>=0} a(n)/phi^(3*n) = 1, where phi = A001622 is the golden ratio. - Diego Rattaggi, Apr 07 2025

Extensions

Second formula corrected by Johannes W. Meijer, Jun 02 2010

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 *)

A322906 The number of zeros in the fundamental Pisano period of the 3-Fibonacci numbers A006190 modulo n.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 2, 2, 1, 4, 2, 1, 4, 2, 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 4, 4, 1, 2, 4, 2, 2, 2, 2, 2, 2, 1, 4, 2, 2, 2, 4, 2, 1, 2, 2, 1, 2, 2, 2, 4, 2, 2, 1, 1, 2, 2, 2, 4, 2, 2, 1, 2, 2, 2, 4, 2, 2, 2, 1, 2, 2, 2, 4, 4, 2, 2, 2, 2, 1, 2, 1, 4, 2, 2, 2, 1, 2
Offset: 1

Views

Author

Jianing Song, Jan 05 2019

Keywords

Comments

a(n) is the multiplicative order of A006190(A322907(n)+1) modulo n.
a(n) has value 1, 2 or 4. This is because A006190(k,m+1)^4 == 1 (mod A006190(k,m)).
Conjecture: For primes p == 1, 9, 17, 25, 49, 81 (mod 104), the probability of a(p^e) taking on the value 1, 2, 4 is 1/6, 2/3, 1/6, respectively; for primes p == 29, 53, 61, 69, 77, 101 (mod 104), the probability of a(p^e) taking on the value 1, 4 is 1/2, 1/2, respectively.

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = k*x(n+1) + x(n). Then the periods, ranks and the ratios of the periods to the ranks modulo a given integer n are given by:
k = 1: A001175 (periods), A001177 (ranks), A001176 (ratios).
k = 2: A175181 (periods), A214028 (ranks), A214027 (ratios).
k = 3: A175182 (periods), A322907 (ranks), this sequence (ratios).

Programs

  • PARI
    A006190(m) = ([3, 1; 1, 0]^m)[2, 1]
    a(n) = my(i=1); while(A006190(i)%n!=0, i++); znorder(Mod(A006190(i+1), n))

Formula

For n > 2, T(n,k) = 4 iff A322907(n) is odd; 1 iff A322907(n) is even but not divisible by 4; 2 iff A322907(n) is divisible by 4.
For primes p == 3, 23, 27, 35, 43, 51 (mod 52), a(p^e) = 1.
For primes p == 5, 21, 33, 37, 41, 45 (mod 52), a(p^e) = 4.
For primes p == 7, 11, 15, 19, 31, 47 (mod 52), a(p^e) = 2.
a(13^e) = 4. a(2^e) = 1 if e = 1, 2 and 2 if e >= 3.
a(n) = A175182(n)/A322907(n).

A309586 Primes p with 1 zero in a fundamental period of A006190 mod p.

Original entry on oeis.org

2, 3, 23, 43, 53, 61, 79, 101, 103, 107, 127, 131, 139, 173, 179, 191, 199, 211, 251, 263, 277, 283, 311, 347, 367, 419, 433, 439, 443, 467, 491, 503, 523, 547, 563, 569, 571, 599, 607, 647, 659, 677, 719, 727, 751, 757, 823, 829, 859, 881, 883, 887, 907
Offset: 1

Views

Author

Jianing Song, Aug 10 2019

Keywords

Comments

Primes p such that A322906(p) = 1.
For p > 2, p is in this sequence if and only if A175182(p) == 2 (mod 4), and if and only if A322907(p) == 2 (mod 4). For a proof of the equivalence between A322906(p) = 1 and A322907(p) == 2 (mod 4), see Section 2 of my link below.
This sequence contains all primes congruent to 3, 23, 27, 35, 43, 51 modulo 52. This corresponds to case (3) for k = 11 in the Conclusion of Section 1 of my link below.
Conjecturely, this sequence has density 1/3 in the primes. [Comment rewritten by Jianing Song, Jun 16 2024 and Jun 25 2024]

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = m*x(n+1) + x(n). Let w(k) be the number of zeros in a fundamental period of {x(n)} modulo k.
| m=1 | m=2 | m=3
-----------------------------+----------+---------+----------
The sequence {x(n)} | A000045 | A000129 | A006190
The sequence {w(k)} | A001176 | A214027 | A322906
Primes p such that w(p) = 1 | A112860* | A309580 | this seq
Primes p such that w(p) = 2 | A053027 | A309581 | A309587
Primes p such that w(p) = 4 | A053028 | A261580 | A309588
Numbers k such that w(k) = 1 | A053031 | A309583 | A309591
Numbers k such that w(k) = 2 | A053030 | A309584 | A309592
Numbers k such that w(k) = 4 | A053029 | A309585 | A309593
* and also A053032 U {2}

Programs

  • PARI
    forprime(p=2, 900, if(A322906(p)==1, print1(p, ", ")))

A309587 Primes p with 2 zeros in a fundamental period of A006190 mod p.

Original entry on oeis.org

7, 11, 17, 19, 31, 47, 59, 67, 71, 83, 113, 151, 163, 167, 223, 227, 239, 257, 271, 307, 313, 331, 337, 359, 379, 383, 431, 463, 479, 487, 499, 521, 587, 601, 619, 631, 641, 643, 673, 683, 691, 739, 743, 787, 809, 811, 827, 839, 863, 947, 967, 983
Offset: 1

Views

Author

Jianing Song, Aug 10 2019

Keywords

Comments

Primes p such that A322906(p) = 2.
For p > 2, p is in this sequence if and only if 8 divides A175182(p), and if and only if 4 divides A322907(p). For a proof of the equivalence between A322906(p) = 2 and 4 dividing A322907(p), see Section 2 of my link below.
This sequence contains all primes congruent to 7, 11, 15, 19, 31, 47 modulo 52. This corresponds to case (2) for k = 11 in the Conclusion of Section 1 of my link below.
Conjecturely, this sequence has density 1/3 in the primes. [Comment rewritten by Jianing Song, Jun 16 2024 and Jun 25 2024]

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = m*x(n+1) + x(n). Let w(k) be the number of zeros in a fundamental period of {x(n)} modulo k.
| m=1 | m=2 | m=3
-----------------------------+----------+---------+----------
The sequence {x(n)} | A000045 | A000129 | A006190
The sequence {w(k)} | A001176 | A214027 | A322906
Primes p such that w(p) = 1 | A112860* | A309580 | A309586
Primes p such that w(p) = 2 | A053027 | A309581 | this seq
Primes p such that w(p) = 4 | A053028 | A261580 | A309588
Numbers k such that w(k) = 1 | A053031 | A309583 | A309591
Numbers k such that w(k) = 2 | A053030 | A309584 | A309592
Numbers k such that w(k) = 4 | A053029 | A309585 | A309593
* and also A053032 U {2}

Programs

  • PARI
    forprime(p=2, 1000, if(A322906(p)==2, print1(p, ", ")))

A309588 Primes p with 4 zeros in a fundamental period of A006190 mod p.

Original entry on oeis.org

5, 13, 29, 37, 41, 73, 89, 97, 109, 137, 149, 157, 181, 193, 197, 229, 233, 241, 269, 281, 293, 317, 349, 353, 373, 389, 397, 401, 409, 421, 449, 457, 461, 509, 541, 557, 577, 593, 613, 617, 653, 661, 701, 709, 733, 761, 769, 773, 797, 821, 853, 857, 877
Offset: 1

Views

Author

Jianing Song, Aug 10 2019

Keywords

Comments

Primes p such that A322906(p) = 4.
For p > 2, p is in this sequence if and only if A175182(p) == 4 (mod 8), and if and only if A322907(p) is odd. For a proof of the equivalence between A322906(p) = 4 and A322907(p) being odd, see Section 2 of my link below.
This sequence contains all primes congruent to 5, 21, 33, 37, 41, 45 modulo 52. This corresponds to case (1) for k = 11 in the Conclusion of Section 1 of my link below.
Conjecturely, this sequence has density 1/3 in the primes. [Comment rewritten by Jianing Song, Jun 16 2024 and Jun 25 2024]

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = m*x(n+1) + x(n). Let w(k) be the number of zeros in a fundamental period of {x(n)} modulo k.
| m=1 | m=2 | m=3
-----------------------------+----------+---------+----------
The sequence {x(n)} | A000045 | A000129 | A006190
The sequence {w(k)} | A001176 | A214027 | A322906
Primes p such that w(p) = 1 | A112860* | A309580 | A309586
Primes p such that w(p) = 2 | A053027 | A309581 | A309587
Primes p such that w(p) = 4 | A053028 | A261580 | this seq
Numbers k such that w(k) = 1 | A053031 | A309583 | A309591
Numbers k such that w(k) = 2 | A053030 | A309584 | A309592
Numbers k such that w(k) = 4 | A053029 | A309585 | A309593
* and also A053032 U {2}

Programs

  • PARI
    forprime(p=2, 900, if(A322906(p)==4, print1(p, ", ")))

A309591 Numbers k with 1 zero in a fundamental period of A006190 mod k.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 12, 18, 23, 27, 36, 43, 46, 53, 54, 61, 69, 79, 81, 86, 92, 101, 103, 106, 107, 108, 122, 127, 129, 131, 138, 139, 158, 159, 162, 172, 173, 179, 183, 191, 199, 202, 206, 207, 211, 212, 214, 237, 243, 244, 251, 254, 258, 262, 263, 276
Offset: 1

Views

Author

Jianing Song, Aug 10 2019

Keywords

Comments

Numbers k such that A322906(k) = 1.
The odd numbers k satisfy A175182(k) == 2 (mod 4).

Crossrefs

Cf. A175182.
Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = m*x(n+1) + x(n). Let w(k) be the number of zeros in a fundamental period of {x(n)} modulo k.
| m=1 | m=2 | m=3
-----------------------------+----------+---------+----------
The sequence {x(n)} | A000045 | A000129 | A006190
The sequence {w(k)} | A001176 | A214027 | A322906
Primes p such that w(p) = 1 | A112860* | A309580 | A309586
Primes p such that w(p) = 2 | A053027 | A309581 | A309587
Primes p such that w(p) = 4 | A053028 | A261580 | A309588
Numbers k such that w(k) = 1 | A053031 | A309583 | this seq
Numbers k such that w(k) = 2 | A053030 | A309584 | A309592
Numbers k such that w(k) = 4 | A053029 | A309585 | A309593
* and also A053032 U {2}

Programs

  • PARI
    for(k=1, 300, if(A322906(k)==1, print1(k, ", ")))

A309592 Numbers k with 2 zeros in a fundamental period of A006190 mod k.

Original entry on oeis.org

7, 8, 11, 14, 15, 16, 17, 19, 20, 21, 22, 24, 28, 30, 31, 32, 33, 34, 35, 38, 39, 40, 42, 44, 45, 47, 48, 49, 51, 52, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 68, 70, 71, 72, 75, 76, 77, 78, 80, 83, 84, 85, 87, 88, 90, 91, 93, 94, 95, 96, 98, 99, 100, 102, 104
Offset: 1

Views

Author

Jianing Song, Aug 10 2019

Keywords

Comments

Numbers k such that A322906(k) = 2.
This sequence contains all numbers k such that 4 divides A322907(k). As a consequence, this sequence contains all numbers congruent to 7, 11, 15, 19, 31, 47 modulo 52.
This sequence contains all odd numbers k such that 8 divides A175182(k).

Crossrefs

Let {x(n)} be a sequence defined by x(0) = 0, x(1) = 1, x(n+2) = m*x(n+1) + x(n). Let w(k) be the number of zeros in a fundamental period of {x(n)} modulo k.
| m=1 | m=2 | m=3
-----------------------------+----------+---------+----------
The sequence {x(n)} | A000045 | A000129 | A006190
The sequence {w(k)} | A001176 | A214027 | A322906
Primes p such that w(p) = 1 | A112860* | A309580 | A309586
Primes p such that w(p) = 2 | A053027 | A309581 | A309587
Primes p such that w(p) = 4 | A053028 | A261580 | A309588
Numbers k such that w(k) = 1 | A053031 | A309583 | A309591
Numbers k such that w(k) = 2 | A053030 | A309584 | this seq
Numbers k such that w(k) = 4 | A053029 | A309585 | A309593
* and also A053032 U {2}

Programs

  • PARI
    for(k=1, 100, if(A322906(k)==2, print1(k, ", ")))

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 *)
Showing 1-10 of 17 results. Next