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.

A333599 a(n) = Fibonacci(n) * Fibonacci(n+1) mod Fibonacci(n+2).

Original entry on oeis.org

0, 1, 2, 1, 7, 1, 20, 1, 54, 1, 143, 1, 376, 1, 986, 1, 2583, 1, 6764, 1, 17710, 1, 46367, 1, 121392, 1, 317810, 1, 832039, 1, 2178308, 1, 5702886, 1, 14930351, 1, 39088168, 1, 102334154, 1, 267914295, 1, 701408732, 1, 1836311902, 1, 4807526975, 1, 12586269024
Offset: 0

Views

Author

Adnan Baysal, Mar 28 2020

Keywords

Examples

			a(0) = 0*1 mod 1 = 0;
a(1) = 1*1 mod 2 = 1;
a(2) = 1*2 mod 3 = 2;
a(3) = 2*3 mod 5 = 1;
a(4) = 3*5 mod 8 = 7.
		

Crossrefs

Equals A035508 interleaved with A000012.

Programs

  • Mathematica
    With[{f = Fibonacci}, Table[Mod[f[n] * f[n+1], f[n+2]], {n, 0, 50}]] (* Amiram Eldar, Mar 28 2020 *)
  • PARI
    a(n) = if (n % 2, 1, fibonacci(n+2) - 1); \\ Michel Marcus, Mar 29 2020
    
  • PARI
    concat(0, Vec(x*(1 + 3*x - x^3) / ((1 + x)*(1 + x - x^2)*(1 - x - x^2)) + O(x^45))) \\ Colin Barker, Mar 29 2020
  • Python
    def a(n):
        f1 = 0
        f2 = 1
        for i in range(n):
            f = f1 + f2
            f1 = f2
            f2 = f
        return (f1 * f2) % (f1 + f2)
    

Formula

a(2n+1) = 1, and a(2n) = F(2n+2) - 1, and lim(a(2n+2)/a(2n)) = phi^2 by d'Ocagne's identity.
a(n) = F(n) * F(n+1) mod (F(n) + F(n+1)) since F(n+2) := F(n+1) + F(n).
From Colin Barker, Mar 28 2020: (Start)
G.f.: x*(1 + 3*x - x^3) / ((1 + x)*(1 + x - x^2)*(1 - x - x^2)).
a(n) = -a(n-1) + 3*a(n-2) + 3*a(n-3) - a(n-4) - a(n-5) for n>4.
(End)

A072565 a(n) = prime(n+1)*prime(n+2)+1 mod prime(n), where prime(n) is the n-th prime.

Original entry on oeis.org

0, 0, 3, 4, 2, 12, 13, 3, 3, 17, 30, 25, 13, 41, 26, 49, 17, 0, 25, 17, 61, 41, 2, 8, 25, 13, 25, 13, 73, 27, 41, 49, 25, 121, 17, 73, 61, 41, 73, 49, 25, 121, 13, 25, 29, 90, 193, 25, 13, 41, 49, 25, 161, 73, 73, 49, 17, 61, 25, 25, 241, 253, 25, 13, 73, 281, 97, 121, 13
Offset: 1

Views

Author

G. L. Honaker, Jr., Aug 06 2002

Keywords

Examples

			a(18) = prime(19)*prime(20)+1 mod prime(18) = 67*71+1 mod 61 = 0.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers: A Computational Perspective, Springer-Verlag, NY, (2002 printing), Research problem 1.85, p. 73.

Crossrefs

Programs

  • GAP
    P:=Filtered([1..1000],IsPrime);;
    List([1..70],n->(P[n+1]*P[n+2]+1) mod P[n]); # Muniru A Asiru, Mar 09 2018
  • Magma
    [(NthPrime(n+1)*NthPrime(n+2)+1) mod NthPrime(n): n in [1..100]]; // Vincenzo Librandi, Feb 28 2018
    
  • Maple
    p:=ithprime; seq((p(n+1)*p(n+2)+1) mod p(n),n=1..70); # Muniru A Asiru, Mar 09 2018
  • Mathematica
    a[n_] := Mod[Prime[n+1] Prime[n+2] + 1, Prime[n]]
    Mod[#[[2]]#[[3]]+1,#[[1]]]&/@Partition[Prime[Range[80]],3,1] (* Harvey P. Dale, Dec 19 2018 *)
  • PARI
    a(n) = (prime(n+1)*prime(n+2) + 1) % prime(n); \\ Michel Marcus, Feb 28 2018
    

Formula

a(n) = A023523(n+1) mod A000040(n). - Michel Marcus, Feb 28 2018

Extensions

Edited by Dean Hickerson and Robert G. Wilson v, Aug 10 2002

A182126 a(n) = prime(n)*prime(n+1) mod prime(n+2).

Original entry on oeis.org

1, 1, 2, 12, 7, 12, 1, 2, 16, 11, 40, 12, 24, 7, 13, 16, 48, 40, 12, 48, 40, 60, 15, 48, 12, 24, 12, 24, 125, 72, 60, 16, 120, 24, 48, 72, 40, 60, 72, 16, 120, 24, 24, 12, 168, 65, 64, 12, 24, 60, 16, 120, 96, 72, 72, 16, 48, 40, 12, 120, 29, 72, 12, 24, 252
Offset: 1

Views

Author

Alex Ratushnyak, Apr 13 2012

Keywords

Comments

Conjecture: for x>10^9, the most frequent value in a(n), n=0...x, has form 120*k.
Let b = prime(n+2) - prime(n) and c = prime(n+2) - prime(n+1). Conjecture: for n > 61, a(n) = b*c. This holds up to n = 9 * 10^16. - Charles R Greathouse IV, May 11 2012
With b and c as above, a(n) = b*c if and only if b*c < prime(n+2). Cramér's conjecture implies this is true for all sufficiently large n. - Robert Israel, Jun 19 2017

Examples

			(2*3) mod 5 = 1, (3*5) mod 7 = 1, (5*7) mod 11 = 2, (7*11) mod 13 = 12.
		

Crossrefs

Programs

  • Haskell
    a182126 n = a182126_list !! (n-1)
    a182126_list = zipWith3 (\p p' p'' -> mod (p * p') p'')
                      a000040_list (tail a000040_list) (drop 2 a000040_list)
    -- Reinhard Zumkeller, Apr 23 2012
    
  • Magma
    [NthPrime(n)*NthPrime(n+1) mod NthPrime(n+2): n in [1..70]]; // Vincenzo Librandi, Jun 20 2017
  • Maple
    P:= [seq(ithprime(i),i=1..102)]:
    seq(P[i]*P[i+1] mod P[i+2], i=1..100); # Robert Israel, Jun 19 2017
  • Mathematica
    Mod[#[[1]]#[[2]],#[[3]]]&/@Partition[Prime[Range[70]],3,1] (* Harvey P. Dale, Sep 30 2015 *)
  • PARI
    p=2;q=3;forprime(r=5,1e3,print1(p*q%r", ");p=q;q=r) \\ Charles R Greathouse IV, May 11 2012
    
Showing 1-3 of 3 results.