A214971 Integers k for which the base-phi representation of k includes 1.
1, 4, 8, 11, 15, 19, 22, 26, 29, 33, 37, 40, 44, 48, 51, 55, 58, 62, 66, 69, 73, 76, 80, 84, 87, 91, 95, 98, 102, 105, 109, 113, 116, 120, 124, 127, 131, 134, 138, 142, 145, 149, 152, 156, 160, 163, 167, 171, 174, 178, 181, 185, 189, 192, 196, 199, 203
Offset: 1
Examples
1 = 1, 4 = r^2 + 1 + 1/r^2, 8 = r^4 + 1 + 1/r^4, 11 = r^4 + r^1 + 1 + 1/r^2 + 1/r^4. where r = phi = (1 + sqrt(5))/2 = the golden ratio.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..2000
- J.-P. Allouche and F. M. Dekking, Generalized Beatty sequences and complementary triples, arXiv:1809.03424 [math.NT], 2018.
- Michel Dekking, Base phi representations and golden mean beta-expansions, arXiv:1906.08437 [math.NT], 2019.
Programs
-
Mathematica
(* 1st program *) r = GoldenRatio; f[x_] := Floor[Log[r, x]]; t[n_] := RealDigits[n, r, 1000] p[n_] := Flatten[Position[t[n][[1]], 1]] Table[{n, f[n] + 1 - p[n]}, {n, 1, 47}] (* {n, exponents of r in base phi repr of n} *) m[n_] := If[MemberQ[f[n] + 1 - p[n], 0], 1, 0] u = Table[m[n], {n, 1, 900}] Flatten[Position[u, 1]] (* A214971 *) (* 2nd program *) A214971 = Map[#[[1]] &, Cases[Table[{n, Last[#] - Flatten[Position[First[#], 1]] &[RealDigits[n, GoldenRatio, 1000]]}, {n, 1, 5000}], {, {__, 0, _}}]] (* Peter J. C. Moses, Oct 19 2012 *) (* 3rd program; see Comments *) Accumulate[Flatten[{1, Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 1, 1}}] &, {0}, 8] + 3}]] (* Peter J. C. Moses, Oct 19 2012 *)
-
Python
from math import isqrt def A214971(n): return (n<<1)-1+(n-1+isqrt(5*(n-1)**2)>>1) # Chai Wah Wu, May 22 2025
Formula
a(n) = floor((n-1)*phi) + 2*n - 1. - Primoz Pirnat, Jun 09 2024
Comments