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.

Previous Showing 41-50 of 176 results. Next

A030132 Digital root of Fibonacci(n).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9, 1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8
Offset: 0

Views

Author

youngelder(AT)webtv.net (Ana)

Keywords

Comments

Any initial pair (a(0), a(1)) of nonzero single-digit numbers enters a cycle of length 24, except for the 8 cases where 3 divides both a(0), a(1) and (a(0), a(1)) != (9, 9), which enter a cycle of length 8 and (9, 9), which is immediately periodic of period length 1. - Jonathan Vos Post, Dec 29 2005 [Corrected by Jianing Song, Apr 17 2021]
First term that differs from A004090 is a(10). In general, all terms of A004090 having one digit are the same in this sequence. - Alonso del Arte, Sep 16 2012
Decimal expansion of 12484270798876404618091 / 1111111111111111111111110 = 0.0[112358437189887641562819] (periodic). - Daniel Forgues, Feb 27 2017

Examples

			a(10) = 1 because F(10) = 55, and since 5 + 5 = 10 and 1 + 0 = 1 is the digital root of 55.
		

Crossrefs

Cf. A000045 (Fibonacci numbers), A010888 (digital roots), A004090, A007953, A030133.

Programs

  • Haskell
    a030132 n = a030132_list !! n
    a030132_list =
       0 : 1 : map a007953 (zipWith (+) a030132_list (tail a030132_list))
    -- Reinhard Zumkeller, Aug 20 2011
    
  • Mathematica
    digitalRoot[n_Integer?Positive] := FixedPoint[Plus@@IntegerDigits[#]&, n]; Table[If[n == 0, 0, digitalRoot[Fibonacci[n]]], {n, 0, 100}] (* Vladimir Joseph Stephan Orlovsky, May 02 2011 *)
    Table[NestWhile[Total[IntegerDigits[#]]&, Fibonacci[n], # > 9 &], {n, 0, 90}] (* Harvey P. Dale, May 07 2012 *)
    PadRight[{0},120,{9,1,1,2,3,5,8,4,3,7,1,8,9,8,8,7,6,4,1,5,6,2,8,1}] (* Harvey P. Dale, Jul 20 2024 *)
  • PARI
    a(n)=if(n,(fibonacci(n)-1)%9+1,0) \\ Charles R Greathouse IV, Jan 23 2013

Formula

a(n + 1) = sum of digits of (a(n) + a(n - 1)).
Periodic with period 24 = A001175(9) given by {1, 1, 2, 3, 5, 8, 4, 3, 7, 1, 8, 9, 8, 8, 7, 6, 4, 1, 5, 6, 2, 8, 1, 9}.
a(n) + a(n + 1) = A010077(n + 4); a(A017641(n)) = 9. - Reinhard Zumkeller, Jul 04 2007
G.f.: x*( -1 -x -2*x^2 -3*x^3 -5*x^4 -8*x^5 -4*x^6 -3*x^7 -7*x^8 -x^9 -8*x^10 -9*x^11 -8*x^12 -8*x^13 -7*x^14 -6*x^15 -4*x^16 -x^17 -5*x^18 -6*x^19 -2*x^20 -8*x^21 -x^22 -9*x^23 ) / ( (x-1) *(1+x+x^2) *(1+x) *(1-x+x^2) *(1+x^2) *(x^4-x^2+1) *(1+x^4) *(x^8-x^4+1) ). - R. J. Mathar, Feb 08 2013

Extensions

Entry revised by N. J. A. Sloane, Aug 29 2004

A046738 Period of Fibonacci 3-step sequence A000073 mod n.

Original entry on oeis.org

1, 4, 13, 8, 31, 52, 48, 16, 39, 124, 110, 104, 168, 48, 403, 32, 96, 156, 360, 248, 624, 220, 553, 208, 155, 168, 117, 48, 140, 1612, 331, 64, 1430, 96, 1488, 312, 469, 360, 2184, 496, 560, 624, 308, 440, 1209, 2212, 46, 416, 336, 620, 1248, 168
Offset: 1

Views

Author

Keywords

Comments

Could also be called the tribonacci Pisano periods. [Carl R. White, Oct 05 2009]
Klaska notes that n=208919=59*3541 satisfies a(n) = a(n^2). - Michel Marcus, Mar 03 2016
39, 78, 273, 546 also satisfy a(n) = a(n^2). - Michel Marcus, Mar 07 2016

Crossrefs

Cf. A106302.
Cf. A001175.

Programs

  • Maple
    a:= proc(n) local f, k, l; l:= ifactors(n)[2];
          if nops(l)<>1 then ilcm(seq(a(i[1]^i[2]), i=l))
        else f:= [0, 0, 1];
             for k do f:=[f[2], f[3], f[1]+f[2]+f[3] mod n];
                      if f=[0, 0, 1] then break fi
             od; k
          fi
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 27 2023
  • Mathematica
    Table[a = {0, 1, 1}; a = a0 = Mod[a, n]; k = 0; While[k++; s = a[[3]] + a[[2]] + a[[1]]; a = RotateLeft[a]; a[[-1]] = Mod[s, n]; a != a0]; k, {n, 100}] (* T. D. Noe, Aug 28 2012 *)
  • Python
    from itertools import count
    def A046738(n):
        a = b = (0,0,1%n)
        for m in count(1):
            b = b[1:] + (sum(b) % n,)
            if a == b:
                return m # Chai Wah Wu, Feb 27 2022

Formula

a(3^k) = 13*3^(k-1) for k > 0. If a(p) != a(p^2) for p prime, then a(p^k) = p^(k-1)*a(p) for k > 0 [Waddill, 1978]. - Chai Wah Wu, Feb 25 2022
Let the prime factorization of n be p1^e1*...*pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)) [Waddill, 1978]. - Avery Diep, Aug 26 2025

A089911 a(n) = Fibonacci(n) mod 12.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0, 1, 1, 2, 3, 5, 8, 1, 9, 10, 7, 5, 0, 5, 5, 10, 3, 1, 4, 5, 9, 2, 11, 1, 0, 1, 1
Offset: 0

Views

Author

Casey Mongoven, Nov 14 2003

Keywords

Comments

From Reinhard Zumkeller, Jul 05 2013: (Start)
Sequence has been applied by several composers to 12-tone equal temperament pitch structure. The complete Fibonacci mod 12 system (a set of 10 periodic sequences) exhausts all possible ordered dyads; that is, every possible combination of two pitches is found in these sets.
a(A008594(n)) = 0;
a(A227144(n)) = 1;
a(3*A047522(n)) = 2;
a(A017569(n)) = a(2*A016933(n)) = a(4*A016777(n)) = 3;
a(2*A017629(n)) = a(3*A017137(n)) = a(6*A004767(n)) = 4;
a(A227146(n)) = 5;
a(nonexistent) = 6;
a(2*A017581(n)) = 7;
a(2*A017557(n)) = a(4*A016813(n)) = 8;
a(A017617(n)) = a(2*A016957(n)) = a(4*A016789(n)) = 9;
a(3*A047621(n)) = 10;
a(2*A017653(n)) = 11. (End)

Crossrefs

Programs

  • Haskell
    a089911 n = a089911_list !! n
    a089911_list = 0 : 1 : zipWith (\u v -> (u + v) `mod` 12)
                           (tail a089911_list) a089911_list
    -- Reinhard Zumkeller, Jul 01 2013
    
  • Magma
    [Fibonacci(n) mod 12: n in [0..100]]; // Vincenzo Librandi, Feb 04 2014
  • Maple
    with(combinat,fibonacci); A089911 := proc(n) fibonacci(n) mod 12; end;
  • Mathematica
    Table[Mod[Fibonacci[n], 12], {n, 0, 100}] (* Vincenzo Librandi, Feb 04 2014 *)
  • PARI
    a(n)=fibonacci(n)%12 \\ Charles R Greathouse IV, Feb 03 2014
    

Formula

Has period of 24, restricted period 12 and multiplier 5.
a(n) = (a(n-1) + a(n-2)) mod 12, a(0) = 0, a(1) = 1.

Extensions

More terms from Ray Chandler, Nov 15 2003

A001060 a(n) = a(n-1) + a(n-2) with a(0)=2, a(1)=5. Sometimes called the Evangelist Sequence.

Original entry on oeis.org

2, 5, 7, 12, 19, 31, 50, 81, 131, 212, 343, 555, 898, 1453, 2351, 3804, 6155, 9959, 16114, 26073, 42187, 68260, 110447, 178707, 289154, 467861, 757015, 1224876, 1981891, 3206767, 5188658, 8395425, 13584083, 21979508, 35563591, 57543099, 93106690, 150649789
Offset: 0

Views

Author

Keywords

Comments

Literally the same as A013655(n+1), since A001060(-1) = A013655(0) = 3. - Eric W. Weisstein, Jun 30 2017
Used by the Sofia Gubaidulina and other composers. - Ian Stewart, Jun 07 2012
From a(2) on, sums of five consecutive Fibonacci numbers; the subset of primes is essentially in A153892. - R. J. Mathar, Mar 24 2010
Pisano period lengths: 1, 3, 8, 6, 20, 24, 16, 12, 24, 60, 10, 24, 28, 48, 40, 24, 36, 24, 18, 60, ... (is this A001175?). - R. J. Mathar, Aug 10 2012
Also the number of independent vertex sets and vertex covers in the (n+1)-pan graph. - Eric W. Weisstein, Jun 30 2017
From Wajdi Maaloul, Jun 10 2022: (Start)
For n > 0, a(n) is the number of ways to tile the figure below with squares and dominoes (a strip of length n+1 that contains a vertical strip of height 3 in its second tile). For instance, a(4) is the number of ways to tile this figure (of length 5) with squares and dominoes.
_
|_|
||_______
|||_|||_|
(End)

References

  • R. V. Jean, Mathematical Approach to Pattern and Form in Plant Growth, Wiley, 1984. See p. 5.
  • 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).

Crossrefs

Apart from initial term, same as A013655.

Programs

  • GAP
    F:=Fibonacci;; List([0..40], n-> F(n+4) - F(n-1) ); # G. C. Greubel, Sep 19 2019
  • Magma
    I:=[2,5]; [n le 2 select I[n] else Self(n-1)+Self(n-2): n in [1..50]]; // Vincenzo Librandi, Jan 16 2012
    
  • Magma
    a0:=2; a1:=5; [GeneralizedFibonacciNumber(a0, a1, n): n in [0..35]]; // Bruno Berselli, Feb 12 2013
    
  • Maple
    with(combinat): a:= n-> 2*fibonacci(n)+fibonacci(n+3): seq(a(n), n=0..40); # Zerinvary Lajos, Oct 05 2007
    A001060:=-(2+3*z)/(-1+z+z**2); # conjectured by Simon Plouffe in his 1992 dissertation
  • Mathematica
    Table[Fibonacci[n+4] -Fibonacci[n-1], {n, 0, 50}] (* Vladimir Joseph Stephan Orlovsky, Nov 23 2009 *)
    LinearRecurrence[{1,1}, {2,5}, 50] (* Vincenzo Librandi, Jan 16 2012 *)
    Table[Fibonacci[n+2] + LucasL[n+1], {n, 0, 40}] (* Eric W. Weisstein, Jun 30 2017 *)
    CoefficientList[Series[(2+3x)/(1-x-x^2), {x, 0, 40}], x] (* Eric W. Weisstein, Sep 22 2017 *)
  • PARI
    a(n)=6*fibonacci(n)+fibonacci(n-3) \\ Charles R Greathouse IV, Jul 14 2017
    
  • PARI
    a(n)=([0,1; 1,1]^n*[2;5])[1,1] \\ Charles R Greathouse IV, Jul 14 2017
    
  • Sage
    f=fibonacci; [f(n+4) - f(n-1) for n in (0..40)] # G. C. Greubel, Sep 19 2019
    

Formula

a(n) = 2*Fibonacci(n) + Fibonacci(n+3). - Zerinvary Lajos, Oct 05 2007
a(n) = Fibonacci(n+4) - Fibonacci(n-1) for n >= 1. - Ian Stewart, Jun 07 2012
a(n) = Fibonacci(n) + 2*Fibonacci(n+2) = 5*Fibonacci(n) + 2*Fibonacci(n-1). The ratio r(n) := a(n+2)/a(n) satisfies the recurrence r(n+1) = (2*r(n) - 1)/(r(n) - 1). If M denotes the 2 X 2 matrix [2, -1; 1, -1] then [a(n+2), a(n)] = M^n[2, -1]. - Peter Bala, Dec 06 2013
a(n) = 6*F(n) + F(n-3), for F(n)=A000045. - J. M. Bergot, Jul 14 2017
a(n) = -(-1)^n*A000285(-2-n) = -(-1)^n*A104449(-1-n) for all n in Z. - Michael Somos, Oct 28 2018
E.g.f.: 2*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 4*sqrt(5)*sinh(sqrt(5)*x/2))/5. - Stefano Spezia, May 26 2025

Extensions

More terms from James Sellers, May 04 2000

A036284 Periodic vertical binary vectors of Fibonacci numbers.

Original entry on oeis.org

6, 24, 1440, 5728448, 92568198012160, 26494530374406845814111659520, 2095920895719545919920115988669687683503034097906010941440, 13128614603426246034591796912897206548807135027496968025827278400248602613784037111736380004928525614173642247188480
Offset: 0

Views

Author

Antti Karttunen, Nov 01 1998

Keywords

Comments

The sequence can be also computed with a recurrence that does not explicitly refer to Fibonacci numbers. See the given Maple and C programs.
Conjecture: For n>=1, each term a(n), when considered as a GF(2)[X]-polynomial, is divisible by GF(2)[X] -polynomial (x^3 + 1) ^ A000225(n-1). If this holds, then for n>=1, a(n) = A048720bi(A136380(n),A048723bi(9,A000225(n-1))). Conjecture 2: there is also one extra (x^1 + 1) factor present, see A136384.

Examples

			When Fibonacci numbers are written in binary (see A004685), under each other as:
0000000 (0)
0000001 (1)
0000001 (1)
0000010 (2)
0000011 (3)
0000101 (5)
0001000 (8)
0001101 (13)
0010101 (21)
0100010 (34)
0110111 (55)
1011001 (89)
it can be seen that the bits in the n-th column from right repeat after a period of A007283(n): 3, 6, 12, 24, ... (See also A001175). This sequence is formed from those bits: 011, reversed is 110, is binary for 6, thus a(0) = 6. 000110, reversed is 11000, is binary for 24, thus a(1) = 24, 000001011010, reversed is 10110100000, is binary for 1440, thus a(2) = 1440.
		

Crossrefs

Same sequence in octal base: A036285. Bits reversed: A036286. See also A136378, A136379, A136380, A136382, A136384, A037096, A037093, A000045.

Programs

  • Maple
    A036284:=proc(n) option remember; local a, b, c, i, j, k, l, s, x, y, z; if (0 = n) then (6) else a := 0; b := 0; s := 0; x := 0; y := 0; k := 3*(2^(n-1)); l := 3*(2^n); j := 0; for i from 0 to l do z := bit_i(A036284(n-1),(j)); c := (a + b + (`if`((x = y),x,(z+1))) mod 2); if(c <> 0) then s := s + (2^i); fi; a := b; b := c; x := y; y := z; j := j + 1; if(j = k) then j := 0; fi; od; RETURN(s); fi; end:
    bit_i := (x,i) -> `mod`(floor(x/(2^i)),2);
  • Mathematica
    a[n_] := Sum[Mod[Fibonacci[k]/2^n // Floor, 2]* 2^k, {k, 0, 3*2^n - 1}]; Table[a[n], {n, 0, 7}] (* Jean-François Alcover, Mar 04 2016 *)

Formula

a(n) = Sum_{k=0..A007283(n)-1} ([A000045(k)/(2^n)] mod 2) * 2^k, where [] stands for floor function, i.e. Sum (bit n of Fibonacci(k))*(2^k), k = 0 ... (3*(2^n))-1.

Extensions

Entry revised Dec 29 2007

A214028 Entry points for the Pell sequence: smallest k such that n divides A000129(k).

Original entry on oeis.org

1, 2, 4, 4, 3, 4, 6, 8, 12, 6, 12, 4, 7, 6, 12, 16, 8, 12, 20, 12, 12, 12, 22, 8, 15, 14, 36, 12, 5, 12, 30, 32, 12, 8, 6, 12, 19, 20, 28, 24, 10, 12, 44, 12, 12, 22, 46, 16, 42, 30, 8, 28, 27, 36, 12, 24, 20, 10, 20, 12, 31, 30, 12, 64, 21, 12, 68, 8, 44, 6, 70, 24, 36, 38
Offset: 1

Views

Author

Art DuPre, Jul 04 2012

Keywords

Comments

Conjecture: A175181(n)/A214027(n) = a(n). This says that the zeros appear somewhat uniformly in a period. The second zero in a period is exactly where n divides the first Lucas number, so this relationship is not really surprising.
From Jianing Song, Aug 29 2018: (Start)
The comment above is correct, since n divides A000129(k*a(n)) for all integers k and clearly a(n) divides A175181(n), so the zeros appear uniformly.
a(n) <= 4*n/3 for all n, where the equality holds iff n is a power of 3.
(End)

Examples

			11 first divides the term A000129(12) = 13860 = 2*3*5*7*11.
		

Crossrefs

Programs

  • Maple
    A214028 := proc(n)
        local a000129,k ;
        a000129 := [1,2,5] ;
        for k do
            if modp(a000129[1],n) = 0 then
                return k;
            end if;
            a000129[1] := a000129[2] ;
            a000129[2] := a000129[3] ;
            a000129[3] := 2*a000129[2]+a000129[1] ;
        end do:
    end proc:
    seq(A214028(n),n=1..40); # R. J. Mathar, May 26 2016
  • Mathematica
    a[n_] := With[{s = Sqrt@ 2}, ((1 + s)^n - (1 - s)^n)/(2 s)] // Simplify; Table[k = 1; While[Mod[a[k], n] != 0, k++]; k, {n, 80}] (* Michael De Vlieger, Aug 25 2015, after Michael Somos at A000129 *)
    Table[k = 1; While[Mod[Fibonacci[k, 2], n] != 0, k++]; k, {n, 100}] (* G. C. Greubel, Aug 10 2018 *)
  • PARI
    pell(n) = polcoeff(Vec(x/(1-2*x-x^2) + O(x^(n+1))), n);
    a(n) = {k=1; while (pell(k) % n, k++); k;} \\ Michel Marcus, Aug 25 2015

Formula

If p^2 does not divide A000129(a(p)) (that is, p is not in A238736) then a(p^e) = a(p)*p^(e - 1). If gcd(m, n) = 1 then a(mn) = lcm(a(m), a(n)). - Jianing Song, Aug 29 2018

A022097 Fibonacci sequence beginning 1, 7.

Original entry on oeis.org

1, 7, 8, 15, 23, 38, 61, 99, 160, 259, 419, 678, 1097, 1775, 2872, 4647, 7519, 12166, 19685, 31851, 51536, 83387, 134923, 218310, 353233, 571543, 924776, 1496319, 2421095, 3917414, 6338509, 10255923, 16594432, 26850355, 43444787, 70295142, 113739929
Offset: 0

Views

Author

Keywords

Comments

a(n-1) = Sum_{k=0..ceiling((n-1)/2)} P(7;n-1-k,k) with n>=1, a(-1)=6. These are the SW-NE diagonals in P(7;n,k), the (7,1) Pascal triangle A093564. Observation by Paul Barry, Apr 29 2004. Proof via recursion relations and comparison of inputs.
Pisano period lengths: 1, 3, 8, 6, 20, 24, 16, 12, 24, 60, 10, 24, 28, 48, 40, 24, 36, 24, 18, 60, ... (perhaps the same as A001175). - R. J. Mathar, Aug 10 2012
For n >= 1, a(n) is the number of edge covers of the tadpole graph T_{4,n-1} with T_{4,0} interpreted as just the cycle graph C_4. Example: If n=2, we have C_4 and path P_1 joined by a bridge. This is the cycle with a pendant and has 7 edge covers. - Feryal Alayont, Sep 22 2024

Crossrefs

Programs

  • Magma
    a0:=1; a1:=7; [GeneralizedFibonacciNumber(a0, a1, n): n in [0..40]]; // Bruno Berselli, Feb 12 2013
    
  • Mathematica
    First /@ NestList[{Last@ #, Total@ #} &, {1, 7}, 36] (* or *)
    CoefficientList[Series[(1 + 6 x)/(1 - x - x^2), {x, 0, 36}], x] (* Michael De Vlieger, Feb 20 2017 *)
    LinearRecurrence[{1,1},{1,7},40] (* Harvey P. Dale, May 17 2018 *)
  • PARI
    a(n)=([0,1; 1,1]^n*[1;7])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    
  • SageMath
    A022097=BinaryRecurrenceSequence(1,1,1,7)
    print([A022097(n) for n in range(41)]) # G. C. Greubel, Jun 03 2025

Formula

a(n) = a(n-1) + a(n-2) for n>=2, a(0)=1, a(1)=7, a(-1):=6.
G.f.: (1+6*x)/(1-x-x^2).
a(n) = A109754(6, n+1).
a(n) = A118654(3, n).
a(n) = (2^(-1-n)*((1 - sqrt(5))^n*(-13 + sqrt(5)) + (1 + sqrt(5))^n*(13 + sqrt(5))))/sqrt(5). - Herbert Kociemba
a(n) = 6*A000045(n) + A000045(n+1). - R. J. Mathar, Aug 10 2012
a(n) = 8*A000045(n) - A000045(n-2). - Bruno Berselli, Feb 20 2017
From Aamen Muharram, Aug 05 2022: (Start)
a(n) = F(n-4) + F(n-1) + F(n+4),
a(n) = F(n) + F(n+4) - F(n-3),
where F(n) = A000045(n) is the Fibonacci numbers. (End)

A106291 Period of the Lucas sequence A000032 mod n.

Original entry on oeis.org

1, 3, 8, 6, 4, 24, 16, 12, 24, 12, 10, 24, 28, 48, 8, 24, 36, 24, 18, 12, 16, 30, 48, 24, 20, 84, 72, 48, 14, 24, 30, 48, 40, 36, 16, 24, 76, 18, 56, 12, 40, 48, 88, 30, 24, 48, 32, 24, 112, 60, 72, 84, 108, 72, 20, 48, 72, 42, 58, 24, 60, 30, 48, 96, 28, 120, 136, 36, 48, 48
Offset: 1

Views

Author

T. D. Noe, May 02 2005

Keywords

Comments

This sequence differs from the Fibonacci periods (A001175) only when n is a multiple of 5, which can be traced to 5 being the discriminant of the characteristic polynomial x^2-x-1.
This sequence coincides with the Fibonacci periods (A001175) if n is a multiple of 5^j and the following conditions apply: n contains at least one prime factor of the form p = 10*k+1 (A030430) which occurs in Fibonacci(m) or Lucas(m) as prime factor, where m must be the smallest possible index containing p and a factor 5^i and j <= i. If n contains several prime factors from A030430 that satisfy the above conditions, the largest applicable i is decisive. - Klaus Purath, Apr 26 2019

Examples

			From _Klaus Purath_, Jul 10 2019: (Start)
n = 3*5*31 = 465, j = 1; L(15) is the smallest Lucas number with prime factor 31; 15 = 3*5, i = 1 = j. Hence Lucas period (mod 465) = Fibonacci period (mod 465) = 120, but if n = 3*5^2*31 = 2325, j = 2 > i. Hence Lucas period (mod 2325) = 120 < Fibonacci period (mod 2325) = 600.
n = 5*701 = 3505, j = 1; F(175) is the smallest Fibonacci number with prime factor 701; 175 = 7*5^2, i = 2 > j. Therefore Lucas period (mod 3505) = Fibonacci period (mod 3505) = 700, but if n = 5^3*701 = 87625, j = 3 > i. Therefore Lucas period (mod 87625) = 700 < Fibonacci period (mod 87625) = 3500.
n = 5^2*11*101 = 27775, j =2; L(5) is the smallest Lucas number with prime factor 11, i = 1; L(25) = is the smallest Lucas number with prime factor 101; 25 = 5^2, i = 2 ( decisive); j = i. Hence Lucas period (mod 27775) = Fibonacci period (mod 27775) = 100, but if n = 5^3*11*101 = 138875, j = 3 > i. Hence Lucas period (mod 138875) = 100 < Fibonacci period (mod 138875) = 500. (End)
		

References

  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989. See p. 89. - From N. J. A. Sloane, Feb 20 2013

Crossrefs

Cf. A106273 (discriminant of the polynomial x^n-x^(n-1)-...-x-1).

Programs

  • Mathematica
    n=2; Table[p=i; a=Join[Table[ -1, {n-1}], {n}]; a=Mod[a, p]; a0=a; k=0; While[k++; s=Mod[Plus@@a, p]; a=RotateLeft[a]; a[[n]]=s; a!=a0]; k, {i, 70}]
  • Python
    from math import lcm
    from functools import lru_cache
    from sympy import factorint
    @lru_cache(maxsize=None)
    def A106291(n):
        if n < 3:
            return (n<<1)-1
        f = factorint(n).items()
        if len(f) > 1:
            return lcm(*(A106291(a**b) for a,b in f))
        else:
            k,x = 1, (1,3)
            while x != (2,1):
                k += 1
                x = (x[1], (x[0]+x[1]) % n)
            return k # Chai Wah Wu, Apr 25 2025
  • Sage
    def a(n): return BinaryRecurrenceSequence(1, 1, 2, 1).period(n)
    [a(n) for n in (1..100)] # G. C. Greubel, Apr 27 2019
    

Formula

Let the prime factorization of n be p1^e1...pk^ek. Then a(n) = lcm(a(p1^e1), ..., a(pk^ek)).

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

A003147 Primes p with a Fibonacci primitive root g, i.e., such that g^2 = g + 1 (mod p).

Original entry on oeis.org

5, 11, 19, 31, 41, 59, 61, 71, 79, 109, 131, 149, 179, 191, 239, 241, 251, 269, 271, 311, 359, 379, 389, 409, 419, 431, 439, 449, 479, 491, 499, 569, 571, 599, 601, 631, 641, 659, 701, 719, 739, 751, 821, 839, 929, 971, 1019, 1039, 1051, 1091, 1129, 1171, 1181, 1201, 1259, 1301
Offset: 1

Views

Author

Keywords

Comments

Primes p with a primitive root g such that g^2 = g + 1 (mod p).
Not the same as primes with a Fibonacci number as primitive root; cf. A083701. - Jonathan Sondow, Feb 17 2013
For all except the initial term 5, these are numbers such that the Pisano period equals 1 less than the Pisano number, i.e., where A001175(n) = n-1. - Matthew Goers, Sep 20 2013
As shown in the paper by Brison, these are also the primes p such that there is a Fibonacci-type sequence (mod p) that begins with (1,b) and encounters all numbers less than p in the first p-1 iterations (for some b). - T. D. Noe, Feb 26 2014
Shanks (1972) conjectured that the relative asymptotic density of this sequence in the sequence of primes is 27*c/38 = 0.2657054465..., where c is Artin's constant (A005596). The conjecture was proved on the assumption of a generalized Riemann hypothesis by Lenstra (1977) and Sander (1990). - Amiram Eldar, Jan 22 2022

Examples

			3 is a primitive root mod 5, and 3^2 = 3 + 1 mod 5, so 5 is a member. - _Jonathan Sondow_, Feb 17 2013
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A038872.
See also A106535.

Programs

  • Maple
    filter:=proc(n) local g,r;
    if not isprime(n) then return false fi;
    r:= [msolve(g^2 -g - 1, n)][1];
    numtheory:-order(rhs(op(r)),n) = n-1
    end proc:
    select(filter, [5,seq(seq(10*i+j,j=[1,9]),i=1..1000)]); # Robert Israel, May 22 2015
  • Mathematica
    okQ[p_] := AnyTrue[PrimitiveRootList[p], Mod[#^2, p] == Mod[#+1, p]&]; Select[Prime[Range[300]], okQ] (* Jean-François Alcover, Jan 04 2016 *)
  • PARI
    is(n)=if(kronecker(5,n)<1||!isprime(n), return(n==5)); my(s=sqrt(Mod(5,n))); znorder((1+s)/2)==n-1 || znorder((1-s)/2)==n-1 \\ Charles R Greathouse IV, May 22 2015

Extensions

More terms from David W. Wilson
Cross-reference from Charles R Greathouse IV, Nov 05 2009
Definition clarified by M. F. Hasler, Jun 05 2018
Previous Showing 41-50 of 176 results. Next