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.

A182625 Numbers n for which Fibonacci(n) mod n is a Fibonacci number.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 10, 11, 12, 14, 19, 20, 21, 22, 24, 25, 29, 31, 32, 33, 36, 38, 41, 42, 48, 54, 55, 56, 58, 59, 60, 61, 62, 71, 72, 76, 77, 79, 80, 82, 89, 92, 93, 95, 96, 101, 104, 105, 108, 109, 110, 118, 119, 120, 121, 122, 123, 124, 125, 131, 133, 139, 142
Offset: 1

Views

Author

Carmine Suriano, Mar 30 2011

Keywords

Examples

			Fibonacci(12) = 144, 144 mod 12 = 0, and 0 is a Fibonacci number. Therefore 12 is in the sequence.
Fibonacci(14) = 377, 377 mod 14 = 13, and 13 is a Fibonacci number. Therefore 14 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA000045 := proc(n) local F,i; for i from 0 do F := combinat[fibonacci](i) ; if F> n then return false; elif F = n then return true; end if; end do;end proc:
    isA182625 := proc(n) isA000045(combinat[fibonacci](n) mod n) ; end proc:
    for n from 1 to 300 do if isA182625(n) then printf("%d,",n) ; end if; end do: # R. J. Mathar, Apr 02 2011
    # second Maple program:
    b:= 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:
    a:= proc(n) option remember; local k;
          for k from 1+`if`(n=1, 0, a(n-1)) while (t->
             not (issqr(t+4) or issqr(t-4)))(5*b(k)^2)
          do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Nov 26 2016
  • Mathematica
    nn=12; f=Table[Fibonacci[n], {n,0,nn}]; Select[Range[f[[-1]]], MemberQ[f, Mod[Fibonacci[#],#]]&] (* T. D. Noe, Apr 02 2011 *)
  • PARI
    is(n)=my(k=(fibonacci(n)%n)^2);k+=(k+1)<<2; issquare(k) || issquare(k-8) \\ Charles R Greathouse IV, Jul 30 2012

Formula

{n: A002708(n) in A000045}. - R. J. Mathar, Apr 02 2011