04-22-2017, 07:08 AM
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.
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)}