A082844 Start with 3,2 and apply the rule a(a(1)+a(2)+...+a(n)) = a(n), fill in any undefined terms with a(t) = 2 if a(t-1) = 3 and a(t) = 3 if a(t-1) = 2.
3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3
Offset: 1
Links
- Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, Solutions to the 81st William Lowell Putnam Mathematical Competition
- Luke Schaeffer, Jeffrey Shallit, and Stefan Zorcic, Beatty Sequences for a Quadratic Irrational: Decidability and Applications, arXiv:2402.08331 [math.NT], 2024. See pp. 17-19.
- N. J. A. Sloane, Families of Essentially Identical Sequences, Mar 24 2021 (Includes this sequence)
Crossrefs
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - N. J. A. Sloane, Mar 09 2021
Programs
-
Magma
[Floor((1+Sqrt(2))*(n+2))-Floor((1+Sqrt(2))*(n+1)) : n in [1..100]]; // Wesley Ivan Hurt, Mar 13 2016
-
Maple
A082844:=n->floor((1+sqrt(2))*(n+2))-floor((1+sqrt(2))*(n+1)): seq(A082844(n), n=1..100); # Wesley Ivan Hurt, Mar 13 2016
-
Mathematica
With[{r=1+Sqrt[2]},Table[Floor[r*(n+2)]-Floor[r*(n+1)],{n,110}]] (* Harvey P. Dale, Oct 10 2012 *)
-
Python
from math import isqrt def A082844(n): return 1+isqrt((n+2)**2<<1)-isqrt((n+1)**2<<1) # Chai Wah Wu, May 24 2025
Formula
a(n) = floor(r*(n+2))-floor(r*(n+1)) where r=1+sqrt(2).
Comments