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.

A093195 Least number which is the sum of two distinct nonzero squares in exactly n ways.

Original entry on oeis.org

5, 65, 325, 1105, 8125, 5525, 105625, 27625, 71825, 138125, 126953125, 160225, 1221025, 3453125, 1795625, 801125, 446265625, 2082925, 41259765625, 4005625, 44890625, 30525625, 30994415283203125, 5928325, 303460625, 53955078125, 35409725, 100140625
Offset: 1

Views

Author

Lekraj Beedassy, Apr 22 2004

Keywords

Comments

An algorithm to compute the n-th term of this sequence: Write each of 2n and 2n+1 as products of their divisors in all possible ways and in decreasing order. For each product, equate each divisor in the product to (a1+1)(a2+1)...(ar+1), so that a1 >= a2 >= a3 >= ... >= ar, and solve for the ai. Evaluate A002144(1)^a1 * A002144(2)^a2 * ... * A002144(r)^ar for each set of values determined above, then the smaller of these products is the least integer to have precisely n partitions into a sum of two distinct positive squares. [Ant King, Dec 14 2009; May 26 2010]

Crossrefs

Cf. A002144, A018782, A054994, A025302-A025311 (first entries). See A016032, A000446 and A124980 for other versions.

Programs

  • PARI
    b(k)=my(c=0);for(i=1,sqrtint((k-1)\2),if(issquare(k-i^2),c+=1));c \\ A025441
    for(n=1,10,k=1;while(k,if(b(k)==n,print1(k,", ");break);k+=1)) \\ Derek Orr, Mar 20 2019

Formula

a(n) = min(A018782(2n), A018782(2n+1)).

Extensions

More terms from Ant King, Dec 14 2009 and Feb 07 2010