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 63 results. Next

A016089 Numbers n such that n divides n-th Lucas number A000032(n).

Original entry on oeis.org

1, 6, 18, 54, 162, 486, 1458, 1926, 4374, 5778, 13122, 17334, 39366, 52002, 118098, 156006, 206082, 354294, 468018, 618246, 1062882, 1404054, 1854738, 2471058, 3188646, 4212162, 5564214, 7413174, 9565938, 12636486, 16692642, 22050774
Offset: 1

Views

Author

Keywords

Comments

Note that if n divides A000032(n) and p is an odd prime divisor of A000032(n), then pn divides A000032(pn) and, furthermore, p^k*n divides A000032(p^k*n) for every integer k>=0.
In particular, since 6 divides A000032(6) = 2*3^2, A016089 includes all terms of the geometric progression 2*3^k for k>0 (see A099856); since 18 divides A000032(18) = 2*3^3*107, A016089 includes all terms of the form 2*107^m*3^k for k>1 and m>=0; etc.
Terms of A016089 starting with 18 are multiples of 18. There are no other terms of the form 18p where p is prime, except for p=3 and p=107. - Alexander Adamchuk, May 11 2007

Crossrefs

Cf. A099856, A072378 = numbers n such that 12n divides Fibonacci(12n), A023172 = numbers n such that n divides Fibonacci(n).

Programs

  • Mathematica
    a = 1; b = 3; Do[c = a + b; a = b; b = c; If[Mod[c, n] == 0, Print[n]], {n, 3, 2, 10^6}]
  • PARI
    is(n)=(Mod([0,1;1,1],n)^n*[2;1])[1,1]==0 \\ Charles R Greathouse IV, Nov 04 2016

Extensions

Extended and revised by Max Alekseyev, May 13 2007, May 15 2008, May 16 2008

A002708 a(n) = Fibonacci(n) mod n.

Original entry on oeis.org

0, 1, 2, 3, 0, 2, 6, 5, 7, 5, 1, 0, 12, 13, 10, 11, 16, 10, 1, 5, 5, 1, 22, 0, 0, 25, 20, 11, 1, 20, 1, 5, 13, 33, 30, 0, 36, 1, 37, 35, 1, 34, 42, 25, 20, 45, 46, 0, 36, 25, 32, 23, 52, 8, 5, 21, 40, 1, 1, 0, 1, 1, 43, 59, 60, 52, 66, 65, 44, 15, 1, 0, 72, 73, 50, 3, 2, 44, 1, 5, 7, 1, 82, 24
Offset: 1

Views

Author

John C. Hallyburton, Jr. (hallyb(AT)evms.ENET.dec.com)

Keywords

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002, p. 891.

Crossrefs

Cf. A002726, A002752, A023172 (indices of 0's), A023173 (indices of 1's), A023174-A023182.
Cf. A263101.
Main diagonal of A161553.

Programs

  • Magma
    [Fibonacci(n) mod n : n in [1..120]]; // Vincenzo Librandi, Nov 19 2015
    
  • Maple
    with(combinat): [ seq( fibonacci(n) mod n, n=1..80) ];
    # second Maple program:
    a:= proc(n) local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:= r.M mod n fi;
             if p=0 then break fi; M:= M.M mod n
          od; r[1, 2]
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    Table[Mod[Fibonacci[n], n], {n, 1, 100}] (* Stefan Steinerberger, Apr 18 2006 *)
  • PARI
    a(n) = fibonacci(n) % n; \\ Michel Marcus, May 11 2016
  • Python
    A002708_list, a, b, = [], 1, 1
    for n in range(1,10**4+1):
        A002708_list.append(a%n)
        a, b = b, a+b # Chai Wah Wu, Nov 26 2015
    

Extensions

More terms from Stefan Steinerberger, Apr 18 2006

A232570 Numbers k that divide tribonacci(k) (A000073(k)).

Original entry on oeis.org

1, 8, 16, 19, 32, 47, 53, 64, 103, 112, 128, 144, 155, 163, 192, 199, 208, 221, 224, 256, 257, 269, 272, 299, 311, 368, 397, 401, 419, 421, 448, 499, 512, 587, 599, 617, 640, 683, 757, 768, 773, 784, 863, 883, 896, 907, 911, 929, 936, 991, 1021, 1024
Offset: 1

Views

Author

Seiichi Manyama, Jun 17 2016

Keywords

Comments

Inspired by A023172 (numbers k such that k divides Fibonacci(k)).
Includes all primes p such that x^3-x^2-x-1 has 3 distinct roots in the field GF(p) (A106279). - Robert Israel, Feb 07 2018
Includes 2^k for k >= 3. - Robert Israel, Jul 26 2024

Crossrefs

Programs

  • Maple
    with(LinearAlgebra[Modular]):
    T:= (n, m)-> MatrixPower(m, Mod(m, <<0|1|0>,
        <0|0|1>, <1|1|1>>, float[8]), n)[1, 3]:
    a:= proc(n) option remember; local k; if n=1
          then 1 else for k from 1+a(n-1)
          while T(k$2)>0 do od; k fi
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Feb 05 2018
  • Mathematica
    trib = LinearRecurrence[{1, 1, 1}, {0, 0, 1}, 2000]; Reap[Do[If[Divisible[ trib[[n+1]], n], Print[n]; Sow[n]], {n, 1, Length[trib]-1}]][[2, 1]] (* Jean-François Alcover, Mar 22 2019 *)
  • Ruby
    require 'matrix'
    def power(a, n, mod)
      return Matrix.I(a.row_size) if n == 0
      m = power(a, n >> 1, mod)
      m = (m * m).map{|i| i % mod}
      return m if n & 1 == 0
      (m * a).map{|i| i % mod}
    end
    def f(m, n)
      ary0 = Array.new(m, 0)
      ary0[0] = 1
      v = Vector.elements(ary0)
      ary1 = [Array.new(m, 1)]
      (0..m - 2).each{|i|
        ary2 = Array.new(m, 0)
        ary2[i] = 1
        ary1 << ary2
      }
      a = Matrix[*ary1]
      mod = n
      (power(a, n, mod) * v)[m - 1]
    end
    def a(n)
      (1..n).select{|i| f(3, i) == 0}
    end

A069107 Composite numbers k that divide Fibonacci(k+1).

Original entry on oeis.org

323, 377, 2834, 3827, 5777, 6479, 10877, 11663, 18407, 19043, 20999, 23407, 25877, 27323, 34943, 35207, 39203, 44099, 47519, 50183, 51983, 53663, 60377, 65471, 75077, 78089, 79547, 80189, 81719, 82983, 84279, 84419, 86063, 90287, 94667
Offset: 1

Views

Author

Benoit Cloitre, Apr 06 2002

Keywords

Comments

Primes p congruent to +2 or -2 (mod 5) divide Fibonacci(p+1) (cf. A003631 and [Hardy and Wright]).

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers (Fifth edition), Oxford Univ. Press (Clarendon), 1979, Chap. X, p. 150.

Crossrefs

Cf. A045468, A003631, A064739, A081264 (Fibonacci pseudoprimes).

Programs

  • Haskell
    a069107 n = a069107_list !! (n-1)
    a069107_list = h 2 $ drop 3 a000045_list where
       h n (fib:fibs) = if fib `mod` n > 0 || a010051 n == 1
           then h (n+1) fibs else n : h (n+1) fibs
    -- Reinhard Zumkeller, Oct 13 2011
    
  • Mathematica
    Select[Range[2,100000],!PrimeQ[#]&&Divisible[Fibonacci[#+1],#]&] (* Harvey P. Dale, Sep 18 2011 *)
  • PARI
    is(n)=((Mod([1,1;1,0],n))^(n+1))[1,2]==0 && !isprime(n) && n>1 \\ Charles R Greathouse IV, Oct 07 2016

Formula

Fibonacci(2*a(n)) mod a(n) = a(n) - 1. - Gary Detlefs, May 26 2014

Extensions

Corrected by Ralf Stephan, Oct 17 2002

A104714 Greatest common divisor of a Fibonacci number and its index.

Original entry on oeis.org

0, 1, 1, 1, 1, 5, 2, 1, 1, 1, 5, 1, 12, 1, 1, 5, 1, 1, 2, 1, 5, 1, 1, 1, 24, 25, 1, 1, 1, 1, 10, 1, 1, 1, 1, 5, 36, 1, 1, 1, 5, 1, 2, 1, 1, 5, 1, 1, 48, 1, 25, 1, 1, 1, 2, 5, 7, 1, 1, 1, 60, 1, 1, 1, 1, 5, 2, 1, 1, 1, 5, 1, 72, 1, 1, 25, 1, 1, 2, 1, 5, 1, 1, 1, 12, 5, 1, 1, 1, 1, 10, 13, 1, 1, 1, 5, 96, 1
Offset: 0

Views

Author

Harmel Nestra (harmel.nestra(AT)ut.ee), Apr 23 2005

Keywords

Comments

Considering this sequence is a natural sequel to the investigation of the problem when F_n is divisible by n (the numbers occurring in A023172). This sequence has several nice properties. (1) n | m implies a(n) | a(m) for arbitrary naturals n and m. This property is a direct consequence of the analogous well-known property of Fibonacci numbers. (2) gcd (a(n), a(m)) = a(gcd(n, m)) for arbitrary naturals n and m. Also this property follows directly from the analogous (perhaps not so well-known) property of Fibonacci numbers. (3) a(n) * a(m) | a(n * m) for arbitrary naturals n and m. This property is remarkable especially in the light that the analogous proposition for Fibonacci numbers fails if n and m are not relatively prime (e.g. F_3 * F_3 does not divide F_9). (4) The set of numbers satisfying a(n) = n is closed w.r.t. multiplication. This follows easily from (3).

Examples

			The natural numbers:    0 1 2 3 4 5 6  7  8  9 10 11  12 ...
The Fibonacci numbers:  0 1 1 2 3 5 8 13 21 34 55 89 144 ...
The corresponding GCDs: 0 1 1 1 1 5 2  1  1  1  5  1  12 ...
		

Crossrefs

Cf. A023172, A000045, A001177, A001175, A001176. a(n) = gcd(A000045(n), A001477(n)). a(n) = n iff n occurs in A023172 iff n | A000045(n).
Cf. A074215 (a(n)==1).

Programs

  • Haskell
    let fibs@(_ : fs) = 0 : 1 : zipWith (+) fibs fs in 0 : zipWith gcd [1 ..] fs
    
  • Maple
    b:= proc(n) option remember; local r, M, p; r, M, p:=
          <<1|0>, <0|1>>, <<0|1>, <1|1>>, n;
          do if irem(p, 2, 'p')=1 then r:= r.M mod n fi;
             if p=0 then break fi; M:= M.M mod n
          od; r[1, 2]
        end:
    a:= n-> igcd(n, b(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, Apr 05 2017
  • Mathematica
    Table[GCD[Fibonacci[n],n],{n,0,97}] (* Alonso del Arte, Nov 22 2010 *)
  • PARI
    a(n)=if(n,gcd(n,lift(Mod([1,1;1,0],n)^n)[1,2]),0) \\ Charles R Greathouse IV, Sep 24 2013

Formula

a(n) = gcd(F(n), n).

A123976 Numbers k such that Fibonacci(k-1) is divisible by k.

Original entry on oeis.org

1, 11, 19, 29, 31, 41, 59, 61, 71, 79, 89, 101, 109, 131, 139, 149, 151, 179, 181, 191, 199, 211, 229, 239, 241, 251, 269, 271, 281, 311, 331, 349, 359, 379, 389, 401, 409, 419, 421, 431, 439, 442, 449, 461, 479, 491, 499, 509, 521, 541, 569, 571, 599, 601
Offset: 1

Views

Author

Tanya Khovanova, Oct 30 2006

Keywords

Comments

a(n) is a union of {1}, A069106(n) and A045468(n). Composite a(n) are listed in A069106(n) = {442, 1891, 2737, 4181, 6601, 6721, 8149, ...}. Prime a(n) are listed in A045468(n) = {11, 19, 29, 31, 41, 59, 61, 71, 79, 89, 101, 109, 131, 139, 149, 151, 179, 181, 191, 199, ...} Primes congruent to {1, 4} mod 5. - Alexander Adamchuk, Nov 02 2006

Examples

			Fibonacci(10) = 55, is divisible by 11.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a123976 n = a123976_list !! (n-1)
    a123976_list = map (+ 1) $ elemIndices 0 $ zipWith mod a000045_list [1..]
    -- Reinhard Zumkeller, Oct 13 2011
    
  • Mathematica
    Select[Range[1000], IntegerQ[Fibonacci[ # - 1]/# ] &]
  • PARI
    is(n)=((Mod([1,1;1,0],n))^n)[2,2]==0 \\ Charles R Greathouse IV, Feb 03 2014

A221018 Number n such that Fibonacci(n) is divisible by n, n + 1 and n - 1.

Original entry on oeis.org

108, 2688, 3528, 4968, 6480, 15288, 18048, 20808, 21000, 25308, 35448, 47520, 62928, 68208, 81648, 82008, 97608, 103968, 108288, 116928, 137088, 139968, 151848, 162288, 196560, 197568, 200928, 235008, 238728, 253368, 278208, 363888, 379008, 400248, 444528, 449568, 457608
Offset: 1

Views

Author

Alex Ratushnyak, May 03 2013

Keywords

Comments

Numbers n such that Fibonacci(n) mod n = Fibonacci(n) mod (n-1) = Fibonacci(n) mod (n+1) = 0.
Subsequence of A023172.

Crossrefs

Programs

  • Python
    prpr, prev = 0, 1
    for n in range(2, 100000):
        prpr, prev = prev, prpr+prev
        if n%2: continue
        if (prev % n, prev % (n-1), prev % (n+1)) == (0, 0, 0):
            print(n, end=", ")

A159051 Numbers n such that Fibonacci(n-2) is divisible by n.

Original entry on oeis.org

2, 8, 38, 62, 122, 158, 218, 278, 302, 362, 398, 422, 458, 482, 542, 662, 698, 758, 818, 842, 878, 884, 902, 998, 1037, 1082, 1142, 1157, 1202, 1238, 1262, 1322, 1382, 1418, 1478, 1502, 1538, 1622, 1658, 1718, 1838, 1982, 2018, 2042, 2078, 2102, 2138
Offset: 1

Views

Author

Keywords

Examples

			8=8/8=1, 38=14930352/38=392904, 62=1548008755920/62=24967883160, ...
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a159051 n = a159051_list !! (n-1)
    a159051_list = map (+ 2) $ elemIndices 0 $ zipWith mod a000045_list [2..]
    -- Reinhard Zumkeller, Oct 13 2011
    
  • Mathematica
    lst={};Do[If[Mod[(Fibonacci[n-2]),n]==0,AppendTo[lst,n]],{n,7!}];lst
    Select[Range[2,2200],Divisible[Fibonacci[#-2],#]&] (* Harvey P. Dale, Dec 20 2014 *)
  • PARI
    is(n)=((Mod([1,1;1,0],n))^(n-2))[1,2]==0 \\ Charles R Greathouse IV, Feb 03 2014

A298684 Numbers i such that Fibonacci(i) is divisible by i, i+1, and i+2.

Original entry on oeis.org

60, 540, 660, 1200, 1320, 1620, 2160, 3060, 5580, 6120, 6600, 6720, 8100, 9180, 9240, 9600, 9720, 9900, 11160, 12240, 12300, 12600, 13200, 13440, 13680, 15120, 15360, 18300, 18480, 19440, 19800, 21000, 22500, 24480, 24840, 26880, 27360, 28920, 29400, 30240, 30780
Offset: 1

Views

Author

Alex Ratushnyak, Jan 24 2018

Keywords

Comments

A subsequence of A217738.

Crossrefs

Programs

  • Magma
    [n: n in [2..10^5] | IsZero(Fibonacci(n) mod (n)) and IsZero(Fibonacci(n) mod (n+1)) and IsZero(Fibonacci(n) mod (n+2))]; // Vincenzo Librandi, Jan 27 2018
  • Mathematica
    fQ[n_] := Mod[ Fibonacci@ n, {n, n +1, n +2}] == {0, 0, 0}; Select[60 Range@513, fQ] (* Robert G. Wilson v, Jan 26 2018 *)
  • Python
    from _future_ import division
    A298684_list, n, a, b = [], 1, 1, 1
    while len(A298684_list) < 1000:
        if not (a % (n*(n+1)*(n+2)//(1 if n % 2 else 2))):
            A298684_list.append(n)
        n += 1
        a, b = b, a+b # Chai Wah Wu, Jan 26 2018
    

A000350 Numbers m such that Fibonacci(m) ends with m.

Original entry on oeis.org

0, 1, 5, 25, 29, 41, 49, 61, 65, 85, 89, 101, 125, 145, 149, 245, 265, 365, 385, 485, 505, 601, 605, 625, 649, 701, 725, 745, 749, 845, 865, 965, 985, 1105, 1205, 1249, 1345, 1445, 1585, 1685, 1825, 1925, 2065, 2165, 2305, 2405, 2501, 2545, 2645, 2785, 2885
Offset: 1

Views

Author

Keywords

Comments

Conjecture: Other than 1 and 5, there is no m such that Fibonacci(m) in binary ends with m in binary. The conjecture holds up to m=50000. - Ralf Stephan, Aug 21 2006
The conjecture for binary numbers holds for m < 2^25. - T. D. Noe, May 14 2007
Conjecture is true. It is easy to prove (by induction on k) that if Fibonacci(m) ends with m in binary, then m == 0, 1, or 5 (mod 3*2^k) for any positive integer k, i.e., m must simply be equal to 0, 1, or 5. - Max Alekseyev, Jul 03 2009

Examples

			Fibonacci(25) = 75025 ends with 25.
		

References

  • 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

Programs

  • Haskell
    import Data.List (isSuffixOf, elemIndices)
    import Data.Function (on)
    a000350 n = a000350_list !! (n-1)
    a000350_list = elemIndices True $
                   zipWith (isSuffixOf `on` show) [0..] a000045_list
    -- Reinhard Zumkeller, Apr 10 2012
    
  • Mathematica
    a=0;b=1;c=1;lst={}; Do[a=b;b=c;c=a+b;m=Floor[N[Log[10,n]]]+1; If[Mod[c,10^m]==n,AppendTo[lst,n]],{n,3,5000}]; Join[{0,1},lst] (* edited and changed by Harvey P. Dale, Sep 10 2011 *)
    fnQ[n_]:=Mod[Fibonacci[n],10^IntegerLength[n]]==n; Select[Range[ 0,2900],fnQ] (* Harvey P. Dale, Nov 03 2012 *)
  • PARI
    for(n=0,1e4,if(((Mod([1,1;1,0],10^#Str(n)))^n)[1,2]==n,print1(n", "))) \\ Charles R Greathouse IV, Apr 10 2012
    
  • Python
    from sympy import fibonacci
    [i for i in range(1000) if str(fibonacci(i))[-len(str(i)):]==str(i)] # Nicholas Stefan Georgescu, Feb 27 2023
Showing 1-10 of 63 results. Next