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.

A302359 Numbers that are the sum of 3 squares > 1.

Original entry on oeis.org

12, 17, 22, 24, 27, 29, 33, 34, 36, 38, 41, 43, 44, 45, 48, 49, 50, 54, 56, 57, 59, 61, 62, 65, 66, 67, 68, 69, 70, 72, 74, 75, 76, 77, 78, 81, 82, 83, 84, 86, 88, 89, 90, 93, 94, 96, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 113, 114, 115, 116, 117, 118, 120, 121, 122, 123, 125, 126, 129
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 06 2018

Keywords

Examples

			33 is in the sequence because 33 = 2^2 + 2^2 + 5^2.
		

Crossrefs

Programs

  • Mathematica
    max = 130; f[x_] := Sum[x^(k^2), {k, 2, 20}]^3; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, max}]]
    With[{nn=15},Select[Union[Total/@Tuples[Range[2,nn]^2,3]],#<=nn^2+8&]] (* Harvey P. Dale, Jul 05 2021 *)
  • Python
    from itertools import count, takewhile, combinations_with_replacement as mc
    def aupto(N):
        sqrs = list(takewhile(lambda x: x<=N, (i**2 for i in count(2))))
        sum3 = set(sum(c) for c in mc(sqrs, 3) if sum(c) <= N)
        return sorted(sum3)
    print(aupto(129)) # Michael S. Branicky, Dec 17 2021

A294071 Number of ordered ways of writing n^2 as a sum of n squares > 1.

Original entry on oeis.org

1, 0, 0, 0, 1, 5, 6, 7, 288, 262, 13702, 69531, 610567, 5356091, 51724960, 521956086, 5467658641, 59931636545, 690518644584, 8100858045744, 99142980567486, 1246972499954475, 16142015005905558, 215722810653380845, 2955759897694815985, 41614888439136252691
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 07 2018

Keywords

Examples

			a(5) = 5 because we have [9, 4, 4, 4, 4], [4, 9, 4, 4, 4], [4, 4, 9, 4, 4], [4, 4, 4, 9, 4] and [4, 4, 4, 4, 9].
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[((-1 - 2 x + EllipticTheta[3, 0, x])/2)^n, {x, 0, n^2}], {n, 0, 25}]

Formula

a(n) = [x^(n^2)] (Sum_{k>=2} x^(k^2))^n.
Showing 1-2 of 2 results.