Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A101776
Smallest k such that k^2 is equal to the sum of n not-necessarily-distinct primes plus 1.
5
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, 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, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13
OFFSET
0,2
COMMENTS
Pattern appears to be: one 1, one 2, three 3's, three 4's, ..., (2k+1) (2k+1)'s, (2k+1) (2k+2)'s.
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
LINKS
FORMULA
a(n) = sqrt(A100555(n)).
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]
MATHEMATICA
iMax[k_, n_]:=PrimePi[k^2-2*n+1]
f[k_, n_]:=IntegerPartitions[k^2-1, {n}, Table[Prime[i], {i, 1, iMax[k, n]}]]
a[n_]:=Module[{k=1}, While[f[k, n]=={}, k++]; k]
Table[a[n], {n, 0, 100}]
(* Luc Rousseau, Dec 30 2019 *)
PROG
(PARI) a(n) = ceil(sqrt(2*n+1)); \\ Jinyuan Wang, Jan 28 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Ray Chandler, Jan 10 2005
STATUS
approved