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.

This page as a plain text file.
%I A023532 #56 May 15 2025 12:37:08
%S A023532 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,
%T A023532 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,
%U A023532 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
%N A023532 a(n) = 0 if n is of the form m*(m+3)/2, otherwise 1.
%C A023532 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.
%C A023532 "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.
%C A023532 "This contradicts the fact that there will always be zeros occurring after any given point in the expansion of alpha. Hence alpha is irrational."
%C A023532 a(A000096(n)) = 0; a(A007401(n)) = 1. - _Reinhard Zumkeller_, Dec 04 2012
%C A023532 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
%C A023532 An example of a sequence with infinite critical exponent [Vaslet]. - _N. J. A. Sloane_, May 05 2013
%D A023532 Harold M. Stark, An Introduction to Number Theory, The MIT Press, Cambridge, Mass, eighth printing 1994, page 170.
%H A023532 Reinhard Zumkeller, <a href="/A023532/b023532.txt">Table of n, a(n) for n = 0..1000</a>
%H A023532 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012.
%H A023532 Elise Vaslet, <a href="http://www.combinatorics.org/ojs/index.php/eljc/article/view/v18i1p125">Critical exponents of words over 3 letters</a>, Electronic Journal of Combinatorics, 18 (2011), #P125.
%H A023532 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F A023532 a(n) = 0 if and only if 8n+9 is a square. - _Charles R Greathouse IV_, Jun 16 2011
%F A023532 Blocks of lengths 1, 2, 3, 4, ... of ones separated by a single zero.
%F A023532 a(n) = 1 - floor((sqrt(9+8n)-1)/2) + floor((sqrt(1+8n)-1)/2). - _Paul Barry_, May 25 2004
%F A023532 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
%F A023532 a(n) = [A002262(n) < A003056(n)]. - _Yuchun Ji_, May 18 2020
%F A023532 a(n) = 1-A023531(n). - _R. J. Mathar_, May 15 2025
%e A023532 From _Boris Putievskiy_, Jan 11 2013: (Start)
%e A023532 As a triangular array written by rows, the sequence begins:
%e A023532   0;
%e A023532   1, 0;
%e A023532   1, 1, 0;
%e A023532   1, 1, 1, 0;
%e A023532   1, 1, 1, 1, 0;
%e A023532   1, 1, 1, 1, 1, 0;
%e A023532   1, 1, 1, 1, 1, 1, 0;
%e A023532   ...
%e A023532 (End)
%p A023532 A023532 := proc(n)
%p A023532     option remember ;
%p A023532     local m,t ;
%p A023532     for m from 0 do
%p A023532         t := m*(m+3)/2 ;
%p A023532         if t > n then
%p A023532             return 1 ;
%p A023532         elif t = n then
%p A023532             return 0 ;
%p A023532         end if;
%p A023532     end do:
%p A023532 end proc:
%p A023532 seq(A023532(n),n=0..40) ; # _R. J. Mathar_, May 15 2025
%t A023532 a = {}; Do[a = Append[a, Join[ {0}, Table[1, {n} ] ] ], {n, 1, 13} ]; a = Flatten[a]
%t A023532 Table[PadLeft[{0},n,1],{n,0,20}]//Flatten (* _Harvey P. Dale_, Jul 10 2019 *)
%o A023532 (PARI) for(n=1,9,print1("0, ");for(i=1,n,print1("1, "))) \\ _Charles R Greathouse IV_, Jun 16 2011
%o A023532 (PARI) a(n)=!issquare(8*n+9) \\ _Charles R Greathouse IV_, Jun 16 2011
%o A023532 (Haskell)
%o A023532 a023532 = (1 -) . a010052 . (+ 9) . (* 8)
%o A023532 a023532_list = concat $ iterate (\rs -> 1 : rs) [0]
%o A023532 -- _Reinhard Zumkeller_, Dec 04 2012
%o A023532 (Python)
%o A023532 from sympy.ntheory.primetest import is_square
%o A023532 def A023532(n): return bool(is_square((n<<3)+9))^1 # _Chai Wah Wu_, Feb 10 2023
%Y A023532 Cf. A023531, A211666.
%Y A023532 Essentially the same sequence as A114607 and A123110. - _N. J. A. Sloane_, Feb 07 2020
%K A023532 nonn,easy
%O A023532 0,1
%A A023532 _Clark Kimberling_
%E A023532 Additional comments from _Robert G. Wilson v_, Nov 06 2000