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.

Previous Showing 21-30 of 45 results. Next

A025286 Numbers that are the sum of 2 nonzero squares in exactly 3 ways.

Original entry on oeis.org

325, 425, 650, 725, 845, 850, 925, 1025, 1250, 1300, 1325, 1445, 1450, 1525, 1690, 1700, 1825, 1850, 2050, 2225, 2425, 2525, 2600, 2650, 2725, 2825, 2873, 2890, 2900, 2925, 3050, 3125, 3380, 3400, 3425, 3650, 3700, 3725, 3757, 3825, 3925, 4100, 4205
Offset: 1

Views

Author

Keywords

Comments

A025426(a(n)) = 3. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Cf. A025426.

Programs

  • Haskell
    a025286 n = a025286_list !! (n-1)
    a025286_list = filter ((== 3) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015

A025294 Numbers that are the sum of 2 nonzero squares in 3 or more ways.

Original entry on oeis.org

325, 425, 650, 725, 845, 850, 925, 1025, 1105, 1250, 1300, 1325, 1445, 1450, 1525, 1625, 1690, 1700, 1825, 1850, 1885, 2050, 2125, 2210, 2225, 2405, 2425, 2465, 2525, 2600, 2650, 2665, 2725, 2825, 2873, 2890, 2900, 2925, 3050, 3125, 3145, 3250, 3380
Offset: 1

Views

Author

Keywords

Comments

A025426(a(n)) > 2. - Reinhard Zumkeller, Feb 26 2015

Crossrefs

Complement of A025285 relative to A007692. - Washington Bomfim, Oct 24 2010
Cf. A025426.

Programs

  • Haskell
    a025294 n = a025294_list !! (n-1)
    a025294_list = filter ((> 2) . a025426) [1..]
    -- Reinhard Zumkeller, Feb 26 2015
  • Maple
      N:= 100000: # generate all entries <=N
    SSQ:= {}: SSQ2:= {}: SSQ3:= {}:
    for a from 1 to floor(sqrt(N)) do
      for b from a to floor(sqrt(N-a^2)) do
        n:= a^2 + b^2;
        if member(n,SSQ2) then SSQ3:= SSQ3 union {n}
        elif member(n,SSQ) then SSQ2:= SSQ2 union {n}
        else SSQ:= SSQ union {n}
        end if
    end do end do:
    SSQ3;  # Robert Israel, Jan 20 2013
  • Mathematica
    okQ[n_] := Length[Select[PowersRepresentations[n, 2, 2][[All, 1]], Positive] ] > 2; Select[Range[5000], okQ] (* Jean-François Alcover, Mar 04 2019 *)

A273238 Least number k such that k^3 is the sum of two nonzero squares in exactly n ways.

Original entry on oeis.org

2, 5, 25, 50, 125, 625, 1250, 65, 15625, 31250, 78125, 390625, 781250, 325, 9765625, 19531250, 48828125, 244140625, 488281250, 1625, 6103515625, 12207031250, 30517578125, 4225, 8450, 8125, 3814697265625, 7629394531250, 19073486328125, 95367431640625
Offset: 1

Views

Author

Altug Alkan, May 18 2016

Keywords

Examples

			a(1) = 2 because 2^3 = 2^2 + 2^2.
a(2) = 5 because 5^3 = 5^2 + 10^2 = 2^2 + 11^2.
a(3) = 25 because 25^3 = 35^2 + 120^2 = 44^2 + 117^2 = 75^2 + 100^2.
		

Crossrefs

Programs

  • Mathematica
    Function[t, FirstPosition[t, #] & /@ Range@ 8]@ Map[Length@ Select[ PowersRepresentations[#^3, 2, 2], ! MemberQ[#, 0] &] &, Range[2 10^3]] // Flatten (* Michael De Vlieger, May 18 2016 *)
    (* code for first 100 terms *) nR[n_] := (SquaresR[2, n] + Plus @@ Pick[{-4, 4}, IntegerQ /@ Sqrt[{n, n/2}]])/8; c[w_] := Floor[1/2 Times @@ (3 w + 1)]; q[1] = 2; q[n_] := Min[Reap[Do[ x = Times @@ (Take[{5, 13, 17, 29}, Length[e]]^e); If[c[e] == n && nR[x^3] == n, Sow[x]]; If[c[e] + 1 == n && nR[8 x^3] == n, Sow[2 x]], {e, Join[Transpose[{ Range@ 80}], Join @@ (IntegerPartitions[#, 4] & /@ Range[21]) ]}]][[2, 1]]]; Array[q, 100] (* Giovanni Resta, May 18 2016 *)
  • PARI
    A025426(n)=my(v=valuation(n, 2), f=factor(n>>v), t=1); for(i=1, #f[, 1], if(f[i, 1]%4==1, t*=f[i, 2]+1, if(f[i, 2]%2, return(0)))); if(t%2, t-(-1)^v, t)/2
    a(n)=my(k=1); while(A025426(k++^3)!=n, ); k
    first(n)=my(v=vector(n),t,k); while(1, t=A025426(k++^3); if(t>0 && t<=n && v[t]==0, v[t]=k; if(factorback(v), return(v)))) \\ Charles R Greathouse IV, May 18 2016

Extensions

a(10)-a(30) from Giovanni Resta, May 18 2016

A321435 Expansion of Product_{1 <= i <= j} (1 + x^(i^2 + j^2)).

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 2, 0, 1, 2, 0, 3, 0, 2, 3, 1, 4, 1, 2, 4, 1, 6, 3, 4, 6, 2, 7, 5, 6, 8, 5, 9, 7, 9, 10, 9, 12, 10, 13, 14, 13, 18, 13, 19, 17, 18, 25, 19, 28, 24, 25, 33, 26, 36, 35, 33, 46, 35, 47, 48, 44, 61, 48, 62, 65, 60, 78, 68, 79, 87, 79, 101, 93
Offset: 0

Views

Author

Seiichi Manyama, Nov 09 2018

Keywords

Crossrefs

Programs

  • Maple
    N:= 100: # for a(0)..a(N)
    P:= 1:
    for i from 1 to floor(sqrt(N)) do
      for j from i while i^2 + j^2 <= N do
        P:= P * (1 + x^(i^2 + j^2))
    od od:
    S:= series(P,x,N+1):
    seq(coeff(S,x,k),k=0..N); # Robert Israel, Apr 21 2024

Formula

G.f.: Product_{k>0} (1 + x^k)^A025426(k).

A321436 Expansion of Product_{1 <= i <= j} (1 - x^(i^2 + j^2)).

Original entry on oeis.org

1, 0, -1, 0, 0, -1, 0, 1, -1, 0, 0, 0, 1, 0, 0, 1, 0, -2, 1, 1, -2, 1, 2, 0, -1, 0, -1, 0, 2, -2, 1, 1, -4, 0, 3, -1, -1, 3, -2, -1, 0, -4, 5, 2, -3, 2, 3, -5, -3, 6, -3, -1, 0, -2, 1, 1, 0, 2, 7, -7, 0, 7, -9, -2, 4, -3, 2, 6, -9, 2, 12, -12, 1, 9, -11, -3, 7, 0, -1, 5
Offset: 0

Views

Author

Seiichi Manyama, Nov 09 2018

Keywords

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1)..a(N)
    P:= 1:
    for i from 1 to floor(sqrt(N)) do
      for j from i while i^2 + j^2 <= N do
        P:= P * (1 - x^(i^2 + j^2))
    od od:
    S:= series(P,x,N+1):
    seq(coeff(S,x,k),k=0..N): # Robert Israel, Apr 21 2024

Formula

G.f.: Product_{k>0} (1 - x^k)^A025426(k).

A007511 a(n) is the smallest number greater than a(n-1) that is expressible as the sum of two squares in more ways than a(n-1).

Original entry on oeis.org

2, 50, 325, 1105, 5525, 27625, 71825, 138125, 160225, 801125, 2082925, 4005625, 5928325, 29641625, 77068225, 148208125, 243061325, 1215306625, 3159797225, 6076533125, 12882250225, 53716552825, 64411251125, 167469252925, 322056255625, 785817263725
Offset: 1

Views

Author

Gabriel Cunningham (gcasey(AT)mit.edu), Feb 29 2004

Keywords

Comments

Sequence provides the locations of records in A025426 (nonzero squares), rather than in A000161 (definition of squares includes zeros). - R. J. Mathar, Jun 06 2007

Crossrefs

Cf. A048610.

Extensions

a(12)-a(18) from Donovan Johnson, Sep 03 2008
a(19)-a(24) from Donovan Johnson, Jul 01 2009
a(25)-a(26) from Donovan Johnson, Aug 30 2011

A216284 Number of solutions to the equation x^4+y^4 = n with x >= y > 0.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Examples

			From _Antti Karttunen_, Aug 28 2017: (Start)
For n = 2 there is one solution: 2 = 1^4 + 1^4, thus a(2) = 1.
For n = 17 there is one solution: 17 = 2^4 + 1^4, thus a(17) = 1.
For n = 635318657 we have two solutions: 635318657 = 158^4 + 59^4 = 134^4 + 133^4, thus a(635318657) = 2. Note that this is the first point where the sequence attains value greater than 1. See _Charles R Greathouse IV_'s Jan 12 2017 comment in A216280.
(End)
		

Crossrefs

Programs

Formula

a(n) <= A216280(n). - Antti Karttunen, Aug 28 2017

Extensions

Definition edited to match the given data and the second part of offset (635318657) explicitly added by Antti Karttunen, Aug 28 2017

A259285 Expansion of psi(x^2) * f(x, x^7) in powers of x where psi(), f(,) are Ramanujan theta functions.

Original entry on oeis.org

1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 0, 2, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 2, 1, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 3, 1, 0, 1, 0
Offset: 0

Views

Author

Michael Somos, Jun 23 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + x + x^2 + x^3 + x^6 + 2*x^7 + x^9 + x^10 + 2*x^12 + 2*x^13 + ...
G.f. = q^13 + q^29 + q^45 + q^61 + q^109 + 2*q^125 + q^157 + q^173 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^1, x^8] QPochhammer[ -x^2, x^8] QPochhammer[ -x^6, x^8] QPochhammer[ -x^7, x^8] QPochhammer[x^8]^2, {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[ (1 + x^(8 k - 1)) (1 + x^(8 k - 2)) (1 + x^(8 k - 6)) (1 + x^(8 k - 7)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
  • PARI
    {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 13); for(u = (s+3)\-8, (s-3)\8, if( issquare( m - (8*u + 3)^2, &x) && (x%8==2 || x%8==6), c++))); c};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, -1, 0, 0, 1, 0, -1, -1, 2, -1, -1, 0, 1, 0, 0, -1][k%16 + 1], 1 + x * O(x^n)), n))};

Formula

Number of solutions to 16*n + 13 = (8*u + 3)^2 + (8*v + 2)^2 where u,v in Z.
Euler transform of period 16 sequence [ 1, 0, 0, -1, 0, 1, 1, -2, 1, 1, 0, -1, 0, 0, 1, -2, ...].
a(9*n + 2) = A259287(n). a(9*n + 5) = a(9*n + 8) = 0.
-2 * a(n) = A134343(4*n + 3). a(n) = A000161(16*n + 13) = A025426(16*n + 13) = A025435(16*n + 13) = A025441(16*n + 13).

A259287 Expansion of psi(x^2) * f(x^3, x^5) in powers of x where psi(), f(, ) are Ramanujan theta functions.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 3, 0, 0, 1, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 1, 2, 0, 0, 1, 2, 0, 1, 1, 0, 1, 3, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 2, 2, 1, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 2, 0, 2, 2, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Michael Somos, Jun 23 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + x^2 + x^3 + 2*x^5 + x^6 + x^7 + x^9 + x^11 + x^12 + x^14 + ...
G.f. = q^5 + q^37 + q^53 + 2*q^85 + q^101 + q^117 + q^149 + q^181 + q^197 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^2, x^8] QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ -x^6, x^8] QPochhammer[x^8]^2, {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[(1 + x^(8 k - 2)) (1 + x^(8 k - 3)) (1 + x^(8 k - 5)) (1 + x^(8 k - 6)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
  • PARI
    {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 5); for(u = (s+1)\-8, (s-1)\8, if( issquare( m - (8*u + 1)^2, &x) && (x%8==2 || x%8==6), c++))); c};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, 0, -1, -1, 1, -1, 0, 0, 2, 0, 0, -1, 1, -1, -1, 0][k%16 + 1], 1 + x * O(x^n)), n))};

Formula

Number of solutions to 16*n + 5 = (8*u + 1)^2 + (8*v + 2)^2 where u,v in Z.
Euler transform of period 16 sequence [ 0, 1, 1, -1, 1, 0, 0, -2, 0, 0, 1, -1, 1, 1, 0, -2, ...].
a(9*n + 1) = a(9*n + 4) = 0. a(9*n + 7) = A259285(n).
-2 * a(n) = A134343(4*n + 1). a(n) = A000161(16*n + 5) = A025426(16*n + 5) = A025435(16*n + 5) = A025441(16*n + 5).

A317685 Number of partitions of n into a prime and two positive squares.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 2, 1, 1, 2, 1, 2, 3, 0, 4, 2, 1, 2, 3, 3, 4, 3, 3, 3, 4, 1, 4, 4, 3, 3, 6, 3, 4, 4, 2, 6, 6, 1, 8, 3, 3, 6, 6, 4, 6, 4, 5, 7, 6, 3, 6, 6, 5, 6, 9, 5, 8, 6, 3, 7, 8, 2, 12, 6, 4, 7, 7, 6, 10, 7, 7, 9, 7, 5, 9, 9, 7, 9, 10, 4
Offset: 0

Views

Author

R. J. Mathar, Michel Marcus, Aug 04 2018

Keywords

Comments

As in A025426, the two squares do not need to be distinct.

Examples

			a(7) = 2 counts 7 = 5 + 1^2 + 1^2 = 2 + 1^2 + 2^2.
		

Crossrefs

Programs

  • Maple
    A317685 := proc(n)
        a := 0 ;
        p := 2;
        while p <= n do
            a := a+A025426(n-p);
            p := nextprime(p) ;
        end do:
        a ;
    end proc:
  • Mathematica
    p2sQ[{a_,b_,c_}]:=PrimeQ[a]&&AllTrue[{Sqrt[b],Sqrt[c]},IntegerQ]||PrimeQ[b] && AllTrue[{Sqrt[c],Sqrt[a]},IntegerQ]||PrimeQ[c]&&AllTrue[{Sqrt[b],Sqrt[a]},IntegerQ]; Table[Count[IntegerPartitions[n,{3}],?(p2sQ[#]&)],{n,0,80}] (* _Harvey P. Dale, Mar 10 2023 *)

Formula

a(n) = Sum_{primes p} A025426(n-p).
Previous Showing 21-30 of 45 results. Next