OFFSET
1,1
COMMENTS
Greatest k such that s(k) = n+1, where s = A026354.
Positions of 1 in A189661.
a(n+1) = A001950(n)-2, the Upper Wythoff sequence shifted by 2. - Michel Dekking, Oct 18 2018
LINKS
Michel Dekking, Table of n, a(n) for n = 1..1000
MATHEMATICA
(See A189661.)
PROG
(PARI) r = (1 + sqrt(5))/2;
a(n) = if(n<1, 1, floor((n - 1)* r) + n + 1);
for(n=1, 100, print1(a(n), ", ")) \\ Indranil Ghosh, Mar 25 2017
(Python)
from sympy import sqrt
import math
r=(1 + sqrt(5))/2
def a(n): return 1 if n<1 else int(math.floor((n - 1)*r)) + n + 1
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Mar 25 2017
(Python)
from math import isqrt
def A026356(n): return (n+1+isqrt(5*(n-1)**2)>>1)+n # Chai Wah Wu, Aug 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
EXTENSIONS
Data corrected by Michel Dekking, Oct 18 2018
STATUS
approved