HP Forums

Full Version: (95LX) OEIS A137442 & A167390
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
A formula for entry into Solver to produce elements of the sequence of n^2 followed by smallest integer not yet listed

https://oeis.org/A137442

& of the partial sums

https://oeis.org/A167390

Enter the integer value of N & actuate key A137422 to find both element of A137422 & the partial sum from 1 to N.

Code:

{A137442|A137442+0*A167390=IF(MOD(N,2),SQ((N+1)/2),N/2+RND(SQRT(N/2),0))+0*L(A167390,L(T,IP(N/2+.5))*(1+G(T)*(3+2*G(T)))/6+L(R,IDIV(N,2)+RND(SQRT(IDIV(N,2)),0))*(G(R)+1)/2-L(S,IP(SQRT(G(R))))*(G(S)+1)*(G(S)+.5)/3)}
Reference URL's