login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) = A000045(n)^A000045(n+1) mod A000045(n+2).
2

%I #26 Dec 23 2021 17:33:47

%S 0,1,1,3,3,1,8,13,1,55,55,1,144,233,1,987,987,1,2584,4181,1,17711,

%T 17711,1,46368,75025,1,317811,317811,1,832040,1346269,1,5702887,

%U 5702887,1,14930352,24157817,1,102334155,102334155,1,267914296,433494437,1,1836311903,1836311903,1,4807526976,7778742049

%N a(n) = A000045(n)^A000045(n+1) mod A000045(n+2).

%H Robert Israel, <a href="/A350253/b350253.txt">Table of n, a(n) for n = 0..4763</a>

%H <a href="/index/Rec#order_15">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,1,0,0,18,0,0,-18,0,0,-1,0,0,1).

%F a(n) = 1 if n == 2 or 5 (mod 6),

%F = A000045(n) if n == 0, 1 or 4 (mod 6),

%F = A000045(n+1) if n == 3 (mod 6).

%F G.f.: (z + z^2 + 3*z^3 + 2*z^4 + 5*z^6 - 8*z^7 - 18*z^8 - 7*z^9 + 6*z^10 - z^12 - z^13 + z^14)/(1 - z^3 - 18*z^6 + 18*z^9 + z^12 - z^15).

%e a(3) = 2^3 mod 5 = 3.

%p f:= proc(n)

%p if n mod 6 = 3 then combinat:-fibonacci(n+1)

%p elif n mod 3 = 2 then 1

%p else combinat:-fibonacci(n)

%p fi

%p end proc:

%p map(f, [$0..100]);

%t Table[PowerMod @@ Fibonacci[n + {0, 1, 2}], {n, 0, 50}] (* _Amiram Eldar_, Dec 22 2021 *)

%o (PARI) a(n) = lift(Mod(fibonacci(n), fibonacci(n+2))^fibonacci(n+1)); \\ _Michel Marcus_, Dec 22 2021

%o (Python)

%o from sympy import fibonacci

%o def A350253(n): return 1 if (m := n % 6) == 2 or m == 5 else (fibonacci(n+1) if m == 3 else fibonacci(n)) # from formula _Chai Wah Wu_, Dec 22 2021

%Y Cf. A000045.

%K nonn,easy

%O 0,4

%A _J. M. Bergot_ and _Robert Israel_, Dec 21 2021