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.

A245515 a(n) = n*floor(mod((gcd(n, Fibonacci((-1)^n + n))), 1 + n)/n) for n>=2.

Original entry on oeis.org

1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 79, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Keywords

Comments

Sequence with many prime numbers and zeros.
The primes occurring in this sequence are given in A064739. The subsequence of composite numbers starts 1891, 2737, 2834, 4181, 6601, 6721, 8149, 13201, 13981, ... - Joerg Arndt, Nov 19 2017

Examples

			For n=1, a(1)=1; for n=2, a(2)=2.
		

Programs

  • Magma
    [n*((Gcd(n, Fibonacci((-1)^n+n)) mod (1+n)) div n): n in [1..100]]; // Vincenzo Librandi, Dec 17 2016
  • Maple
    f:= n -> n*floor(modp((igcd(n, combinat:-fibonacci((-1)^n + n))), 1 + n)/n):
    seq(f(n), n=1..100); # Robert Israel, Jul 25 2014
  • Mathematica
    Table[n*Floor[Mod[(GCD[n, Fibonacci[(-1)^n + n]]), 1 + n]/n], {n, 1, 1890}]
  • PARI
    a(n) = n*((gcd(n, fibonacci((-1)^n + n)) % (1 + n))\n); \\ Michel Marcus, Jul 25 2014
    
  • PARI
    a(n)=gcd(n, lift(((Mod([1,1;1,0],n))^(n+(-1)^n))[1,2]))\n*n \\ Charles R Greathouse IV, Jul 25 2014
    

Formula

a(n) = n*floor(mod((gcd(n, fibonacci((-1)^n + n))), 1 + n)/n) for n>=1.