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

A005478 Prime Fibonacci numbers.

Original entry on oeis.org

2, 3, 5, 13, 89, 233, 1597, 28657, 514229, 433494437, 2971215073, 99194853094755497, 1066340417491710595814572169, 19134702400093278081449423917, 475420437734698220747368027166749382927701417016557193662268716376935476241
Offset: 1

Views

Author

Keywords

Comments

a(n) == 1 (mod 4) for n > 2. (Proof. Otherwise 3 < a(n) = F_k == 3 (mod 4). Then k == 4 (mod 6) (see A079343 and A161553) and so k is not prime. But k is prime since F_k is prime and k != 4 - see Caldwell.)
More generally, A190949(n) == 1 (mod 4). - N. J. A. Sloane
With the exception of 3, every term of this sequence has a prime index in the sequence of Fibonacci numbers (A000045); e.g., 5 is the fifth Fibonacci number, 13 is the seventh Fibonacci number, 89 the eleventh, etc. - Alonso del Arte, Aug 16 2013
Note: A001605 gives those indices. - Antti Karttunen, Aug 16 2013
The six known safe primes 2p + 1 such that p is a Fibonacci prime are in A263880; the values of p are in A155011. There are only two known Fibonacci primes p for which 2p - 1 is also prime, namely, p = 2 and 3. Is there a reason for this bias toward prime 2p + 1 over 2p - 1 among Fibonacci primes p? - Jonathan Sondow, Nov 04 2015

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 89, p. 32, Ellipses, Paris 2008.
  • R. K. Guy, Unsolved Problems in Number Theory, Section A3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A178762.
Column k=1 of A303216.

Programs

  • Mathematica
    Select[Fibonacci[Range[400]], PrimeQ] (* Alonso del Arte, Oct 13 2011 *)
  • PARI
    je=[]; for(n=0,400, if(isprime(fibonacci(n)),je=concat(je,fibonacci(n)))); je
    
  • Python
    from itertools import islice
    from sympy import isprime
    def A005478_gen(): # generator of terms
        a, b = 1, 1
        while True:
            if isprime(b):
                yield b
            a, b = b, a+b
    A005478_list = list(islice(A005478_gen(),10)) # Chai Wah Wu, Jun 25 2024
  • Sage
    [i for i in fibonacci_xrange(0,10^80) if is_prime(i)] # Bruno Berselli, Jun 26 2014
    

Formula

a(n) = A000045(A001605(n)). A000040 INTERSECT A000045. - R. J. Mathar, Nov 01 2007

Extensions

Sequence corrected by Enoch Haga, Feb 11 2000
One more term from Jason Earls, Jul 12 2001
Comment and proof added by Jonathan Sondow, May 24 2011

A001177 Fibonacci entry points: a(n) = least k >= 1 such that n divides Fibonacci number F_k (=A000045(k)).

Original entry on oeis.org

1, 3, 4, 6, 5, 12, 8, 6, 12, 15, 10, 12, 7, 24, 20, 12, 9, 12, 18, 30, 8, 30, 24, 12, 25, 21, 36, 24, 14, 60, 30, 24, 20, 9, 40, 12, 19, 18, 28, 30, 20, 24, 44, 30, 60, 24, 16, 12, 56, 75, 36, 42, 27, 36, 10, 24, 36, 42, 58, 60, 15, 30, 24, 48, 35, 60, 68, 18, 24, 120
Offset: 1

Views

Author

Keywords

Comments

In the formula, the relation a(p^e) = p^(e-1)*a(p) is called Wall's conjecture, which has been verified for primes up to 10^14. See A060305. Primes for which this relation fails are called Wall-Sun-Sun primes. - T. D. Noe, Mar 03 2009
All solutions to F_m == 0 (mod n) are given by m == 0 (mod a(n)). For a proof see, e.g., Vajda, p. 73. [Old comment changed by Wolfdieter Lang, Jan 19 2015]
If p is a prime of the form 10n +- 1 then a(p) is a divisor of p-1. If q is a prime of the form 10n +- 3 then a(q) is a divisor of q+1. - Robert G. Wilson v, Jul 07 2007
Definition 1 in Riasat (2011) calls this k(n), or sometimes just k. Corollary 1 in the same paper, "every positive integer divides infinitely many Fibonacci numbers," demonstrates that this sequence is infinite. - Alonso del Arte, Jul 27 2013
If p is a prime then a(p) <= p+1. This is because if p is a prime then exactly one of the following Fibonacci numbers is a multiple of p: F(p-1), F(p) or F(p+1). - Dmitry Kamenetsky, Jul 23 2015
From Renault 1996:
1. a(lcm(n,m)) = lcm(a(n), a(m)).
2. if n|m then a(n)|a(m).
3. if m has prime factorization m=p1^e1 * p2^e2 * ... * pn^en then a(m) = lcm(a(p1^e1), a(p2^e2), ..., a(pn^en)). - Dmitry Kamenetsky, Jul 23 2015
a(n)=n if and only if n=5^k or n=12*5^k for some k >= 0 (see Marques 2012). - Dmitry Kamenetsky, Aug 08 2015
Every positive integer (except 2) eventually appears in this sequence. This is because every Fibonacci number bigger than 1 (except Fibonacci(6)=8 and Fibonacci(12)=144) has at least one prime factor that is not a factor of any earlier Fibonacci number (see Knott reference). Let f(n) be such a prime factor for Fibonacci(n); then a(f(n))=n. - Dmitry Kamenetsky, Aug 08 2015
We can reconstruct the Fibonacci numbers from this sequence using the formula Fibonacci(n+2) = 1 + Sum_{i: a(i) <= n} phi(i)*floor(n/a(i)), where phi(n) is Euler's totient function A000010 (see the Stroinski link). For example F(6) = 1 + phi(1)*floor(4/a(1)) + phi(2)*floor(4/a(2)) + phi(3)*floor(4/a(4)) = 1 + 1*4 + 1*1 + 2*1 = 8. - Peter Bala, Sep 10 2015
Conjecture: Sum_{d|n} phi(d)*a(d) = A232656(n). - Logan J. Kleinwaks, Oct 28 2017
a(F_m) = m for all m > 1. Indeed, let (b(j)) be defined by b(1)=b(2)=1, and b(j+2) = (b(j) + b(j+1)) mod n. Then a(n) equals the index of the first occurrence of 0 in (b(j)). Example: if n=4 then b = A079343 = 1,1,2,3,1,0,1,1,..., so a(4)=6. If n is a Fibonacci number n=F_m, then obviously a(n)=m. Note that this gives a simple proof of the fact that all integers larger than 2 occur in (a(n)). - Michel Dekking, Nov 10 2017

Examples

			a(4) = 6 because the smallest Fibonacci number that 4 divides is F(6) = 8.
a(5) = 5 because the smallest Fibonacci number that 5 divides is F(5) = 5.
a(6) = 12 because the smallest Fibonacci number that 6 divides is F(12) = 144.
From _Wolfdieter Lang_, Jan 19 2015: (Start)
a(2) = 3, hence 2 | F(m) iff m = 2*k, for k >= 0;
a(3) = 4, hence 3 | F(m) iff m = 4*k, for k >= 0;
etc. See a comment above with the Vajda reference.
(End)
		

References

  • A. Brousseau, Fibonacci and Related Number Theoretic Tables. Fibonacci Association, San Jose, CA, 1972, p. 25.
  • B. H. Hannon and W. L. Morris, Tables of Arithmetical Functions Related to the Fibonacci Numbers. Report ORNL-4261, Oak Ridge National Laboratory, Oak Ridge, Tennessee, June 1968.
  • Alfred S. Posamentier & Ingmar Lehmann, The (Fabulous) Fibonacci Numbers, Afterword by Herbert A. Hauptman, Nobel Laureate, 2. 'The Minor Modulus m(n)', Prometheus Books, NY, 2007, page 329-342.
  • 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.
  • N. N. Vorob'ev, Fibonacci numbers, Blaisdell, NY, 1961.

Crossrefs

Cf. A000045, A001175, A001176, A060383, A001602. First occurrence of k is given in A131401. A233281 gives such k that a(k) is a prime.
From Antti Karttunen, Dec 21 2013: (Start)
Various derived sequences:
A047930(n) = A000045(a(n)).
A037943(n) = A000045(a(n))/n.
A217036(n) = A000045(a(n)-1) mod n.
A132632(n) = a(n^2).
A132633(n) = a(n^3).
A214528(n) = a(n!).
A215011(n) = a(A000217(n)).
A215453(n) = a(n^n).
Analogous sequence for the tribonacci numbers: A046737, for Lucas numbers: A223486, for Pell numbers: A214028.

Programs

  • Haskell
    a001177 n = head [k | k <- [1..], a000045 k `mod` n == 0]
    -- Reinhard Zumkeller, Jan 15 2014
  • Maple
    A001177 := proc(n)
            for k from 1 do
                    if combinat[fibonacci](k) mod n = 0 then
                            return k;
                    end if;
            end do:
    end proc: # R. J. Mathar, Jul 09 2012
    N:= 1000: # to get a(1) to a(N)
    L:= ilcm($1..N):
    count:= 0:
    for n from 1 while count < N do
      fn:= igcd(L,combinat:-fibonacci(n));
      divs:= select(`<=`,numtheory:-divisors(fn),N);
      for d in divs do if not assigned(A[d]) then count:= count+1; A[d]:= n fi od:
    od:
    seq(A[n],n=1..N); # Robert Israel, Oct 14 2015
  • Mathematica
    fibEntry[n_] := Block[{k = 1}, While[ Mod[ Fibonacci@k, n] != 0, k++ ]; k]; Array[fibEntry, 74] (* Robert G. Wilson v, Jul 04 2007 *)
  • PARI
    a(n)=if(n<0,0,s=1;while(fibonacci(s)%n>0,s++);s) \\ Benoit Cloitre, Feb 10 2007
    
  • PARI
    ap(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)=if(n==1,return(1)); my(f=factor(n), v); v=vector(#f~, i, if(f[i,1]>1e14,ap(f[i,1]^f[i,2]), ap(f[i,1])*f[i,1]^(f[i,2]-1))); if(f[1,1]==2&&f[1,2]>1, v[1]=3<Charles R Greathouse IV, May 08 2017
    
  • Scheme
    (define (A001177 n) (let loop ((k 1)) (cond ((zero? (modulo (A000045 k) n)) k) (else (loop (+ k 1)))))) ;; Antti Karttunen, Dec 21 2013
    

Formula

A001175(n) = A001176(n) * a(n) for n >= 1.
a(n) = n if and only if n is of form 5^k or 12*5^k (proved in Marques paper), a(n) = n - 1 if and only if n is in A106535, a(n) = n + 1 if and only if n is in A000057, a(n) = n + 5 if and only if n is in 5*A000057, ... - Benoit Cloitre, Feb 10 2007
a(1) = 1, a(2) = 3, a(4) = 6 and for e > 2, a(2^e) = 3*2^(e-2); a(5^e) = 5^e; and if p is an odd prime not 5, then a(p^e) = p^max(0, e-s)*a(p) where s = valuation(A000045(a(p)), p) (Wall's conjecture states that s = 1 for all p). If (m, n) = 1 then a(m*n) = lcm(a(m), a(n)). See Posamentier & Lahmann. - Robert G. Wilson v, Jul 07 2007; corrected by Max Alekseyev, Oct 19 2007, Jun 24 2011
Apparently a(n) = A213648(n) + 1 for n >= 2. - Art DuPre, Jul 01 2012
a(n) < n^2. [Vorob'ev]. - Zak Seidov, Jan 07 2016
a(n) < n^2 - 3n + 6. - Jinyuan Wang, Oct 13 2018
a(n) <= 2n [Salle]. - Jon Maiga, Apr 25 2019

Extensions

Definition corrected by Wolfdieter Lang, Jan 19 2015

A134492 a(n) = Fibonacci(6*n).

Original entry on oeis.org

0, 8, 144, 2584, 46368, 832040, 14930352, 267914296, 4807526976, 86267571272, 1548008755920, 27777890035288, 498454011879264, 8944394323791464, 160500643816367088, 2880067194370816120, 51680708854858323072, 927372692193078999176, 16641027750620563662096
Offset: 0

Views

Author

Artur Jasinski, Oct 28 2007

Keywords

Comments

All terms are divisible by 8. - Alonso del Arte, Jul 27 2013
Conjecture: For n >= 2, the terms of this sequence are exactly those Fibonacci numbers which are the sum of the three numbers of a Pythagorean triple (checked up to F(80)). - Felix Huber, Nov 03 2023

Crossrefs

Programs

Formula

a(n) = 18*a(n-1) - a(n-2) = 8*A049660(n). G.f.: 8*x/(1-18*x+x^2). - R. J. Mathar, Feb 16 2010
a(n) = A000045(A008588(n)). - Michel Marcus, Nov 08 2013
a(n) = ((-1+(9+4*sqrt(5))^(2*n)))/(sqrt(5)*(9+4*sqrt(5))^n). - Colin Barker, Jan 24 2016
a(n) = L(2n-1) * F(2n+1)^2 + L(2n+1) * F(2n-1)^2, where F(n) = A000045(n) and L(n) = A000032(n). - Diego Rattaggi, Nov 12 2020
a(n) = Fibonacci(3*n) * Lucas(3*n) = A000045(3*n) * A000032(3*n) = A014445(n) * A014448(n). - Amiram Eldar, Jan 11 2022

Extensions

Offset corrected by R. J. Mathar, Feb 16 2010

A131296 a(n) = ds_5(a(n-1))+ds_5(a(n-2)), a(0)=0, a(1)=1; where ds_5=digital sum base 5.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3, 5, 4, 5, 5, 2, 3
Offset: 0

Views

Author

Hieronymus Fischer, Jun 27 2007

Keywords

Comments

The digital sum analog (in base 5) of the Fibonacci recurrence.
When starting from index n=3, periodic with Pisano period A001175(4)=6.
a(n) and Fib(n)=A000045(n) are congruent modulo 4 which implies that (a(n) mod 4) is equal to (Fib(n) mod 4)=A079343(n). Thus (a(n) mod 4) is periodic with the Pisano period A001175(4)=6 too.
For general bases p>2, the inequality 2<=a(n)<=2p-3 holds for n>2. Actually, a(n)<=5=A131319(5) for the base p=5.

Examples

			a(10)=3, since a(8)=5=10(base 5), ds_5(5)=1,
a(9)=2, ds_5(2)=2 and so a(10)=1+2.
		

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_}]:={b,Total[IntegerDigits[a,5]]+Total[IntegerDigits[b,5]]}; NestList[nxt,{0,1},100][[;;,1]] (* Harvey P. Dale, Sep 01 2024 *)

Formula

a(n) = a(n-1)+a(n-2)-4*(floor(a(n-1)/5)+floor(a(n-2)/5)).
a(n) = floor(a(n-1)/5)+floor(a(n-2)/5)+(a(n-1)mod 5)+(a(n-2)mod 5).
a(n) = A002266(a(n-1))+A002266(a(n-2))+A010874(a(n-1))+A010874(a(n-2)).
a(n) = Fib(n)-4*sum{1A000045(n).

Extensions

Incorrect comment removed by Michel Marcus, Apr 29 2018

A082115 Fibonacci sequence (mod 3).

Original entry on oeis.org

0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2, 1, 0, 1, 1, 2, 0, 2, 2
Offset: 0

Views

Author

Eric W. Weisstein, Apr 03 2003

Keywords

Crossrefs

Programs

Formula

Sequence is periodic with Pisano period 8.
a(n) = 1-floor(n/8)+floor((n-1)/8)+floor((n-3)/8)-2*floor((n-4)/8) +2*floor((n-5)/8)-floor((n-7)/8). - Hieronymus Fischer, Jul 01 2007
a(n) = 1+((n mod 8)+((n+1)mod 8)-2*((n+3)mod 8)+2*((n+4)mod 8) -((n+5)mod 8) -((n+7)mod 8))/8. - Hieronymus Fischer, Jul 01 2007
G.f.: (x+x^2+2x^3+2x^5+2x^6+x^7)/(1-x^8). - Hieronymus Fischer, Jul 01 2007
a(n) = A131295(n) mod 3 (for n>0). - Hieronymus Fischer, Jul 01 2007

Extensions

Added a(0)=0. - Jon Perry, Sep 15 2013

A082116 Fibonacci sequence (mod 5).

Original entry on oeis.org

0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1, 2, 3, 0, 3, 3, 1, 4, 0, 4, 4, 3, 2, 0, 2, 2, 4, 1, 0, 1, 1
Offset: 0

Views

Author

Eric W. Weisstein, Apr 03 2003

Keywords

Comments

This sequence contains the complete set of residues modulo 5. See A079002. - Michel Marcus, Jan 31 2020

References

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

Crossrefs

Programs

Formula

Sequence is periodic with Pisano period 20.
a(n) = 2 + ((n mod 20) - ((n - 1) mod 20) - ((n - 3) mod 20) - ((n - 4) mod 20) + 3*((n - 5) mod 20) - 3*((n - 6) mod 20) + 2*((n - 8) mod 20) - 3*((n - 9) mod 20) + 4*((n - 10) mod 20) - 4*((n - 11) mod 20) + ((n - 13) mod 20) + ((n - 14) mod 20) + 2*((n - 15) mod 20) - 2*((n - 16) mod 20) - 2*((n - 18) mod 20) + 3*((n - 19) mod 20))/20. - Hieronymus Fischer, Jun 30 2007
G.f.: (x + x^2 + 2x^3 + 3x^4 + 3x^6 + 3x^7 + x^8 + 4x^9 + 4x^11 + 4x^12 + 3x^13 + 2x^14 + 2x^16 + 2x^17 + 4x^18 + x^19)/(1 - x^20), not reduced. - Hieronymus Fischer, Jun 30 2007
a(n) = A010073(n) mod 5. - Hieronymus Fischer, Jun 30 2007
G.f.: -x*(1 + x + x^2 + 2*x^3 + 3*x^6 - x^7 - 2*x^8 - x^4 + x^9 + 4*x^10 + x^11) / ( (x - 1) * (x^4 + x^3 + x^2 + x + 1) * (x^8 - x^6 + x^4 - x^2 + 1) ). - R. J. Mathar, Jul 14 2012

Extensions

Added a(0)=0 from Vincenzo Librandi, Feb 04 2014

A079344 F(n) mod 8, where F(n) = A000045(n) is the n-th Fibonacci number.

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5, 2, 7, 1, 0, 1, 1, 2, 3, 5, 0, 5, 5
Offset: 0

Views

Author

Jon Perry, Jan 04 2003

Keywords

Comments

This sequence does not contain the complete set of residues modulo 8. See A079002. - Michel Marcus, Jan 31 2020

Examples

			a(8) = F(8) mod 8 = 21 mod 8 = 5.
		

Crossrefs

Programs

  • Magma
    [Fibonacci(n) mod 8: n in [0..100]]; // Vincenzo Librandi, Feb 04 2014
  • Mathematica
    Mod[Fibonacci[Range[0,110]],8] (* or *) LinearRecurrence[ {1,0,0,-1,1,0,0,-1,1},{0,1,1,2,3,5,0,5,5},110] (* Harvey P. Dale, Jan 16 2014 *)
  • PARI
    for (n=0,100,print1(fibonacci(n)%8","))
    

Formula

Sequence is periodic with Pisano period 12 = A001175(8).
G.f.: -x*(1+x^2+x^3+3*x^4+6*x^6-5*x^5+x^7) / ( (x-1)*(x^2-x+1)*(1+x+x^2)*(x^4-x^2+1) ). - R. J. Mathar, Aug 08 2012

Extensions

Edited by N. J. A. Sloane, Dec 06 2008 at the suggestion of R. J. Mathar

A082117 Fibonacci sequence (mod 6).

Original entry on oeis.org

0, 1, 1, 2, 3, 5, 2, 1, 3, 4, 1, 5, 0, 5, 5, 4, 3, 1, 4, 5, 3, 2, 5, 1, 0, 1, 1, 2, 3, 5, 2, 1, 3, 4, 1, 5, 0, 5, 5, 4, 3, 1, 4, 5, 3, 2, 5, 1, 0, 1, 1, 2, 3, 5, 2, 1, 3, 4, 1, 5, 0, 5, 5, 4, 3, 1, 4, 5, 3, 2, 5, 1, 0, 1, 1, 2, 3, 5, 2, 1, 3, 4, 1, 5, 0, 5, 5, 4, 3, 1, 4, 5, 3, 2, 5, 1, 0, 1, 1, 2, 3, 5, 2
Offset: 0

Views

Author

Eric W. Weisstein, Apr 03 2003

Keywords

Crossrefs

Programs

Formula

Sequence is periodic with Pisano period 24 = A001175(6).
G.f.: -x*(x^22 + 5*x^21 + 2*x^20 + 3*x^19 + 5*x^18 + 4*x^17 + x^16 + 3*x^15 + 4*x^14 + 5*x^13 + 5*x^12 + 5*x^10 + x^9 + 4*x^8 + 3*x^7 + x^6 + 2*x^5 + 5*x^4 + 3*x^3 + 2*x^2 + x + 1)/((x - 1)*(x + 1)*(x^2 - x + 1)*(x^2 + 1)*(x^2 + x + 1)*(x^4 - x^2 + 1)*(x^4 + 1)*(x^8 - x^4 + 1)). - Colin Barker, Aug 15 2012

Extensions

Added a(0)=0 from Vincenzo Librandi, Feb 04 2014

A128924 T(n,m) is the number of m's in the fundamental period of Fibonacci numbers mod n.

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Apr 25 2007

Keywords

Comments

T(n,m) is the triangle read by rows, 0<=m
A118965 and A066853 give numbers of zeros and nonzeros in n-th row, respectively. - Reinhard Zumkeller, Jan 16 2014

Examples

			{F(k) mod 4} has fundamental period (0,1,1,2,3,1), see A079343, with
T(4,0)=1 zero, T(4,1)=3 ones, T(4,2)=1 two's, T(4,3)=1 three's. The triangle starts
1,
1, 2,
2, 3, 3,
1, 3, 1, 1,
4, 4, 4, 4, 4,
2, 6, 3, 4, 3, 6,
2, 4, 2, 1, 1, 2, 4,
2, 3, 2, 1, 0, 3, 0, 1,
2, 5, 2, 2, 2, 2, 2, 2, 5,
4, 8, 4, 8, 4, 8, 4, 8, 4, 8,
1, 3, 2, 1, 0, 1, 0, 0, 1, 0, 1,
2, 5, 2, 2, 1, 5, 0, 1, 1, 2, 2, 1,
4, 4, 2, 2, 0, 4, 0, 0, 4, 0, 2, 2, 4,
2, 8, 2, 2, 1, 4, 4, 4, 4, 4, 1, 2, 2, 8,
2, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3, 2, 3, 3,
2, 3, 4, 1, 0, 3, 0, 1, 2, 3, 0, 1, 0, 3, 0, 1,
4, 4, 2, 2, 4, 2, 0, 0, 2, 2, 0, 0, 2, 4, 2, 2, 4,
		

Crossrefs

Cf. A053029, A053030, A053031, A001175 (row sums), A001176 (1st column).

Programs

  • Haskell
    import Data.List (group, sort)
    a128924 n k = a128924_tabl !! (n-1) !! (k-1)
    a128924_tabl = map a128924_row [1..]
    a128924_row 1 = [1]
    a128924_row n = f [0..n-1] $ group $ sort $ g 1 ps where
       f []     _                            = []
       f (v:vs) wss'@(ws:wss) | head ws == v = length ws : f vs wss
                              | otherwise    = 0 : f vs wss'
       g 0 (1 : xs) = []
       g _ (x : xs) = x : g x xs
       ps = 1 : 1 : zipWith (\u v -> (u + v) `mod` n) (tail ps) ps
    -- Reinhard Zumkeller, Jan 16 2014
  • Maple
    A128924 := proc(m,h)
        local resul,k,M ;
        resul :=0 ;
        for k from 0 to A001175(m)-1 do
            M := combinat[fibonacci](k) mod m ;
            if M = h then
                resul := resul+1 ;
            end if ;
        end do;
        resul ;
    end proc:
    seq(seq(A128924(m,h),h=0..m-1),m=1..17) ;
  • Mathematica
    A001175[1] = 1; A001175[n_] := For[k = 1, True, k++, If[Mod[Fibonacci[k], n] == 0 && Mod[Fibonacci[k+1], n] == 1, Return[k]]]; T[m_, h_] := Module[{resul, k, M}, resul = 0; For[k = 0, k <= A001175[m]-1, k++, M = Mod[Fibonacci[k], m]; If[ M == h, resul++]]; Return[resul]]; Table[T[m, h], {m, 1, 17}, {h, 0, m-1}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Maple code *)

Formula

T(n,n) = A235715(n). - Reinhard Zumkeller, Jan 17 2014

A004697 a(n) = floor(Fibonacci(n)/4).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 3, 5, 8, 13, 22, 36, 58, 94, 152, 246, 399, 646, 1045, 1691, 2736, 4427, 7164, 11592, 18756, 30348, 49104, 79452, 128557, 208010, 336567, 544577, 881144, 1425721, 2306866, 3732588, 6039454
Offset: 0

Keywords

Comments

Partial sums of A079962. - Mircea Merca, Jan 04 2011

Crossrefs

See A000045 for the Fibonacci numbers.
Cf. A079962.

Programs

  • Magma
    [Floor(Fibonacci(n)/4): n in [0..40]]; // Vincenzo Librandi, Jul 09 2012
    
  • Maple
    A004697 := proc(n) floor(combinat[fibonacci](n)/4) ; end proc:
  • Mathematica
    CoefficientList[Series[x^5/((1-x)*(1-x-x^2)*(1+x^2+x^4)),{x,0,50}],x] (* Vincenzo Librandi, Jul 09 2012 *)
    Floor[Fibonacci[Range[0,50]]/4] (* or *) LinearRecurrence[ {2,-1,1,-1,1,0,-1},{0,0,0,0,0,1,2},50] (* Harvey P. Dale, Dec 05 2012 *)
  • PARI
    vector(50, n, n--; fibonacci(n)\4) \\ G. C. Greubel, Oct 09 2018

Formula

G.f.: x^5 / ((1-x)*(1-x-x^2)*(1+x^2+x^4)).
From Mircea Merca, Jan 04 2011: (Start)
a(n) = floor(Fibonacci(n)/4).
a(n) = ceiling(Fibonacci(n)/4-3/4).
a(n) = round(Fibonacci(n)/4-3/8).
a(n) = Sum_{k=1..n-2} round(Fibonacci(n)/4).
a(n) = a(n-6) + Fibonacci(n-3), n > 5. (End)
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - a(n-4) + a(n-5) - a(n-7). - R. J. Mathar, Jan 08 2011
a(n) = (A000045(n) - A079343(n))/4. - R. J. Mathar, Jul 14 2012
Showing 1-10 of 13 results. Next