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.

A023532 a(n) = 0 if n is of the form m*(m+3)/2, otherwise 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Stark: "alpha = 0.101101110111101111101111110 ... is irrational. For if alpha were rational, its decimal expansion would be periodic and have a period of length r starting with the k-th digit of the expansion.
"But by the very nature of alpha, there will be blocks of r digits, all 1, in this expansion after the k-th digit and the periodicity would then guarantee that everything after such a block of r digits would also be all ones.
"This contradicts the fact that there will always be zeros occurring after any given point in the expansion of alpha. Hence alpha is irrational."
a(A000096(n)) = 0; a(A007401(n)) = 1. - Reinhard Zumkeller, Dec 04 2012
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order. A023532 is reverse reluctant sequence of sequence A211666. - Boris Putievskiy, Jan 11 2013
An example of a sequence with infinite critical exponent [Vaslet]. - N. J. A. Sloane, May 05 2013

Examples

			From _Boris Putievskiy_, Jan 11 2013: (Start)
As a triangular array written by rows, the sequence begins:
  0;
  1, 0;
  1, 1, 0;
  1, 1, 1, 0;
  1, 1, 1, 1, 0;
  1, 1, 1, 1, 1, 0;
  1, 1, 1, 1, 1, 1, 0;
  ...
(End)
		

References

  • Harold M. Stark, An Introduction to Number Theory, The MIT Press, Cambridge, Mass, eighth printing 1994, page 170.

Crossrefs

Essentially the same sequence as A114607 and A123110. - N. J. A. Sloane, Feb 07 2020

Programs

  • Haskell
    a023532 = (1 -) . a010052 . (+ 9) . (* 8)
    a023532_list = concat $ iterate (\rs -> 1 : rs) [0]
    -- Reinhard Zumkeller, Dec 04 2012
    
  • Maple
    A023532 := proc(n)
        option remember ;
        local m,t ;
        for m from 0 do
            t := m*(m+3)/2 ;
            if t > n then
                return 1 ;
            elif t = n then
                return 0 ;
            end if;
        end do:
    end proc:
    seq(A023532(n),n=0..40) ; # R. J. Mathar, May 15 2025
  • Mathematica
    a = {}; Do[a = Append[a, Join[ {0}, Table[1, {n} ] ] ], {n, 1, 13} ]; a = Flatten[a]
    Table[PadLeft[{0},n,1],{n,0,20}]//Flatten (* Harvey P. Dale, Jul 10 2019 *)
  • PARI
    for(n=1,9,print1("0, ");for(i=1,n,print1("1, "))) \\ Charles R Greathouse IV, Jun 16 2011
    
  • PARI
    a(n)=!issquare(8*n+9) \\ Charles R Greathouse IV, Jun 16 2011
    
  • Python
    from sympy.ntheory.primetest import is_square
    def A023532(n): return bool(is_square((n<<3)+9))^1 # Chai Wah Wu, Feb 10 2023

Formula

a(n) = 0 if and only if 8n+9 is a square. - Charles R Greathouse IV, Jun 16 2011
Blocks of lengths 1, 2, 3, 4, ... of ones separated by a single zero.
a(n) = 1 - floor((sqrt(9+8n)-1)/2) + floor((sqrt(1+8n)-1)/2). - Paul Barry, May 25 2004
a(n) = A211666(m), where m = (t^2 + 3*t + 4)/2n - n, t = floor((-1 + sqrt(8*n-7))/2). - Boris Putievskiy, Jan 11 2013
a(n) = [A002262(n) < A003056(n)]. - Yuchun Ji, May 18 2020
a(n) = 1-A023531(n). - R. J. Mathar, May 15 2025

Extensions

Additional comments from Robert G. Wilson v, Nov 06 2000