cp's OEIS Frontend

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.

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.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Apr 15 2003; revised Jun 07 2003

Keywords

Comments

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).
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.
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]
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.

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).