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-10 of 12 results. Next

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

A114374 Number of partitions of n into parts that are not squarefree.

Original entry on oeis.org

1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 3, 1, 0, 0, 5, 2, 2, 0, 7, 3, 2, 0, 11, 6, 4, 3, 15, 8, 6, 3, 22, 13, 11, 6, 34, 18, 15, 9, 46, 27, 24, 17, 64, 43, 33, 23, 89, 60, 51, 37, 124, 84, 78, 51, 166, 119, 109, 78, 226, 168, 152, 118, 300, 228, 215, 166, 404, 313, 300, 230, 546, 421, 409
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 09 2006

Keywords

Comments

a(A078135(n)) = 0; a(A078137(n)) > 0.

Examples

			a(12) = #{2*2*3, 2*2*2 + 2*2, 2*2 + 2*2 + 2*2} = 3;
a(13) = #{3*3 + 2*2} = 1.
		

Crossrefs

Programs

  • Haskell
    a114374 = p a013929_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Jun 01 2015
  • Maple
    with(numtheory):
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i<1, 0, b(n, i-1)+
          `if`(i>n or issqrfree(i), 0, b(n-i, i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..100);  # Alois P. Heinz, Jun 03 2015
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n || SquareFreeQ[i], 0, b[n-i, i]]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jun 30 2015, after Alois P. Heinz *)

Formula

a(n) = A000041(n) - A073576(n) - A117395(n). - Reinhard Zumkeller, Mar 11 2006
G.f.: Product_{k>=1} (1 - mu(k)^2*x^k)/(1 - x^k), where mu(k) is the Moebius function (A008683). - Ilya Gutkovskiy, Dec 30 2016

Extensions

Offset changed and a(0)=1 prepended by Reinhard Zumkeller, Jun 01 2015

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

A067666 Sum of squares of prime factors of n (counted with multiplicity).

Original entry on oeis.org

0, 4, 9, 8, 25, 13, 49, 12, 18, 29, 121, 17, 169, 53, 34, 16, 289, 22, 361, 33, 58, 125, 529, 21, 50, 173, 27, 57, 841, 38, 961, 20, 130, 293, 74, 26, 1369, 365, 178, 37, 1681, 62, 1849, 129, 43, 533, 2209, 25, 98, 54, 298, 177, 2809, 31, 146, 61, 370, 845, 3481
Offset: 1

Views

Author

Henry Bottomley, Feb 04 2002

Keywords

Comments

16 and 27 are fixed points, ... and see Rivera link. - Michel Marcus, Sep 19 2020

Examples

			a(2) = 2^2 = 4;
a(45) = a(3*3*5) = 3^2 + 3^2 + 5^2 = 43.
		

Crossrefs

Cf. A166319 (where a(n)<=n), A001222, A001414, A005063, A078137, A081403.

Programs

  • Maple
    A067666 := proc(n)
        add(op(2,pe)*op(1,pe)^2, pe=ifactors(n)[2]) ;
    end proc:
    seq(A067666(n),n=1..100) ;# R. J. Mathar, Jul 31 2024
  • Mathematica
    Join[{0},Table[Total[Flatten[Table[#[[1]],{#[[2]]}]&/@ FactorInteger[ n]]^2],{n,2,60}]] (* Harvey P. Dale, Dec 24 2012 *)
    Join[{0}, Table[Total[#[[1]]^2*#[[2]] & /@ FactorInteger[n]], {n, 2, 60}]] (* Zak Seidov, Apr 18 2013 *)
  • PARI
    a(n)=local(fm,t);fm=factor(n);t=0;for(k=1,matsize(fm)[1],t+=fm[k,1]^2*fm[k,2]);t \\ Franklin T. Adams-Watters, May 03 2009
    
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, f[k,1]^2*f[k,2]); \\ Michel Marcus, Sep 19 2020

Formula

a(x*y) = a(x) + a(y); a(p^k) = k*p^2 for p prime.
Totally additive with a(p) = p^2.

Extensions

Values through a(59) verified by Franklin T. Adams-Watters, May 03 2009

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

A078139 Primes which cannot be written as sum of squares>1.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

From Hieronymus Fischer, Nov 11 2007: (Start)
Equivalently, prime numbers which cannot be written as sum of squares of primes (see A078137 for the proof).
Equivalently, prime numbers which cannot be written as sum of squares of 2 and 3 (see A078137 for the proof).
The sequence is finite, since numbers > 23 can be written as sums of squares >1 (see A078135).
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. (End)

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).

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

Original entry on oeis.org

23, 39, 39, 55, 55, 55, 59, 59, 63, 71, 71, 71, 71, 75, 75, 75, 75, 79, 79, 87, 87, 87, 87, 87, 91, 91, 91, 91, 91, 91, 95, 95, 95, 95, 95, 96, 96, 99, 99, 103, 103, 103, 103, 103, 103, 103, 107, 107, 107, 107, 107, 107, 107, 107, 111, 111, 111, 111, 111, 111, 111
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. For the reasoning see A078134.

Examples

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

Crossrefs

Formula

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

A078131 Numbers which can be written as sum of cubes > 1.

Original entry on oeis.org

8, 16, 24, 27, 32, 35, 40, 43, 48, 51, 54, 56, 59, 62, 64, 67, 70, 72, 75, 78, 80, 81, 83, 86, 88, 89, 91, 94, 96, 97, 99, 102, 104, 105, 107, 108, 110, 112, 113, 115, 116, 118, 120, 121, 123, 124, 125, 126, 128, 129, 131, 132, 133, 134, 135, 136, 137, 139, 140
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2002

Keywords

Comments

A078128(a(n)) > 0.

Examples

			35 is in the sequence because 35 = 27 + 8.
		

Crossrefs

Cf. A000578, A078129 (complement of this sequence), A078130, A078137.

Programs

  • Maple
    a:=proc(n) local h, hser: h:=1/product(1-x^(j^3),j=2..30): hser:=series(h,x=0,150): if coeff(hser,x^n)>0 then n else fi end: seq(a(n),n=1..140); # Emeric Deutsch, Mar 30 2006
  • Mathematica
    terms = 60;
    (Exponent[#, x]& /@ List @@ Normal[1/Product[1-x^j^3, {j, 2, Ceiling[(3 terms)^(1/3)]}] + O[x]^(3 terms)])[[2 ;; terms+1]] (* Jean-François Alcover, Aug 04 2018, after Emeric Deutsch *)

Formula

a(n) = n + 83 for n >= 72. - Robert Israel, Apr 05 2020
Showing 1-10 of 12 results. Next