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

A001602 Fibonacci entry points: a(n) = smallest m > 0 such that the n-th prime divides Fibonacci(m).

Original entry on oeis.org

3, 4, 5, 8, 10, 7, 9, 18, 24, 14, 30, 19, 20, 44, 16, 27, 58, 15, 68, 70, 37, 78, 84, 11, 49, 50, 104, 36, 27, 19, 128, 130, 69, 46, 37, 50, 79, 164, 168, 87, 178, 90, 190, 97, 99, 22, 42, 224, 228, 114, 13, 238, 120, 250, 129, 88, 67, 270, 139, 28, 284, 147, 44, 310
Offset: 1

Views

Author

Keywords

Comments

"[a(n)] is called by Lucas the rank of apparition of p and we know it is a divisor of, or equal to prime(n)-1 or prime(n)+1" - Vajda, p. 84. (Note that a(3)=5. This is the only exception.) - Chris K. Caldwell, Nov 03 2008
Every number except 1, 2, 6 and 12 eventually occurs in this sequence. See also A086597(n), the number of primitive prime factors of Fibonacci(n). - T. D. Noe, Jun 13 2008
For each prime p we have an infinite sequence of integers, F(i*a(n))/p, i=1,2,... See also A236479. For primes p >= 3 and exponents j >= 2, with k = a(n) and p = p(n), it appears that F(k*i*p^(j-1))/p^j is an integer, for i >= 0. For p = 2, F(k*i*p^(j-1))/p^(j+1) = integer. - Richard R. Forberg, Jan 26-29 2014 [Comments revised by N. J. A. Sloane, Sep 24 2015]
Let p=prime(n). a(n) is also a divisor of (p-1)/2 (if p mod 5 == 1 or 4) or (p+1)/2 (if p mod 5 == 2 or 3) if and only if p mod 4 = 1. - Seiichi Azuma, Jul 29 2014

Examples

			The 5th prime is 11 and 11 first divides Fib(10)=55, so a(5) = 10.
		

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).
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Cf. A051694, A001177, A086597, A194363 (entries Lucas).

Programs

  • Haskell
    import Data.List (findIndex)
    import Data.Maybe (fromJust)
    a001602 n = (+ 1) $ fromJust $
                findIndex ((== 0) . (`mod` a000040 n)) $ tail a000045_list
    -- Reinhard Zumkeller, Apr 08 2012
    
  • Maple
    A001602 := proc(n)
        local i,p;
        p := ithprime(n);
        for i from 1 do
            if modp(combinat[fibonacci](i),p) = 0 then
                return i;
            end if;
        end do:
    end proc: # R. J. Mathar, Oct 31 2015
  • Mathematica
    Table[k=1;While[!Divisible[Fibonacci[k],Prime[n]],k++];k,{n,70}] (* Harvey P. Dale, Feb 15 2012 *)
    (* a fast, but more complicated method *) MatrixPowerMod[mat_, n_, m_Integer] := Mod[Fold[Mod[If[#2 == 1, #1.#1.mat, #1.#1], m] &, mat, Rest[IntegerDigits[n, 2]]], m]; FibMatrix[n_Integer, m_Integer] := MatrixPowerMod[{{0, 1}, {1, 1}}, n, m]; FibEntryPointPrime[p_Integer] := Module[{n, d, k}, If[PrimeQ[p], n = p - JacobiSymbol[p, 5]; d = Divisors[n]; k = 1; While[FibMatrix[d[[k]], p][[1, 2]] > 0, k++]; d[[k]]]]; SetAttributes[FibEntryPointPrime, Listable]; FibEntryPointPrime[Prime[Range[10000]]] (* T. D. Noe, Jan 03 2013 *)
    With[{nn=70,t=Table[{n,Fibonacci[n]},{n,500}]},Transpose[ Flatten[ Table[ Select[t,Divisible[#[[2]],Prime[i]]&,1],{i,nn}],1]][[1]]] (* Harvey P. Dale, May 31 2014 *)
  • PARI
    a(n)=if(n==3,5,my(p=prime(n));fordiv(p^2-1,d,if(fibonacci(d)%p==0, return(d)))) \\ Charles R Greathouse IV, Jul 17 2012
    
  • PARI
    do(p)=my(k=p+[0,-1,1,1,-1][p%5+1],f=factor(k));for(i=1,#f[,1],for(j=1,f[i,2],if((Mod([1,1;1,0],p)^(k/f[i,1]))[1,2], break); k/=f[i,1])); k
    a(n)=do(prime(n))
    apply(do, primes(100)) \\ Charles R Greathouse IV, Jan 03 2013
    
  • Python
    from sympy.ntheory.generate import prime
    def A001602(n):
        a, b, i, p = 0, 1, 1, prime(n)
        while b % p:
            a, b, i = b, (a+b) % p, i+1
        return i # Chai Wah Wu, Nov 03 2015, revised Apr 04 2016.

Formula

a(n) = A001177(prime(n)).
a(n) <= prime(n) + 1. - Charles R Greathouse IV, Jan 02 2013

Extensions

More terms from Jud McCranie

A223486 Lucas entry points: a(n) = least k such that n divides Lucas number L_k (=A000032(k), for k >= 0), or -1 if there is no such k.

Original entry on oeis.org

0, 0, 2, 3, -1, 6, 4, -1, 6, -1, 5, -1, -1, 12, -1, -1, -1, 6, 9, -1, -1, 15, 12, -1, -1, -1, 18, -1, 7, -1, 15, -1, -1, -1, -1, -1, -1, 9, -1, -1, 10, -1, 22, 15, -1, 12, 8, -1, 28, -1, -1, -1, -1, 18, -1, -1, -1, 21, 29, -1, -1, 15, -1, -1, -1, -1, 34, -1
Offset: 1

Views

Author

Casey Mongoven, Mar 20 2013

Keywords

Comments

If one takes L_k, for k >= 1, that is A000204, then a(1) = 1 and a(2) = 3 followed by the given numbers. This fits then with A106291(n) = A253808(n)*a(n), n >= 1 (where in A253808 a negative entry at position n indicates, as in the present sequence, that the Lucas numbers are not divisible by n. For odd primes not dividing any Lucas numbers see A053028. No power 2^m, m >= 3 divides any Lucas number, see, e.g., Vajda, p. 81). - Wolfdieter Lang, Jan 20 2015

Examples

			a(9) = 6 because L_6 = 18 is the first number in the Lucas sequence (A000032) that 9 divides.
		

References

  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 25.
  • S. Vajda, Fibonacci and Lucas numbers and the Golden Section, Ellis Horwood Ltd., Chichester, 1989.

Crossrefs

Cf. A000032, A000204, A001177, A194363, A053028 (primes not dividing any Lucas numbers), A106291, A253808.

Programs

  • Mathematica
    test[n_] := Module[{a, b, t, cnt = 1}, {a, b} = {2, 1}; While[cnt++; t = b; b = Mod[a + b, n]; a = t; ! (b == 0 || {a, b} == {2, 1})]; If[b == 0, cnt, -1]]; Join[{0, 0}, Table[test[i], {i, Range[3, 100]}]] (* T. D. Noe, Mar 22 2013 *)

Extensions

Edited. Added "k >= 0" in the name and added cross references. - Wolfdieter Lang, Jan 20 2015

A266587 Smallest index of a Lucas number (A000032) that is divisible by prime(n), if it exists, or 0 if it does not exist (for n > 1).

Original entry on oeis.org

0, 2, 0, 4, 5, 0, 0, 9, 12, 7, 15, 0, 10, 22, 8, 0, 29, 0, 34, 35, 0, 39, 42, 0, 0, 25, 52, 18, 0, 0, 64, 65, 0, 23, 0, 25, 0, 82, 84, 0, 89, 45, 95, 0, 0, 11, 21, 112, 114, 57, 0, 119, 60, 125, 0, 44, 0, 135, 0, 14, 142, 0, 22, 155, 0, 0, 55, 0, 58, 87, 0, 179, 184, 0, 189, 192, 0, 0, 50, 102, 209, 0, 215, 0, 219, 222, 112, 0, 23, 232, 234, 239, 244, 245
Offset: 1

Views

Author

Richard R. Forberg, Jan 01 2016

Keywords

Comments

These a(n) values may be called Lucas "entry points".
a(1)=0, corresponding to prime(1)= 2, must be viewed as a special case here, because 0, in this case only, is the correct smallest index.
For all other zeros in a(n) (e.g., for a(3), a(6), a(7) corresponding to prime(3)=5, prime(6)=13, prime(7)=17), there are no Lucas numbers divisible by these primes. The full set of primes not divisible into any Lucas number are given by A053028.
For a(n) > 0, a(n) is always equal to either (prime(n)-1)/k or (prime(n)+1)/k, for some k >= 1. This is similar to the Fibonacci entry points given by A001602.
For each value of a(n) > 0 there is an infinite, periodic subsequence within the Lucas numbers divisible by prime(n), given by Lucas(a(n) + 2*i*a(n)), for all i >= 0. Again this is analogous to the A001602 for Fibonacci. The periodicity of the subsequence is 2*a(n), twice the entry point vs. equal to the entry point for Fibonacci.
Conjecture: Infinite Lucas subsequences divisible by the powers of odd primes, p(n), for which a(n) > 0, are given by:
Lucas(a(n) + a(n)*(p(n)-1)*(Sum_{j=1..m-1} p(n)^(j-1)) + 2*i*a(n)*p(n)^(m-1)) is divisible by p(n)^m, where p(n) > 2, i >= 0, m > 1.
Note: the formula above also works for m=1 if the "Sum" is assumed to be zero when the upper summation index limit is less than initial summation index. See second Mathematica example below which works in this way for all m >= 1, to demonstrate the rule for p = p(n) with corresponding a = a(n).
The divisibility of Lucas numbers by powers of 2 is limited to 2^1 and 2^2, as follows: Lucas(3*i) is divisible by 2 and Lucas(3+6i) is divisible by 4, for all i >= 0.

Examples

			For prime(10) = 29, we get a(10) = 7, because Lucas(7)= 29 is the first Lucas number divisible by 29. Also note 7 = (29-1)/4.
For prime(11) = 31, we get a(11) = 15, because Lucas(15) = 1364 is the first Lucas number divisible by 31. Also note 15 = (31-1)/2.
		

Crossrefs

Essentially the same as A194363.

Programs

  • Mathematica
    result={}; Do[iresult=0; Do[If[Divisible[LucasL[i], Prime[k]], iresult=i; Break[]], {i, 1, 2000}]; AppendTo[result, iresult], {k, 2, 200}]; result
    p = 23; a = 12; m = 4; Table[Divisible[LucasL[a + a*(p - 1)*Sum[p^(j - 1), {j, 1, m - 1}] + 2a*i*p^(m - 1)], p^m], {i, 1, 100}]
Showing 1-3 of 3 results.