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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

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

Views

Author

Ray Chandler, Jan 10 2005

Keywords

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

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n) = ceil(sqrt(2*n+1)); \\ Jinyuan Wang, Jan 28 2020

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]

A100555 Smallest square that is equal to the sum of n not-necessarily-distinct primes plus 1.

Original entry on oeis.org

1, 4, 9, 9, 9, 16, 16, 16, 25, 25, 25, 25, 25, 36, 36, 36, 36, 36, 49, 49, 49, 49, 49, 49, 49, 64, 64, 64, 64, 64, 64, 64, 81, 81, 81, 81, 81, 81, 81, 81, 81, 100, 100, 100, 100, 100, 100, 100, 100, 100, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 121, 144, 144
Offset: 0

Views

Author

Giovanni Teofilatto, Dec 31 2004

Keywords

Examples

			a(1)=4 because 2^2=1+3.
a(2)=9 because 3^2=1+3+5.
a(3)=9 because 3^2=1+2+3+3.
a(4)=9 because 3^2=1+2+2+2+2.
		

Crossrefs

Extensions

Corrected and extended by Ray Chandler, Jan 10 2005

A101777 Triangle read by rows where n-th row is the lexicographically least set of n not-necessarily-distinct primes summing to A100555(n)-1.

Original entry on oeis.org

3, 3, 5, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 5, 7, 2, 2, 2, 2, 2, 2, 2, 3, 7, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 7
Offset: 1

Views

Author

Ray Chandler, Jan 10 2005

Keywords

Examples

			Triangle begins:
  {3}
  {3,5}
  {2,3,3}
  {2,2,2,2}
  {2,2,2,2,7}
  {2,2,2,2,2,5}
  {2,2,2,2,2,2,3}
  {2,2,2,2,2,2,5,7}
  {2,2,2,2,2,2,2,3,7}
  {2,2,2,2,2,2,2,2,3,5}
  {2,2,2,2,2,2,2,2,2,3,3}
  {2,2,2,2,2,2,2,2,2,2,2,2}
  {2,2,2,2,2,2,2,2,2,2,2,2,11}
  {2,2,2,2,2,2,2,2,2,2,2,3,3,7}
  {2,2,2,2,2,2,2,2,2,2,2,2,2,2,7}
		

Crossrefs

Extensions

Row 8 of table corrected at the suggestion of Jinyuan Wang by Ray Chandler, Jan 28 2020
Showing 1-3 of 3 results.