6 kyu

Fibofamily #1

80 of 119groskowski

Description:

Definition

The Fibonacci number can be extended non-linearly to a new number called P(n)P(n) with the recurrence relation 1+P(n+2)1+P(n)=1+P(n+1)\frac{1+P(n+2)}{1+P(n)}=1+P(n+1), for n0n \geq 0. Find G(n)=P(n)mod9G(n)=P(n)\mod 9 if P(0)=7P(0)=7 and P(1)=31P(1)=31. Brute force will not work!

Constraints

0 <= n <= 10^9

Good luck!

Mathematics
Performance

Stats:

CreatedOct 29, 2022
PublishedOct 29, 2022
Warriors Trained522
Total Skips21
Total Code Submissions571
Total Times Completed119
Python Completions80
JavaScript Completions27
C# Completions14
Java Completions16
Ruby Completions11
Total Stars15
% of votes with a positive feedback rating85% of 42
Total "Very Satisfied" Votes32
Total "Somewhat Satisfied" Votes7
Total "Not Satisfied" Votes3
Total Rank Assessments7
Average Assessed Rank
6 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • groskowski Avatar
  • hobovsky Avatar
  • dfhwze Avatar
Ad