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.

Showing 1-2 of 2 results.

A196199 Count up from -n to n for n = 0, 1, 2, ... .

Original entry on oeis.org

0, -1, 0, 1, -2, -1, 0, 1, 2, -3, -2, -1, 0, 1, 2, 3, -4, -3, -2, -1, 0, 1, 2, 3, 4, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8
Offset: 0

Views

Author

Keywords

Comments

This sequence contains every integer infinitely often, hence all integer sequences are subsequences.
This is a fractal sequence.
Indeed, if all terms (a(n),a(n+1)) such that a(n+1) does NOT equal a(n)+1 (<=> a(n+1) < a(n)) are deleted, the same sequence is recovered again. See A253580 for an "opposite" yet similar "fractal tree" construction. - M. F. Hasler, Jan 04 2015

Examples

			Table starts:
            0,
        -1, 0, 1,
    -2, -1, 0, 1, 2,
-3, -2, -1, 0, 1, 2, 3,
...
The sequence of fractions A196199/A004737 = 0/1, -1/1, 0/2, 1/1, -2/1, -1/2, 0/3, 1/2, 2/1, -3/1, -2/2, -1/3, 0/4, 1/3, 2/2, 3/1, -4/4. -3/2, ... contains every rational number (infinitely often) [Laczkovich]. - _N. J. A. Sloane_, Oct 09 2013
		

References

  • Miklós Laczkovich, Conjecture and Proof, TypoTex, Budapest, 1998. See Chapter 10.

Crossrefs

Cf. absolute values A053615, A002262, A002260, row lengths A005408, row sums A000004, A071797.

Programs

  • Haskell
    a196199 n k = a196199_row n !! k
    a196199_tabf = map a196199_row [0..]
    a196199_row n = [-n..n]
    b196199 = bFile' "A196199" (concat $ take 101 a196199_tabf) 0
    -- Reinhard Zumkeller, Sep 30 2011
    
  • Maple
    seq(seq(j-k-k^2, j=k^2 .. (k+1)^2-1), k = 0 .. 10); # Robert Israel, Jan 05 2015
    # Alternatively, as a table with rows -n<=k<=n (compare A257564):
    r := n -> (n-(n mod 2))/2: T := (n, k) -> r(n+k) - r(n-k):
    seq(print(seq(T(n, k), k=-n..n)), n=0..6); # Peter Luschny, May 28 2015
  • Mathematica
    Table[Range[-n, n], {n, 0, 9}] // Flatten
    (* or *)
    a[n_] := With[{t = Floor[Sqrt[n]]}, n - t (t + 1)];
    Table[a[n], {n, 0, 99}] (* Jean-François Alcover, Jul 13 2018, after Boris Putievskiy *)
  • PARI
    r=[];for(k=0,8,r=concat(r,vector(2*k+1,j,j-k-1)));r
    
  • Python
    from math import isqrt
    def A196199(n): return n-(t:=isqrt(n))*(t+1) # Chai Wah Wu, Aug 04 2022

Formula

a(n) = n - t*t - t - 1, where t = floor(sqrt(n-1)). - Boris Putievskiy, Jan 28 2013
G.f.: x/(x-1)^2 + 1/(x-1)*sum(k >= 1, 2*k*x^(k^2)). The series is related to Jacobi theta functions. - Robert Israel, Jan 05 2015

A283431 a(n) is the number of zeros of the Hermite H(n, x) polynomial in the open interval (-1, +1).

Original entry on oeis.org

0, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 3, 4, 3, 4, 3, 4, 3, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 7, 8, 9, 8, 9
Offset: 0

Views

Author

Michel Lagneau, May 16 2017

Keywords

Comments

The Hermite polynomials satisfy the following recurrence relation:
H(0,x) = 1,
H(1,x) = 2*x,
H(n,x) = 2*x*H(n-1,x) - 2*(n-1)*H(n-2,x).
The first few Hermite polynomials are:
H(0,x) = 1
H(1,x) = 2x
H(2,x) = 4x^2 - 2
H(3,x) = 8x^3 - 12x
H(4,x) = 16x^4 - 48x^2 + 12
H(5,x) = 32x^5 - 160x^3 + 120x

Examples

			a(5) = 3 because the zeros of H(5,x) = 32x^5 - 160x^3 + 120x are x1 = -2.0201828..., x2 = -.9585724..., x3 = 0., x4 = .9585724... and x5 = 2.020182... with three roots x2, x3 and x4 in the open interval (-1, +1).
		

Crossrefs

Programs

  • Maple
    for n from 0 to 90 do:it:=0:
    y:=[fsolve(expand(HermiteH(n,x)),x,real)]:for m from 1 to nops(y) do:if abs(y[m])<1 then it:=it+1:else fi:od: printf(`%d, `, it):od:
  • Mathematica
    a[n_] := Length@ List@ ToRules@ Reduce[ HermiteH[n, x] == 0 && -1 < x < 1, x]; Array[a, 82, 0] (* Giovanni Resta, May 17 2017 *)

Formula

Conjecture: a(n) = A257564(n+2).
Showing 1-2 of 2 results.