The challenge involves Fibonacci numbers or one of their generalizations.

learn more… | top users | synonyms

31
votes
24answers
8k views

Fibonacci reversed!

Introduction We all know and love our Fibonacci sequence and have seen a myriad of challenge on it here already. However, we're still lacking a very simple case which this answer is going to provide: ...
6
votes
11answers
314 views

Parity of Nth Term in Fibonacci Integer Sequences

If you look at the Fibonacci Numbers, you will notice a pattern in their parity: 0, 1 , 1 , 2 , 3 , 5 , 8 , 13 , 21 , 34 , 55 , 89 , 144. Every three numbers is even, and all the others are odd. This ...
13
votes
13answers
2k views

Fibonacci products

You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the largest possible positive Fibonacci number. E.g.: 1 =...
23
votes
13answers
1k views

Fibonacci-style matrix expansion

For each row and then column of a matrix, we can add an extra entry with the sum of the last two entries in that row or column. For example with the following input matrix: [ 1 1 1 ] [ 2 3 4 ] The ...
13
votes
3answers
317 views

Reverse-Engineer the N-Bonacci sequence[s]

EDIT: I will be accepting an answer Monday, 2/15/2016. May the bytes be ever in your favor! In his "Print the N-Bonacci Sequence" challenge, @DJMcGoathem describes the N-bonacci sequences, wherein ...
5
votes
4answers
158 views

Write a program to output the nth fibonacci number in quinary

Quinary is like binary, except that 1 is represented by the text of the program, and 0 is represented as the backwards text of the program. The Fibonacci Sequence is the well known sequence F(0) = 0,...
36
votes
18answers
2k views

Print the N-bonacci sequence

This isn't very widely known, but what we call the Fibonacci sequence, AKA 1, 1, 2, 3, 5, 8, 13, 21, 34... is actually called the Duonacci sequence. This is because to get the next number, you sum ...
23
votes
11answers
1k views

Find the nth Fibohexaprime

The challenge this time is to find the nth Fibohexaprime. The definition of a Fibohexaprime is as following: We first observe a list with Fibonacci numbers: N | Fibonacci number 1 | 1 2 | 1 3 |...
19
votes
9answers
743 views

Happy Fibonacci Day!

Background Today (or Yesterday)'s is (or was) 11/23 or Fibonacci day! What better way to celebrate than to make a fibonacci cake? Examples 3 ii i_i_ii_i_i 8 ii ...
31
votes
19answers
3k views

Trump needs your help to stop the Starman!

A man from the stars has come to Earth! Luckily the president of the United States, Donald Trump, has an infinity-sided die. Using this die, he can conjure up a number which you, the mayor of Podunk, ...
60
votes
37answers
8k views

Fibonacci + Fizz Buzz = Fibo Nacci!

Fibonacci + FizzBuzz = Fibo Nacci! Your challenge is to create a Fibo Nacci program! A Fibo Nacci program outputs the first 100 Fibonacci numbers (starting from 1). If the Fibonacci number is ...
23
votes
19answers
2k views

An infinite FTW

The infinite Fibonacci word is a specific, infinite sequence of binary digits, which are calculated by repeated concatenation of finite binary words. Let us define that a Fibonacci-type word sequence ...
30
votes
12answers
2k views

Have you learned your fib-abc?

I don't like numbers, but I do like the Fibonacci sequence. I'm sure we could work something out. Please read one integer n from STDIN and output the nth Fibonacci number in base 26 (...
26
votes
17answers
3k views

Monday Mini-Golf #1: Reverse Fibonacci Solver

Monday Mini-Golf: A series of short code-golf challenges, posted (hopefully!) every Monday. A Fibonacci-like sequence is obtained using the same method as the famous Fibonacci sequence; that is, each ...
17
votes
5answers
1k views

Fibonacci in +!()[]script

Write a piece of JavaScript code that calls alert with an array containing the first 50 Fibonacci numbers in order. You may only use the following characters: +!()[]. As a reference, your code must ...
7
votes
3answers
379 views

Summation under Zeckendorf Representation

Zeckendorf's theorem shows that every positive integer can be uniquely represented as a sum of non-adjacent Fibonacci numbers. In this challenge, you have to compute the sum of two numbers in ...
33
votes
14answers
5k views

Fibonacci Spiral

Your goal is to generate a Fibonacci spiral with numbers. Example Input / Output 1 -> 1 2 -> 1 1 3 -> 1 1 2 2 2 2 6 -> 8 8 8 8 8 8 8 8 5 5 5 5 5 8 8 8 8 8 8 8 8 5 5 5 ...
19
votes
9answers
590 views

Modular Fibonacci Cycles [duplicate]

The Fibonacci sequence is a well known and famous sequence, where each successive element is the sum of the previous two. A modular Fibonacci sequence is the same, except that the addition is ...
-3
votes
9answers
335 views

Generate and print the first 20 Fibonacci numbers with the least unique characters

As the title suggests, my task is fairly straightforward: Write a program in your language of choice that will print out the first 20 Fibonacci numbers using the least unique characters. For example ...
17
votes
12answers
1k views

Output the Iccanobif Sequence

Write a program or named function that will output or return the sequence up to the nth integer in the Iccanobif sequence, documented on OEIS as A014258. Note that only the zeroth element in the ...
15
votes
4answers
2k views

Build an ASCII Fibonacci Clock

Someone built a really fancy clock using Fibonacci numbers, which looks really nice but is fairly unusable. Just the way we like it! Let's recreate this. The clock is made up of 5 sections ...
13
votes
6answers
1k views

Fibonacci program lengths

Write a program with length n that outputs another program whose length is the next Fibonacci number after n. The new program must do the same thing - output another program whose length is the next ...
3
votes
1answer
651 views

Fibonacci is so QUINE!

Your program must output atleast half of its sourcecode in reverse. Any single part of the sourcecode as long as it is one single block of neighbouring characters. Your program should not take any ...
8
votes
8answers
359 views

Fibonacci distribution validator

Related: Hello world!!! Fibonacci distribution Create a program that returns True if a given input meets the following specifications, and False otherwise: The count of numeric characters (0-9) in ...
5
votes
4answers
169 views

Quine with prime sourcecode character distribution constraints

Your program should take no input, and no network or other connections. Your program should output it's sourcecode. The sourcecode must consist of 3 types of characters: Numeric (0-9), Alpha (a-z|A-Z) ...
19
votes
19answers
3k views

Hello world!!! Fibonacci distribution

Your program should output exactly: Hello world!!! with or without linefeed after. Your program should take no input. Sourcecode character distribution must be correct according to: The number of ...
8
votes
8answers
950 views

Write a Number as a Fibonacci Sum

Let us define the Fibonacci sequence as F(1) = 1 F(2) = 2 F(n) = F(n - 2) + F(n - 1) So we have the infinite sequence 1,2,3,5,8,13,... It is well known that any positive integer can be written ...
10
votes
16answers
1k views

FIBonacci sequence

For this code golf, you will receive an input of a fibonacci sequence, that is, a normal Fibonacci sequence but with one number incorrect. See, the sequence is fibbing! Get it? :D Your job is to find ...
13
votes
7answers
4k views

Find the Pisano Period of a number

Input: An integer 0 < n < 2^30, taken from stdin. Output: The Pisano period of n (the length of the cycle of the Fibonacci sequence mod n) Input is smaller than 2^30 so that intermediate ...
7
votes
11answers
2k views

Find the nth Fibonnaci Prime, in the shortest code

The challenge is rather simple: Take a positive whole number n as input. Output the nth Fibonacci prime number. Input can be as an parameter to a function (and the output will be the return value),...
8
votes
26answers
3k views

code-golf: First-n Fibonacci sequence elements

There is a well known question here that asks for a short (least characters) fibonacci sequence generator. I would like to know if someone can generate the first N elements only, of the fibonacci ...
9
votes
12answers
3k views

Write the fastest Fibonacci

This is yet another challenge about the Fibonacci numbers. The goal is to compute the 20'000'000th Fibonacii number as fast as possible. The decimal output is about 4 MiB large; it starts with: ...
17
votes
15answers
2k views

The minimum fibonacci challenge!

Challenge In this task you would be given an integer N (less than 106), find the minimum way in which you could sum to N using only Fibonacci numbers. You could use any Fibonacci number more ...
4
votes
4answers
1k views

Sum of Fibonacci numbers — speed contest

Write a program that print sum of as many Fibonacci numbers as possible. There is a limit in that your program should not run more than 10s on 2GHz single core PC. (equivalents are acceptable, for ...
11
votes
7answers
1k views

What is the average of n, the closest prime to n, the square of n and the closest Fibonacci number to n?

This is a math problem which takes quite many things into question, making it rather challenging, and as you might have guessed, it's a code golf, so it should be as short as possible as well. The ...
4
votes
3answers
590 views

Sum of Fibonacci numbers

I found this task here. Given the ith (1<=i<=35) Fibonacci number F(i) calculate the sum of the ith till i+9th number F(i)+F(i+1)+...+F(i+9) and the last digit of the i+246th one F(i+...
68
votes
129answers
12k views

Fibonacci function or sequence

Write the shortest code that either: Generates a Fibonacci sequence (either in standard output, or as a stream) Calculates, given n, the nth Fibonacci number (I gave both options in case one is ...
164
votes
21answers
11k views

Fibonacci Sequence Generator [closed]

Can you create a clever or unexpected Fibonacci generator? Your code must print or return either the nth Fibonacci number or the first n Fibonacci numbers.