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.

A123087 Sequence of numbers such that a(2*n) + a(n) = n and a(n) is the smallest number such that a(n) >= a(n-1).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 25, 25, 25, 25, 26
Offset: 0

Views

Author

Philippe Deléham, Sep 27 2006

Keywords

Comments

If the value a(n) = m >= 1 is appearing for the first time, then n is of the form n = 2^k*s, where k,s are odd numbers. Therefore every m occurs 2 or 4 times consecutively. More exactly, if n+2 has the same form as n (i.e., 2^k*s with odd k,s), then a(n) = m occurs 2 times, otherwise, m occurs 4 times. - Vladimir Shevelev, Aug 25 2010
a(n) is the number of those numbers not exceeding n for which 2 is an infinitary divisor (for definition see comment at A037445). - Vladimir Shevelev, Feb 21 2011

Examples

			  a(2*0) + a(0) = 0 -----> a(0)  = 0
  a(1)  >= a(0) ---------> a(1)  = 0
  a(2*1) + a(1) = 1 -----> a(2)  = 1
  a(3)  >= a(2) ---------> a(3)  = 1
  a(2*2) + a(2) = 2 -----> a(4)  = 1
  a(5)  >= a(4) ---------> a(5)  = 1
  a(2*3) + a(3) = 3 -----> a(6)  = 2
  a(7)  >= a(6) ---------> a(7)  = 2
  a(2*4) + a(4) = 4 -----> a(8)  = 3
  a(9)  >= a(8) ---------> a(9)  = 3
  a(2*5) + a(5) = 5 -----> a(10) = 4
  a(11) >= a(10) --------> a(11) = 4
  a(2*6) + a(6) = 6 -----> a(12) = 4
  a(13) >= a(12) --------> a(13) = 4
  a(2*7) + a(7) = 7 -----> a(14) = 5
		

Crossrefs

Partial sums of A096268 and of A328979.

Programs

  • Haskell
    a123087 n = a123087_list !! n
    a123087_list = scanl (+) 0 a096268_list
    -- Reinhard Zumkeller, Jul 29 2014
  • PARI
    a(n)=if(n<1,0,floor(n/2)-a(floor(n/2))) \\ Benoit Cloitre, Sep 30 2006
    

Formula

a(0)=0, a(n) = floor(n/2) - a(floor(n/2)); partial sums of A096268; a(2n) = A050292(n); a(n) is asymptotic to n/3. - Benoit Cloitre, Sep 30 2006
a(2*n+1) = a(2*n); a(n) = n/3 + O(log(n)), moreover, the equation a(3m) = m has infinitely many solutions, e.g., a(3*2^k) = 2^k; on the other hand, a((4^k-1)/3) = (4^k-1)/9 - k/3, i.e., limsup|a(n) - n/3| = infinity. - Vladimir Shevelev, Aug 25 2010
a(n) = (n - A065359(n))/3. - Velin Yanev, Jul 13 2021
a(n) = n - A050292(n). - Max Alekseyev, Mar 05 2023