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.

A253900 a(n) is the number of squares of the form x^2 + x + n^2 for 0 <= x <= n^2.

This page as a plain text file.
%I A253900 #26 Feb 27 2015 23:29:52
%S A253900 1,2,2,3,3,2,4,4,2,4,4,3,6,4,2,4,8,4,4,4,2,6,6,3,6,4,4,8,4,2,6,12,4,4,
%T A253900 4,2,6,12,4,5,5,4,8,4,4,8,8,4,6,6,2,8,8,2,4,4,4,12,12,6,6,8,4,4,4,4,
%U A253900 16,8,2,4,8,8,12,6,2,6,12,4,4,8,4,8,8,3,9
%N A253900 a(n) is the number of squares of the form x^2 + x + n^2 for 0 <= x <= n^2.
%C A253900 Properties of the sequence:
%C A253900 Of the first 1000 terms, 70.5% are powers of 2 (see the table below). We observe repeated terms a(n) = a(n+1) for n = 2, 4, 7, 10, 18, 19, 22, 26, 33, 34, 40, 44, 46, 49, 52, 55, ....
%C A253900 The following table lists statistics of a(n) for n=1..1000.
%C A253900 -------------------------------
%C A253900 | a(n)  | frequency |    %    |
%C A253900 -------------------------------
%C A253900 |   1   |      1    |   0.1%  |
%C A253900 |   2   |     61    |   6.1%  |
%C A253900 |   3   |      9    |   0.9%  |
%C A253900 |   4   |    235    |  23.5%  |
%C A253900 |   5   |      2    |   0.2%  |
%C A253900 |   6   |     72    |   7.2%  |
%C A253900 |   7   |      1    |   0.1%  |
%C A253900 |   8   |    266    |  26.6%  |
%C A253900 |   9   |     12    |   1.2%  |
%C A253900 |  10   |      6    |   0.6%  |
%C A253900 |  12   |    116    |  11.6%  |
%C A253900 |  14   |      1    |   0.1%  |
%C A253900 |  16   |    130    |  13.0%  |
%C A253900 |  18   |     10    |   1.0%  |
%C A253900 |  20   |     11    |   1.1%  |
%C A253900 |  24   |     45    |   4.5%  |
%C A253900 |  27   |      1    |   0.1%  |
%C A253900 |  32   |     12    |   1.2%  |
%C A253900 |  36   |      5    |   0.5%  |
%C A253900 |  40   |      1    |   0.1%  |
%C A253900 |  48   |      2    |   0.2%  |
%C A253900 |  54   |      1    |   0.1%  |
%C A253900 -------------------------------
%C A253900 | TOTAL |   1000    | 100.0%  |
%C A253900 -------------------------------
%C A253900 Based on the results in the table and the computing of _Jon E. Schoenfield_ through n=3500, is it possible to determine an approximation of the probability p(a(n)= power of 2)?
%C A253900 Conjecture: the probability that a(n) is a power of 2 is such that 0.703 < p(a(n)=2^p) < 0.705.
%C A253900 The integers n such that a(n)=2 are 2, 3, 6, 9, 15, 21, 30, 36, 51, 54, 69, ... Is this A040040? - _Michel Marcus_, Jan 22 2015
%H A253900 Michel Lagneau, <a href="/A253900/b253900.txt">Table of n, a(n) for n = 1..1000</a>
%e A253900 a(7) = 4 because the 4 squares of the form x^2 + x + 7^2 are 49, 121, 289, 2401 for x = 0, 8, 15, 48, respectively.
%e A253900 a(8) = 4 because the 4 squares of the form x^2 + x + 8^2 are 64, 196, 484, 4096 for x = 0, 11, 20, 63, respectively.
%t A253900 lst={}; Do[k=0; Do[If[IntegerQ[Sqrt[x^2+x+n^2]], k=k+1], {x, 0, n^2}]; AppendTo[lst, k], {n, 1, 100}]; lst
%o A253900 (PARI) a(n) = sum(x=0, n^2, issquare(x^2 + x + n^2)); \\ _Michel Marcus_, Jan 21 2015
%K A253900 nonn
%O A253900 1,2
%A A253900 _Michel Lagneau_, Jan 18 2015