This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A082844 #44 May 24 2025 16:18:47 %S A082844 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, %T A082844 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, %U A082844 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 %N 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. %C A082844 a(1)=3, a(2)=2, a(a(1)+a(2)+...+a(n)) = a(n) and a(a(1)+a(2)+...+a(n)+1) = 5-a(n). %C A082844 More generally, sequence a(n) = floor(r*(n+2))-floor(r*(n+1)), r = (1/2) *(z+sqrt(z^2+4)), z integer >=1, is defined with a(1), a(2) and a(a(1)+a(2)+...+a(n)+f(z)) = a(n); a(a(1)+a(2)+...+a(n)+f(z)+1) = (2z+1)-a(n) where f(1)=0, f(z)=z-2 for z>=2. %C A082844 Conjecture: a(n) = A097509(n+1). - _Benedict W. J. Irwin_, Mar 13 2016. [See the discussion in A097509. - _N. J. A. Sloane_, Mar 09 2021] %C A082844 Theorem: Referring to the solution to Problem B6 in the 81st William Lowell Putnam Mathematical Competition (see link), in the notation of the first solution, the sequence a(n) = c_{n+1} indexed from 1 equals the present sequence, A082844. - Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, Sep 09 2021. %H A082844 Manjul Bhargava, Kiran Kedlaya, and Lenny Ng, <a href="https://kskedlaya.org/putnam-archive/2020s.pdf">Solutions to the 81st William Lowell Putnam Mathematical Competition</a> %H A082844 Luke Schaeffer, Jeffrey Shallit, and Stefan Zorcic, <a href="https://arxiv.org/abs/2402.08331">Beatty Sequences for a Quadratic Irrational: Decidability and Applications</a>, arXiv:2402.08331 [math.NT], 2024. See pp. 17-19. %H A082844 N. J. A. Sloane, <a href="/A115004/a115004.txt">Families of Essentially Identical Sequences</a>, Mar 24 2021 (Includes this sequence) %F A082844 a(n) = floor(r*(n+2))-floor(r*(n+1)) where r=1+sqrt(2). %p A082844 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 %t A082844 With[{r=1+Sqrt[2]},Table[Floor[r*(n+2)]-Floor[r*(n+1)],{n,110}]] (* _Harvey P. Dale_, Oct 10 2012 *) %o A082844 (Magma) [Floor((1+Sqrt(2))*(n+2))-Floor((1+Sqrt(2))*(n+1)) : n in [1..100]]; // _Wesley Ivan Hurt_, Mar 13 2016 %o A082844 (Python) %o A082844 from math import isqrt %o A082844 def A082844(n): return 1+isqrt((n+2)**2<<1)-isqrt((n+1)**2<<1) # _Chai Wah Wu_, May 24 2025 %Y A082844 Cf. A082389, A082845, A097509. %Y A082844 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 %K A082844 nonn,easy %O A082844 1,1 %A A082844 _Benoit Cloitre_, Apr 15 2003; revised Jun 07 2003