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.
%I A083952 #35 Jan 29 2025 12:39:08 %S A083952 1,2,1,2,2,2,1,2,2,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,1,2,1,2, %T A083952 2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,1,2,2,2,1,2,2,2,1,2,1,2,2,2,2,2, %U A083952 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2 %N A083952 Integer coefficients a(n) of A(x), where a(n) = 1 or 2 for all n, such that A(x)^(1/2) has only integer coefficients. %C A083952 More generally, the sequence "integer coefficients of A(x), where 1<=a(n)<=m, such that A(x)^(1/m) consists entirely of integer coefficients", appears to have a unique solution for all m. [That is true - see Theorem 17 of Heninger-Rains-Sloane (2006). - _N. J. A. Sloane_, Aug 27 2015] %C A083952 Is this sequence periodic? [It is not periodic for m = 2 or 3. Larger cases remain open. - _N. J. A. Sloane_, Aug 27 2015] %H A083952 Robert G. Wilson v, <a href="/A083952/b083952.txt">Table of n, a(n) for n = 0..10000</a> %H A083952 N. Heninger, E. M. Rains and N. J. A. Sloane, <a href="https://arxiv.org/abs/math/0509316">On the Integrality of n-th Roots of Generating Functions</a>, arXiv:math/0509316 [math.NT], 2005-2006; J. Combinatorial Theory, Series A, 113 (2006), 1732-1745. %t A083952 a[n_] := a[n] = Block[{s = Sum[a[i]*x^i, {i, 0, n - 1}]}, If[ IntegerQ@ Last@ CoefficientList[ Series[ Sqrt[s + x^n], {x, 0, n}], x], 1, 2]]; Table[ a[n], {n, 0, 104}] (* _Robert G. Wilson v_, Nov 25 2006 *) %t A083952 s = 0; a[n_] := a[n] = Block[{}, If[IntegerQ@ Last@ CoefficientList[ Series[ Sqrt[s + x^n], {x, 0, n}], x], s = s + x^n; 1, s = s + 2 x^n; 2]]; Table[ a@n, {n, 0, 104}] (* _Robert G. Wilson v_, Sep 08 2007 *) %o A083952 (PARI) A083952_upto(N=99)=vector(N+1, n, if(n>1, (denominator(polcoeff(sqrt(O(x^n)+N+=x^(n-1)),n-1))>1 && N+=x^(n-1))+1, N=1)) \\ _M. F. Hasler_, Jan 27 2025 %Y A083952 Cf. A084202 (A(x)^(1/2)), A108335 (A084202 mod 4), A108336 (A084202 mod 2), A108340 (a(n) mod 2). Positions of 1's: A108783. %Y A083952 Cf. A083953, A083954, A083945, A083946. %K A083952 nonn,nice %O A083952 0,2 %A A083952 _Paul D. Hanna_, May 09 2003 %E A083952 More terms from _N. J. A. Sloane_, Jul 02 2005