OFFSET
1,2
COMMENTS
In general Wythoff "AA...A" numbers, say A^(m)(n), with m A's, m>=1, are given by the formula: A^(m)(n) = F(m)*floor(n*Phi) + F(m-1)*n - F(m+1) + 1 where F are the Fibonacci numbers A000045.
LINKS
A.H.M. Smeets, Table of n, a(n) for n = 1..20000
Martin Griffiths, On a Matrix Arising from a Family of Iterated Self-Compositions, Journal of Integer Sequences, 18 (2015), #15.11.8.
FORMULA
MAPLE
A151915 := proc(n)
g := (1+sqrt(5))/2 ;
2*n-4+3*floor(n*g) ;
end proc:
seq(A151915(n), n=1..30) ; # R. J. Mathar, Jun 09 2018
MATHEMATICA
a[n_] := 3 * Floor[n * GoldenRatio] + 2n - 4; Array[a, 100] (* Amiram Eldar, Dec 02 2018 *)
PROG
(PARI) a(n)=3*floor(n/2*(1+sqrt(5)))+2*n-4
(Python)
from math import isqrt
def A151915(n): return (n-2<<1)+((m:=n+isqrt(5*n**2))&-2)+(m>>1) # Chai Wah Wu, Aug 10 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 12 2008
STATUS
approved