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.

A214848 First difference of A022846.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1
Offset: 0

Views

Author

Philippe Deléham, Mar 08 2013

Keywords

Comments

Number of triangular numbers in interval [n^2, (n+1)^2).
From Michel Dekking, Sep 20 2022: (Start)
(a(n)) is an inhomogeneous Sturmian sequence s(alpha, rho) with slope alpha = sqrt(2) and intercept 1/2, since A022846(n) = floor(n*sqrt(2) + 1/2).
(a(n)) is the fixed point of the morphism 1->12121, 2->1212121.
This is proved by writing the 0-1 version psi: 0->01010, 1->0101010 of this morphism as a composition
psi = psi_1 psi_3 psi_1 psi_4,
where the psi_i are the three elementary Sturmian morphisms
psi_1: 0->01, 1->0, psi_3: 0->0, 1->01, psi_4: 0->0, 1->10.
By Lemma 2.2.18 in Lothaire it then follows that the 0-1 word (a(n)-1) = A214848 is fixed by the morphism psi (note that in Lothaire psi_1 is phi, psi_3 is G, and psi_4 is G^~). (End)

Examples

			28 is in [25, 36), a(5) = 1.
36 and 45 are in [36, 49), a(6) = 2.
		

References

  • S.-I. Yasutomi, On Sturmian sequences which are invariant under some substitutions, in Number theory and its applications (Kyoto, 1997), pp. 347-373, Kluwer Acad. Publ., Dordrecht, 1999.

Crossrefs

Programs

  • Haskell
    a214848 n = a214848_list !! n
    a214848_list = zipWith (-) (tail a022846_list) a022846_list
    -- Reinhard Zumkeller, Mar 03 2014
  • Mathematica
    Differences[Round[Sqrt[2]Range[0,100]]] (* Harvey P. Dale, Jun 14 2020 *)

Formula

For n > 0: a(n) = A006338(n). - Reinhard Zumkeller, Mar 03 2014