# Non-Fibonacci
> Compute the nth [non-Fibonacci number][fibonacci-number].
The nth [non-Fibonacci number][fibonacci-number] is given by
where `φ` is the [golden ratio][golden-ratio].
## Usage
```javascript
var nonfibonacci = require( '@stdlib/math/base/special/nonfibonacci' );
```
#### nonfibonacci( n )
Computes the nth [non-Fibonacci number][fibonacci-number].
```javascript
var v = nonfibonacci( 1 );
// returns 4
v = nonfibonacci( 2 );
// returns 6
v = nonfibonacci( 3 );
// returns 7
```
If provided either a non-integer or `n < 1`, the function returns `NaN`.
```javascript
var v = nonfibonacci( -1 );
// returns NaN
v = nonfibonacci( 3.14 );
// returns NaN
```
If provided `NaN`, the function returns `NaN`.
```javascript
var v = nonfibonacci( NaN );
// returns NaN
```
## Examples
```javascript
var nonfibonacci = require( '@stdlib/math/base/special/nonfibonacci' );
var v;
var i;
for ( i = 1; i < 100; i++ ) {
v = nonfibonacci( i );
console.log( 'nonfibonacci(%d) = %d', i, v );
}
```
* * *
## References
- Gould, H.W. 1965. "Non-Fibonacci Numbers." _Fibonacci Quarterly_, no. 3: 177–83. [<http://www.fq.math.ca/Scanned/3-3/gould.pdf>][@gould:1965a].
- Farhi, Bakir. 2011. "An explicit formula generating the non-Fibonacci numbers." _arXiv_ abs/1105.1127 \[Math.NT] (May): 1–5. [<https://arxiv.org/abs/1105.1127>][@farhi:2011a].
[fibonacci-number]: https://en.wikipedia.org/wiki/Fibonacci_number
[golden-ratio]: https://en.wikipedia.org/wiki/Golden_ratio
[@gould:1965a]: http://www.fq.math.ca/Scanned/3-3/gould.pdf
[@farhi:2011a]: https://arxiv.org/abs/1105.1127