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

A051533 Numbers that are the sum of two positive triangular numbers.

Original entry on oeis.org

2, 4, 6, 7, 9, 11, 12, 13, 16, 18, 20, 21, 22, 24, 25, 27, 29, 30, 31, 34, 36, 37, 38, 39, 42, 43, 46, 48, 49, 51, 55, 56, 57, 58, 60, 61, 64, 65, 66, 67, 69, 70, 72, 73, 76, 79, 81, 83, 84, 87, 88, 90, 91, 92, 93, 94, 97, 99, 100, 101, 102, 106, 108
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de)

Keywords

Comments

Numbers n such that 8n+2 is in A085989. - Robert Israel, Mar 06 2017

Examples

			666 is in the sequence because we can write 666 = 435 + 231 = binomial(22,2) + binomial(30,2).
		

Crossrefs

Cf. A000217, A020756 (sums of two triangular numbers), A001481 (sums of two squares), A007294, A051611 (complement).
Cf. A061336: minimal number of triangular numbers that sum up to n.
Cf. A085989.

Programs

  • Haskell
    a051533 n = a051533_list !! (n-1)
    a051533_list = filter ((> 0) . a053603) [1..]
    -- Reinhard Zumkeller, Jun 28 2013
    
  • Maple
    isA051533 := proc(n)
        local a,ta;
        for a from 1 do
            ta := A000217(a) ;
            if 2*ta > n then
                return false;
            end if;
            if isA000217(n-ta) then
                return true;
            end if;
        end do:
    end proc:
    for n from 1 to 200 do
        if isA051533(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Dec 16 2015
  • Mathematica
    f[k_] := If[!
       Head[Reduce[m (m + 1) + n (n + 1) == 2 k && 0 < m && 0 < n, {m, n},
           Integers]] === Symbol, k, 0]; DeleteCases[Table[f[k], {k, 1, 108}], 0] (* Ant King, Nov 22 2010 *)
    nn=50; tri=Table[n(n+1)/2, {n,nn}]; Select[Union[Flatten[Table[tri[[i]]+tri[[j]], {i,nn}, {j,i,nn}]]], #<=tri[[-1]] &]
    With[{nn=70},Take[Union[Total/@Tuples[Accumulate[Range[nn]],2]],nn]] (* Harvey P. Dale, Jul 16 2015 *)
  • PARI
    is(n)=for(k=ceil((sqrt(4*n+1)-1)/2),(sqrt(8*n-7)-1)\2, if(ispolygonal(n-k*(k+1)/2, 3), return(1))); 0 \\ Charles R Greathouse IV, Jun 09 2015

Formula

A053603(a(n)) > 0. - Reinhard Zumkeller, Jun 28 2013
A061336(a(n)) = 2. - M. F. Hasler, Mar 06 2017

A294073 Numbers that are the sum of 2 cubes > 1.

Original entry on oeis.org

16, 35, 54, 72, 91, 128, 133, 152, 189, 224, 243, 250, 280, 341, 351, 370, 407, 432, 468, 520, 539, 559, 576, 637, 686, 728, 737, 756, 793, 854, 855, 945, 1008, 1024, 1027, 1064, 1072, 1125, 1216, 1241, 1339, 1343, 1358, 1395, 1456, 1458, 1512, 1547, 1674, 1729, 1736, 1755, 1792, 1843, 1853, 1944, 2000, 2060
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 07 2018

Keywords

Examples

			133 is in the sequence because 133 = 2^3 + 5^3.
		

Crossrefs

Programs

  • Maple
    N:= 3000: # to get all terms <= N
    M := floor(N^(1/3)):
    sort(convert(select(`<=`, {seq(seq(i^3+j^3, j = 2 .. i), i = 2 .. M)}, N), list)) # Robert Israel, Feb 08 2018
  • Mathematica
    nmax = 2060; f[x_] := Sum[x^k^3, {k, 2, 14}]^2; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]

A281154 Expansion of (Sum_{k>=2} x^(k^2))^2.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 1, 0, 2, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 4, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 2, 0, 0, 0, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 16 2017

Keywords

Comments

Number of ways to write n as an ordered sum of 2 squares > 1.

Examples

			G.f. = x^8 + 2*x^13 + x^18 + 2*x^20 + 2*x^25 + 2*x^29 + x^32 + 2*x^34 + 2*x^40 + ...
a(13) = 2 because we have [9, 4] and [4, 9].
		

Crossrefs

Programs

  • Mathematica
    nmax = 105; CoefficientList[Series[Sum[x^k^2, {k, 2, nmax}]^2, {x, 0, nmax}], x]
    CoefficientList[Series[(1 + 2 x - EllipticTheta[3, 0, x])^2/4, {x, 0, 105}], x]

Formula

G.f.: (Sum_{k>=2} x^(k^2))^2.
G.f.: (1/4)*(1 + 2*x - theta_3(0,x))^2, where theta_3 is the 3rd Jacobi theta function.

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