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-2 of 2 results.

A101778 Last term in each row of triangle referenced in A101777.

Original entry on oeis.org

3, 5, 3, 2, 7, 5, 3, 7, 7, 5, 3, 2, 11, 7, 7, 5, 3, 13, 11, 7, 7, 5, 3, 2, 13, 13, 11, 7, 7, 5, 3, 17, 13, 13, 11, 7, 7, 5, 3, 2, 19, 17, 13, 13, 11, 7, 7, 5, 3, 19, 19, 17, 13, 13, 11, 7, 7, 5, 3, 2, 23, 19, 19, 17, 13, 13, 11, 7, 7, 5, 3, 23, 23, 19, 19, 17, 13, 13, 11, 7, 7, 5, 3, 2, 23
Offset: 1

Views

Author

Ray Chandler, Jan 10 2005

Keywords

Crossrefs

Programs

  • PARI
    A020482(k) = forprime(q=2, k, if(isprime(2*k-q), return(2*k-q)));
    a(n) = {my(r=(ceil(sqrt(2*n+1)))^2-2*n+3); if(r%2==0, r=A020482(r/2), if(isprime(r-2), r-=2, r=A020482(r\2))); r; } \\ Jinyuan Wang, Jan 29 2020

Formula

a(n) = A101777(A000217(n)).

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]
Showing 1-2 of 2 results.