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.

A101776 Smallest k such that k^2 is equal to the sum of n not-necessarily-distinct primes plus 1.

This page as a plain text file.
%I A101776 #24 Feb 23 2020 16:56:10
%S A101776 1,2,3,3,3,4,4,4,5,5,5,5,5,6,6,6,6,6,7,7,7,7,7,7,7,8,8,8,8,8,8,8,9,9,
%T A101776 9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,
%U A101776 11,11,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13
%N A101776 Smallest k such that k^2 is equal to the sum of n not-necessarily-distinct primes plus 1.
%C A101776 Pattern appears to be: one 1, one 2, three 3's, three 4's, ..., (2k+1) (2k+1)'s, (2k+1) (2k+2)'s.
%C A101776 It appears that a(n) is also the number of pixels in C_{n}, a pixelated arc of circle x^2 + y^2 = n, defined as the set of the (x, y), ordered pairs of nonnegative integers, such that (x^2 + y^2 = n) or ((x^2 + y^2 < n) and ((x+1)^2 + y^2 > n or x^2 + (y+1)^2 > n)). - _Luc Rousseau_, Dec 30 2019
%H A101776 Jinyuan Wang, <a href="/A101776/b101776.txt">Table of n, a(n) for n = 0..1000</a>
%F A101776 a(n) = sqrt(A100555(n)).
%F A101776 a(n) = ceiling(sqrt(2*n+1)). - _Mohammad K. Azarian_, Jun 15 2016 [Proof: for any k > 1 and 1 <= m <= 2*k, a(2*k^2-2*k+m) = 2*k because (2*k-1)^2 < 2*(2*k^2-2*k+m) + 1 and (2*k)^2 = 2*(2*k^2-6*k+3*m+1) + 3*(4*k-2*m-1) + 1; a(2*k^2+m) = 2*k + 1 because (2*k)^2 < 2*(2*k^2+m) + 1 and (2*k+1)^2 = 2*(2*k^2-4*k+3*m) + 3*(4*k-2*m) + 1. Therefore, a(n) = ceiling(sqrt(2*n+1)) for n >= 5. Note that the formula is also correct for n < 5, hence a(n) = ceiling(sqrt(2*n+1)). - _Jinyuan Wang_, Jan 28 2020]
%t A101776 iMax[k_,n_]:=PrimePi[k^2-2*n+1]
%t A101776 f[k_,n_]:=IntegerPartitions[k^2-1,{n},Table[Prime[i],{i,1,iMax[k,n]}]]
%t A101776 a[n_]:=Module[{k=1},While[f[k,n]=={},k++];k]
%t A101776 Table[a[n],{n,0,100}]
%t A101776 (* _Luc Rousseau_, Dec 30 2019 *)
%o A101776 (PARI) a(n) = ceil(sqrt(2*n+1)); \\ _Jinyuan Wang_, Jan 28 2020
%Y A101776 Cf. A100555, A101777, A101778.
%K A101776 nonn
%O A101776 0,2
%A A101776 _Ray Chandler_, Jan 10 2005