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

A078134 Number of ways to write n as sum of squares > 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 2, 1, 1, 0, 2, 1, 1, 0, 2, 3, 1, 1, 2, 3, 1, 1, 3, 3, 3, 1, 5, 3, 3, 1, 5, 5, 3, 3, 5, 7, 3, 3, 6, 8, 6, 3, 9, 8, 8, 3, 9, 10, 9, 6, 9, 14, 9, 8, 11, 15, 12, 9, 15, 15, 16, 9, 18, 18, 18, 13, 19, 23, 18, 17, 21, 28, 22, 19, 26, 30, 28, 19, 31, 34, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

a(A078135(n))=0; a(A078136(n))=1; a(A078137(n))>0;
Conjecture (lower bound): for all k exists b(k) such that a(n)>k for n>b(k); see b(0)=A078135(12)=23 and b(1)=A078136(15)=39. This is true - see comments by Hieronymus Fischer.
Also first difference of A001156 (number of partitions of n into squares). - Wouter Meeussen, Oct 22 2005
Comments from Hieronymus Fischer, Nov 11 2007 (Start): First statement of monotony: a(n+k^2)>=a(n) for all k>1. Proof: we restrict ourselves on a(n)>0 (the case a(n)=0 is trivial). Let T(i), 1<=i<=a(n), be the a(n) different sum expressions of squares >1 representing n. Then, adding k^2 to those expressions, we get a(n) sums of squares T(i)+k^2, obviously representing n+k^2, thus a(n+k^2) cannot be less than a(n).
Second statement of monotony: a(n+m)>=max(a(n),a(m)) for all m with a(m)>1. Proof: let T(i), 1<=i<=a(n), be the a(n) different sum expressions of squares >1 representing n; let S(i), 1<=i<=a(m), be the a(m) different sum expressions of squares >1 representing m. Then, adding those expressions, we get a(n) sums of squares T(i)+S(1), representing n+m, further we get a(m) sums T(1)+S(i), also representing n+m, thus a(n+m) cannot be less than the maximum of a(n) and a(m).
The author's conjecture holds true. Proof by induction: b(0) exists; if b(k) exists, then a(j)>k for all j>b(k). Setting m:=b(k)+1, we find that there are k+1 sums B(0,i) of squares >1, 1<=i<=k+1, with m=B(0,i). Further there are k+1 such sum expressions B(1,i), B(2,i) and B(3,i), 1<=i<=k+1, representing m+1, m+2 and m+3, respectively. For n>b(k) we have n=m+4*floor((n-m)/4)+(n-m) mod 4.
Thus n=m+r+s*2^2, where r=0,1,2 or 3. Hence n can be written B(r,i)+s*2^2 and there are k+1 such representations. Let q be the maximal number (to be squared) occurring as a term within those sum expressions B(r,i), 0<=r<=3,1<=i<=k+1. We select a number p>q and we set c:=b(k)+p^2. For n>c, we have the k+1 representations B(r(n),i)+s(n)*2^2.
Additionally, for n-p^2 (which is >b(k)) there are also k+1 representations B(r_p,i)+s_p*2^2, where r_p:=r(n-p^2), s_p:=s(n-p^2). Thus n can be written B(r(n),i)+s(n)*2^2, 1<=i<=k+1 and B(r_p,i)+s_p*2^2+p^2, 1<=i<=k+1.
By choice of p all these sum representations of n are different, which implies, that there are 2k+2 such representations. It follows a(n)>2k+2>k+1 for all n>c, which implies, that b(k+1) exists.
A more precise formulation of the author's conjecture is "b(k):=min( n | a(j)>k for all j>n) exists for all k>=0". (End)
A033183(n) <= a(n). [From Reinhard Zumkeller, Nov 07 2009]

Examples

			a(42)=3: 2*3^2+6*2^2 = 4^2+2*3^2+2*2^2 = 5^2+3^2+2*2^2.
		

Crossrefs

See A134754 for the sequence representing b(k).

Programs

  • Haskell
    a078134 = p $ drop 2 a000290_list where
       p _          0 = 1
       p ks'@(k:ks) x = if x < k then 0 else p ks' (x - k) + p ks x
    -- Reinhard Zumkeller, May 04 2013
  • Mathematica
    Join[{1}, Table[Length[PowersRepresentations[n, n, 2]], {n, 1, 90}]] // Differences
    (* or *)
    m = 91; CoefficientList[Product[1/(1 - x^(k^2)), {k, 1, m}] + O[x]^m, x] // Differences (* Jean-François Alcover, Mar 01 2019 *)

Formula

a(n) = 1/n*Sum_{k=1..n} (A035316(k)-1)*a(n-k), a(0) = 1. - Vladeta Jovovic, Nov 20 2002
G.f. g(x)=product{k>1, 1/(1-x^(k^2))}-1 = 1/((1-x^4)*(1-x^9)*(1-x^16)*(1-x^25)*(1-x^36)*...)-1. - Hieronymus Fischer, Nov 19 2007
a(n) ~ exp(3*Pi^(1/3) * Zeta(3/2)^(2/3) * n^(1/3) / 2^(4/3)) * Zeta(3/2)^(4/3) / (2^(11/3) * sqrt(3) * Pi^(5/6) * n^(11/6)). - Vaclav Kotesovec, Jan 05 2017

A078135 Numbers which cannot be written as a sum of squares > 1.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 10, 11, 14, 15, 19, 23
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

Numbers such that A078134(n)=0.
"Numbers which cannot be written as sum of squares > 1" is equivalent to "Numbers which cannot be written as sum of squares of primes." Equivalently, numbers which can be written as the sum of nonzero squares can also be written as sum of the squares of primes." cf. A090677 = number of ways to partition n into sums of squares of primes. - Jonathan Vos Post, Sep 20 2006
The sequence is finite with a(12)=23 as last member. Proof: When k=a^2+b^2+..., k+4 = 2^2+a^2+b^2+... If k can be written as sum of the squares of primes, k+4 also has this property. As 24,25,26,27 have the property, by induction, all numbers > 23 can be written as sum of squares>1. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Apr 07 2007
Also, numbers which cannot be written as sum of squares of 2 and 3 (see A078137 for the proof). Explicit representation as sum of squares of primes, or rather of squares of 2 and 3, for numbers m>23: we have m=c*2^2+d*3^2, where c:=(floor(m/4) - 2*(m mod 4))>=0, d:=m mod 4. For that, the finiteness of the sequence is proved constructively. - Hieronymus Fischer, Nov 11 2007
Also numbers n such that every integer partition of n contains a squarefree number. For example, 21 does not belong to the sequence because there are integer partitions of 21 containing no squarefree numbers, namely: (12,9), (9,8,4), (9,4,4,4). - Gus Wiseman, Dec 14 2018

Crossrefs

Programs

  • Mathematica
    nn=100;
    ser=Product[If[SquareFreeQ[n],1,1/(1-x^n)],{n,nn}];
    Join@@Position[CoefficientList[Series[ser,{x,0,nn}],x],0]-1 (* Gus Wiseman, Dec 14 2018 *)

Formula

A090677(a(n)) = 0. - Jonathan Vos Post, Sep 20 2006 [corrected by Joerg Arndt, Dec 16 2018]
A033183(a(n)) = 0. - Reinhard Zumkeller, Nov 07 2009

A090677 Number of ways to partition n into sums of squares of primes.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 19 2003

Keywords

Comments

From Hieronymus Fischer, Nov 11 2007: (Start)
First statement of monotony: a(n+p^2)>=a(n) for all primes p. Proof: we restrict ourselves on a(n)>0 (the case a(n)=0 is trivial). Let T(i), 1<=i<=a(n), be the a(n) different sums of squares of primes representing n. Then, adding p^2 to those expressions, we get a(n) sums of squares of primes T(i)+p^2, obviously representing n+p^2, thus a(n+p^2) cannot be less than a(n).
Second statement of monotony: a(n+m)>=max(a(n),a(m)) for all m with a(m)>1. Proof: let T(i), 1<=i<=a(n), be the a(n) different sums of squares of primes representing n; let S(i), 1<=i<=a(m), be the a(m) different sums of squares of primes representing m. Then, adding these expressions, we get a(n) sums of squares of primes T(i)+S(1), representing n+m, further we get a(m) sums T(1)+S(i), also representing n+m. Thus a(n+m) cannot be less than the maximum of a(n) and a(m).
The minimum b(k):=min( n | a(j)>k for all j>n) exists for all k>=0. See A134755 for that sequence representing b(k). (End)

Examples

			a(25)=2 because 25 = 5^2 = 4*(2^2)+3^2.
a(83)=8 because 83 = 3^2+5^2+7^2 = 4*(2^2)+2*(3^2)+7^2
                   = 2*(2^2)+3*(5^2) = 6*(2^2)+3^2+2*(5^2)
                   = 2^2+6*(3^2)+5^2 = 10*(2^2)+2*(3^2)+5^2
                   = 5*(2^2)+7*(3^2) = 14*(2^2)+3*(3^2).
		

References

  • R. F. Churchouse, Representation of integers as sums of squares of primes. Caribbean J. Math. 5 (1986), no. 2, 59-65.

Crossrefs

Programs

  • Mathematica
    CoefficientList[ Series[ Product[1/(1 - x^Prime[i]^2), {i, 111}], {x, 0, 101}], x] (* Robert G. Wilson v, Sep 20 2004 *)

Formula

G.f.: 1/((1-x^4)*(1-x^9)*(1-x^25)*(1-x^49)*(1-x^121)*(1-x^169)*(1-x^289)...).
G.f.: 1 + Sum_{i>=1} x^(prime(i)^2) / Product_{j=1..i} (1 - x^(prime(j)^2)). - Ilya Gutkovskiy, May 07 2017

A078137 Numbers which can be written as sum of squares>1.

Original entry on oeis.org

4, 8, 9, 12, 13, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

A078134(a(n))>0.
Numbers which can be written as a sum of squares of primes. - Hieronymus Fischer, Nov 11 2007
Equivalently, numbers which can be written as a sum of squares of 2 and 3. Proof for numbers m>=24: if m=4*(k+6), k>=0, then m=(k+6)*2^2; if m=4*(k+6)+1 than m=(k+4)*2^2+3^2; if m=4*(k+6)+2 then m=(k+2)*2^2+2*3^2; if m=4*(k+6)+3 then m=k*2^2+3*3^2. Clearly, the numbers a(n)<24 can also be written as sums of squares of 2 and 3. Explicit representation as a sum of squares of 2 and 3 for numbers m>23: m=c*2^2+d*3^2, where c:=(floor(m/4) - 2*(m mod 4))>=0 and d:=m mod 4. - Hieronymus Fischer, Nov 11 2007

Crossrefs

Programs

Formula

a(n)=n + 12 for n >= 12. - Hieronymus Fischer, Nov 11 2007

Extensions

Edited by N. J. A. Sloane, Oct 17 2009 at the suggestion of R. J. Mathar.

A078136 Numbers having exactly one representation as sum of squares>1.

Original entry on oeis.org

4, 8, 9, 12, 13, 17, 18, 21, 22, 26, 27, 30, 31, 35, 39
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

A078134(a(n))=1.
The sequence is finite with a(15)=39 as last term, since numbers m>39 can be represented as sums of squares>1 (even of squares of primes and even of squares of 2, 3 and 4 and even of squares of 2, 3 and 5) in at least two ways. Proof: if m=40+4k, k>=0, then m=(k+10)*2^2=(k+1)*2^2+4*3^2; if m=41+4k, then m=(k+8)*2^2+3^2=(k+4)*2^2+5^2; if m=42+4k, then m=(k+6)*2^2+2*3^2=(k+2)*2^2+3^2+5^2; if m=43+4k, then m=(k+4)*2^2+3*3^2=k*2^2+2*3^2+5^2. - Hieronymus Fischer, Nov 11 2007

Crossrefs

A134755 Minimal number such that all greater numbers can be written as sums of squares of primes in more than n ways.

Original entry on oeis.org

23, 39, 55, 64, 68, 73, 80, 84, 91, 96, 100, 105, 109, 113, 114, 118, 122, 123, 127, 131, 132, 136, 140, 140, 144, 145, 145, 149, 149, 153, 154, 156, 158, 160, 163, 164, 167, 168, 168, 172, 172, 176, 176, 176, 180, 180, 181, 181, 185, 185, 185, 189, 189, 190
Offset: 0

Views

Author

Hieronymus Fischer, Nov 11 2007

Keywords

Comments

The sequence is well-defined, in that a(n) exists for all n>=0. Proof by induction: a(0) exists. We set b(j):=number of ways to write j as sum of squares of primes (=A090677). If a(n) exists, then b(j)>n for all j>a(n). Setting m:=a(n)+1, we find that there are n+1 sum of squares of primes B(0,i), 1<=i<=n+1, with m=B(0,i).
Further there are n+1 such sum expressions B(1,i), B(2,i) and B(3,i), 1<=i<=n+1, representing m+1, m+2 and m+3, respectively. For all j>a(n) we have j=m+4*floor((j-m)/4)+(j-m) mod 4. Thus j=m+r+s*2^2, where r=0,1,2 or 3. Hence n can be written B(r,i)+s*2^2 and there are n+1 such representations.
Let q be the maximal prime number (to be squared) occurring as a term within those sum expressions B(r,i), 0<=r<=3,1<=i<=n+1. We select a prime number p>q and we set c:=a(n)+p^2. For j>c, we have the n+1 representations B(r(j),i)+s(j)*2^2. Additionally, for j-p^2 (which is >a(n)) there are also n+1 representations B(r_p,i)+s_p*2^2, where r_p:=r(j-p^2), s_p:=s(j-p^2).
Thus j can be written B(r(j),i)+s(j)*2^2, 1<=i<=n+1 and B(r_p,i)+s_p*2^2+p^2, 1<=i<=n+1. By choice of p all these sum representations of j are different, which implies, that there are 2n+2 such representations. It follows b(j)>2n+2>n+1 for all j>c, which implies, that a(n+1) exists.

Examples

			a(0)=23, since numbers >23 can be written as sum of squares of primes.
a(1)=39, since there are at least two ways, to write a number >39 as a sum of squares of primes.
		

Crossrefs

Formula

a(n)=min( m | A090677(j)>n for all j>m).

A078133 Primes which cannot be written as sum of cubes>1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 47, 53, 61, 71, 73, 79, 101, 103, 109, 127
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

Sequence is finite, see A078129.

Crossrefs

A078138 Primes which can be written as sum of squares > 1.

Original entry on oeis.org

13, 17, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

By Sylvester's solution to the Frobenius problem, all integers greater than 4*9 - 4 - 9 = 23 can be represented as a sum of multiples of 4 and 9. Hence all primes except 2,3,5,7,11,19,23 are in this sequence. [Charles R Greathouse IV, Apr 19 2010]

Examples

			A000040(11) = 31 = 3^2 + 3^2 + 3^2 + 2^2, therefore 31 is a term.
		

Crossrefs

Programs

  • Mathematica
    Join[{13,17},Prime[Range[10,100]]] (* Harvey P. Dale, May 12 2014 *)
  • PARI
    a(n)=if(n<3,[13,17][n],prime(n+7))

Extensions

Comments, reference, and links by Charles R Greathouse IV, Apr 19 2010
Showing 1-8 of 8 results.