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 11-20 of 77 results. Next

A004144 Nonhypotenuse numbers (indices of positive squares that are not the sums of 2 distinct nonzero squares).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, 19, 21, 22, 23, 24, 27, 28, 31, 32, 33, 36, 38, 42, 43, 44, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 64, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 107, 108, 112, 114, 118, 121, 124, 126, 127
Offset: 1

Views

Author

Keywords

Comments

Also numbers with no prime factors of form 4*k+1.
m is a term iff A072438(m) = m.
Density 0. - Charles R Greathouse IV, Apr 16 2012
Closed under multiplication. Primitive elements are A045326, 2 and the primes of form 4*k+3. - Jean-Christophe Hervé, Nov 17 2013

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A009003.
The subsequence of primes is A045326.

Programs

  • Haskell
    import Data.List (elemIndices)
    a004144 n = a004144_list !! (n-1)
    a004144_list = map (+ 1) $ elemIndices 0 a005089_list
    -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    fQ[n_] := If[n > 1, First@ Union@ Mod[ First@# & /@ FactorInteger@ n, 4] != 1, True]; Select[ Range@ 127, fQ]
    A004144 = Select[Range[127],Length@Reduce[s^2 + t^2 == s # && s > t > 0, Integers] == 0 &] (* Gerry Martens, Jun 09 2020 *)
  • PARI
    is(n)=n==1||vecmin(factor(n)[,1]%4)>1 \\ Charles R Greathouse IV, Apr 16 2012
    
  • PARI
    list(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); for(i=1,lim, if(u[i]==0, listput(v,i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    

Formula

A005089(a(n)) = 0. - Reinhard Zumkeller, Jan 07 2013
The number of terms below x is ~ (A * x / sqrt(log(x))) * (1 + C/log(x) + O(1/log(x)^2)), where A = A244659 and C = A244662 (Shanks, 1975). - Amiram Eldar, Jan 29 2022

Extensions

More terms from Reinhard Zumkeller, Jun 17 2002
Name clarified by Evan M. Bailey, Sep 17 2019

A005279 Numbers having divisors d, e with d < e < 2*d.

Original entry on oeis.org

6, 12, 15, 18, 20, 24, 28, 30, 35, 36, 40, 42, 45, 48, 54, 56, 60, 63, 66, 70, 72, 75, 77, 78, 80, 84, 88, 90, 91, 96, 99, 100, 102, 104, 105, 108, 110, 112, 114, 117, 120, 126, 130, 132, 135, 138, 140, 143, 144, 150, 153, 154, 156, 160, 162, 165, 168, 170, 174, 175, 176
Offset: 1

Views

Author

Keywords

Comments

The arithmetic and harmonic means of A046793(n) and a(n) are both integers.
n is in this sequence iff n is a multiple of some term in A020886.
a(n) is also a positive integer v for which there exists a smaller positive integer u such that the contraharmonic mean (uu+vv)/(u+v) is an integer c (in fact, there are two distinct values u giving with v the same c). - Pahikkala Jussi, Dec 14 2008
A174903(a(n)) > 0; complement of A174905. - Reinhard Zumkeller, Apr 01 2010
Also numbers n such that A239657(n) > 0. - Omar E. Pol, Mar 23 2014
Erdős (1948) shows that this sequence has a natural density, so a(n) ~ k*n for some constant k. It can be shown that k < 3.03, and by numerical experiments it seems that k is around 1.8. - Charles R Greathouse IV, Apr 22 2015
Numbers k such that at least one of the parts in the symmetric representation of sigma(k) has width > 1. - Omar E. Pol, Dec 08 2016
Erdős conjectured that the asymptotic density of this sequence is 1. The numbers of terms not exceeding 10^k for k = 1, 2, ... are 1, 32, 392, 4312, 45738, 476153, 4911730, 50359766, 513682915, 5224035310, ... - Amiram Eldar, Jul 21 2020
Numbers with at least one partition into two distinct parts (s,t), sWesley Ivan Hurt, Jan 16 2022
Appears to be the set of numbers x such that there exist numbers y and z satisfying the condition (x^2+y^2)/(x^2+z^2) = (x+y)/(x+z). For example, (15^2+10^2)/(15^2+3^2) = (15+10)/(15+3), so 15 is in the sequence. - Gary Detlefs, Apr 01 2023
From Bob Andriesse, Nov 26 2023: (Start)
Rewriting (x^2+y^2) / (x^2+z^2) = (x+y) / (x+z) as (x^2+y^2) / (x+y) = (x^2+z^2) / (x+z) has the advantage that the values on both sides of the = sign in the given example become integers. A possible sequence with the name: "k's for which r = (k^2+m^2) / (k+m) can be an integer while mA053629(n) and the r's being A009003(n). If (k^2+m^2) / (k+m) = r and m satisfies the divisibility condition, then r-m also does, because (k^2 + (r-m)^2) / (k + (r-m)) = r as well, confirming Pahikkala Jussi's comment about the existence of two distinct values for his u.
The fact that 15 is in the sequence is not so much because (15^2 + 10^2) / (15^2 + 3^2) = 1.3888... = (15+10) / (15+3), as indicated by Gary Detlefs, but rather because (15+10) | (15^2 + 10^2). And since r = (15^2 + 10^2) / (15+10) = 13, the second value that satisfies the divisibility condition is 13-10 = 3, so (15^2 + 3^2) / (15+3) = 13 as well.
Since (k+m)| (k^2 + m^2) is equivalent to (k+m) | 2*k^2 as well as to (k+m) | 2*m^2, both of these alternative divisibility conditions can be used to generate the same sequence too. (End)

References

  • R. K. Guy, Unsolved Problems in Number Theory, E3.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Subsequence of A024619 and hence of A002808.

Programs

  • Haskell
    a005279 n = a005279_list !! (n-1)
    a005279_list = filter ((> 0) . a174903) [1..]
    -- Reinhard Zumkeller, Sep 29 2014
    
  • Maple
    isA005279 := proc(n) local divs,d,e ; divs := numtheory[divisors](n) ; for d from 1 to nops(divs)-1 do for e from d+1 to nops(divs) do if divs[e] < 2*divs[d] then RETURN(true) ; fi ; od: od: RETURN(false) : end; for n from 3 to 300 do if isA005279(n) then printf("%d,",n) ; fi ; od : # R. J. Mathar, Jun 08 2006
  • Mathematica
    aQ[n_] := Select[Partition[Divisors[n], 2, 1], #[[2]] < 2 #[[1]] &] != {}; Select[Range[178], aQ] (* Jayanta Basu, Jun 28 2013 *)
  • PARI
    is(n)=my(d=divisors(n));for(i=3,#d,if(d[i]<2*d[i-1],return(1)));0 \\ Charles R Greathouse IV, Apr 22 2015
    
  • Python
    from sympy import divisors
    def is_A005279(n): D=divisors(n)[1:]; return any(e<2*d  for d,e in zip(D, D[1:]))
    # M. F. Hasler, Mar 20 2025

Formula

a(n) = A010814(n)/2. - Omar E. Pol, Dec 04 2016

A064533 Decimal expansion of Landau-Ramanujan constant.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Oct 08 2001

Keywords

Comments

Named after the German mathematician Edmund Georg Hermann Landau (1877-1938) and the Indian mathematician Srinivasa Ramanujan (1887-1920). - Amiram Eldar, Jun 20 2021

Examples

			0.76422365358922066299069873125009232811679054139340951472168667374...
		

References

  • Bruce C. Berndt, Ramanujan's notebook part IV, Springer-Verlag, 1994, pp. 52, 60-66; MR 95e: 11028.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
  • G. H. Hardy, "Ramanujan, Twelve lectures on subjects suggested by his life and work", Chelsea, 1940, pp. 60-63; MR 21 # 4881.
  • Edmund Landau, Über die Einteilung der positiven ganzen Zahlen in vier Klassen nach der Mindestzahl der zu ihrer additiven Zusammensetzung erforderlichen Quadrate. Arch. Math. Phys., 13, 1908, pp. 305-312.

Crossrefs

Cf. A125776 = Continued fraction. - Harry J. Smith, May 13 2009

Programs

  • Mathematica
    First@ RealDigits@ N[1/Sqrt@2 Product[((1 - 2^(-2^k)) 4^(2^k) Zeta[2^k]/(Zeta[2^k, 1/4] - Zeta[2^k, 3/4]))^(2^(-k - 1)), {k, 8}], 2^8] (* Robert G. Wilson v, Jul 01 2007 *)
    (* Victor Adamchik calculated 5100 digits of the Landau-Ramanujan constant using Mathematica (from Mathematica 4 demos): *) LandauRamanujan[n_] := With[{K = Ceiling[Log[2, n*Log[3, 10]]]}, N[Product[(((1 - 2^(-2^k))*4^2^k*Zeta[2^k])/(Zeta[2^k, 1/4] - Zeta[2^k, 3/4]))^2^(-k - 1), {k, 1, K}]/Sqrt[2], n]];
    (* The code reported here is the code at https://library.wolfram.com/infocenter/Demos/120/. Looking carefully at the outputs reported there one sees that: the last 8 digits of the 500-digit output ("74259724") are not the same as those listed in the 1000-digit output ("94247095"); the same happens with the last 18 digits of the 1000-digit output ("584868265713856413") and the corresponding ones in the 5100-digit output ("852514327407923660"). - Alessandro Languasco, May 07 2021 *)

Formula

From Amiram Eldar, Mar 08 2024: (Start)
Equals (Pi/4) * Product_{primes p == 1 (mod 4)} (1 - 1/p^2)^(1/2).
Equals (1/sqrt(2)) * Product_{primes p == 3 (mod 4)} (1 - 1/p^2)^(-1/2).
Equals (1/sqrt(2)) * Product_{k>=1} ((1 - 1/2^(2^k)) * zeta(2^k)/beta(2^k)), where beta is the Dirichlet beta function (Shanks, 1964). (End)

Extensions

More references needed! Hardy and Wright? Gruber and Lekkerkerker?
More terms from Vladeta Jovovic, Oct 08 2001

A009000 Ordered hypotenuse numbers (squares are sums of 2 distinct nonzero squares).

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 25, 25, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 50, 50, 51, 52, 53, 55, 58, 60, 61, 65, 65, 65, 65, 68, 70, 73, 74, 75, 75, 78, 80, 82, 85, 85, 85, 85, 87, 89, 90, 91, 95, 97, 100, 100, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120
Offset: 1

Views

Author

Keywords

Comments

The largest member 'c' of the Pythagorean triples (a,b,c) ordered by increasing c.
If c^2 = a^2 + b^2 (a < b < c) then c^2 = (n^2 + m^2)/2 with n = b - a, m = b + a. - Zak Seidov, Mar 03 2011
Numbers n such that A083025(n) > 0, i.e., n is divisible by at least one prime of the form 4k+1. - Max Alekseyev, Oct 24 2008
A number appears only once in the sequence if and only if it is divisible by exactly one prime of the form 4k+1 with multiplicity one (cf. A084645). - Jean-Christophe Hervé, Nov 11 2013
If c^2 = a^2 + b^2 with a and b > 0, then a <> b: the sum of 2 equal squares cannot be a square because sqrt(2) is not rational. - Jean-Christophe Hervé, Nov 11 2013

References

  • W. L. Schaaf, Recreational Mathematics, A Guide To The Literature, "The Pythagorean Relationship", Chapter 6 pp. 89-99 NCTM VA 1963.
  • W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 2, "The Pythagorean Relation", Chapter 6 pp. 108-113 NCTM VA 1972.
  • W. L. Schaaf, A Bibliography of Recreational Mathematics, Vol. 3, "Pythagorean Recreations", Chapter 6 pp. 62-6 NCTM VA 1973.

Crossrefs

Programs

  • Maple
    A009000:=proc(N) # To get all terms <= N
        local p,q,i,L;
        L:=[];
        for p from 2 to floor(sqrt(N-1)) do
            for q to p-1 do
                if igcd(p,q)=1 and is(p-q,odd) then
                    L:=[op(L),seq(i*(p^2+q^2),i=1..N/(p^2+q^2))];
                fi
            od
        od;
        return op(sort(L))
    end proc:
    A009000(120); # Felix Huber, Feb 10 2025
  • Mathematica
    max = 120; hypotenuseQ[n_] := For[k = 1, True, k++, p = Prime[k]; Which[Mod[p, 4] == 1 && Divisible[n, p], Return[True], p > n, Return[False]]]; hypotenuses = Select[Range[max], hypotenuseQ]; red[c_] := {a, b, c} /. {ToRules[ Reduce[0 < a <= b && a^2 + b^2 == c^2, {a, b}, Integers]]}; A009000 = Flatten[red /@ hypotenuses, 1][[All, -1]] (* Jean-François Alcover, May 23 2012, after Max Alekseyev *)
    Sqrt[#]&/@Flatten[Table[Total/@Select[IntegerPartitions[n^2,{2}],Length[Union[#]]==2&&AllTrue[Sqrt[#],IntegerQ]&],{n,150}]] (* Harvey P. Dale, May 25 2025 *)
  • PARI
    list(lim)=my(v=List(),m2,s2,h2,h); for(middle=4,lim-1, m2=middle^2; for(small=1,middle, s2=small^2; if(issquare(h2=m2+s2,&h), if(h>lim, break); listput(v, h)))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jun 23 2017
    
  • PARI
    list(lim) = {my(lh = List()); for(u = 2, sqrtint(lim), for(v = 1, u, if (u^2+v^2 > lim, break); if ((gcd(u,v) == 1) && (0 != (u-v)%2), for (i = 1, lim, if (i*(u^2+v^2) > lim, break); /* if (u^2 - v^2 < 2*u*v, w = [i*(u^2 - v^2), i*2*u*v, i*(u^2+v^2)], w = [i*2*u*v, i*(u^2 - v^2), i*(u^2+v^2)]); */ listput(lh, i*(u^2+v^2)););););); vecsort(Vec(lh));} \\ Michel Marcus, Apr 10 2021
    
  • Python
    from math import isqrt
    def aupto(limit):
      s = [i*i for i in range(1, limit+1)]
      s2 = sorted(a+b for i, a in enumerate(s) for b in s[i+1:])
      return [isqrt(k) for k in s2 if k in s]
    print(aupto(120)) # Michael S. Branicky, May 10 2021

A000415 Numbers that are the sum of 2 but no fewer nonzero squares.

Original entry on oeis.org

2, 5, 8, 10, 13, 17, 18, 20, 26, 29, 32, 34, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 68, 72, 73, 74, 80, 82, 85, 89, 90, 97, 98, 101, 104, 106, 109, 113, 116, 117, 122, 125, 128, 130, 136, 137, 145, 146, 148, 149, 153, 157, 160, 162, 164, 170, 173, 178, 180, 181
Offset: 1

Views

Author

Keywords

Comments

Only these numbers can occur as discriminants of quintic polynomials with solvable Galois group F20. - Artur Jasinski, Oct 25 2007
Complement of A022544 in the nonsquare positive integers A000037. - Max Alekseyev, Jan 21 2010
Nonsquare positive integers D such that Pell equation y^2 - D*x^2 = -1 has rational solutions. - Max Alekseyev, Mar 09 2010
Nonsquares for which all 4k+3 primes in the integer's canonical form occur with even multiplicity. - Ant King, Nov 02 2010

References

  • E. Grosswald, Representation of Integers as Sums of Squares, Springer-Verlag, New York Inc., (1985), p.15. - Ant King, Nov 02 2010

Crossrefs

Programs

  • Mathematica
    c = {}; Do[Do[k = a^2 + b^2; If[IntegerQ[Sqrt[k]], Null, AppendTo[c,k]], {a, 1, 100}], {b, 1, 100}]; Union[c] (* Artur Jasinski, Oct 25 2007 *)
    Select[Range[181],Length[PowersRepresentations[ #,2,2]]>0 && !IntegerQ[Sqrt[ # ]] &] (* Ant King, Nov 02 2010 *)
  • PARI
    is(n)=my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); !issquare(n) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A000415_gen(startvalue=2): # generator of terms >= startvalue
        for n in count(max(startvalue,2)):
            f = factorint(n).items()
            if any(e&1 for p,e in f if p&3<3) and not any(e&1 for p,e in f if p&3==3):
                yield n
    A000415_list = list(islice(A000415_gen(),20)) # Chai Wah Wu, Aug 01 2023

Formula

{ A000404 } minus { A134422 }. - Artur Jasinski, Oct 25 2007

Extensions

More terms from Arlin Anderson (starship1(AT)gmail.com)

A050931 Numbers having a prime factor congruent to 1 mod 6.

Original entry on oeis.org

7, 13, 14, 19, 21, 26, 28, 31, 35, 37, 38, 39, 42, 43, 49, 52, 56, 57, 61, 62, 63, 65, 67, 70, 73, 74, 76, 77, 78, 79, 84, 86, 91, 93, 95, 97, 98, 103, 104, 105, 109, 111, 112, 114, 117, 119, 122, 124, 126, 127, 129, 130, 133, 134, 139, 140, 143, 146, 147, 148, 151
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 30 1999

Keywords

Comments

Original definition: Solutions c of cot(2*Pi/3)*(-(a+b+c)*(-a+b+c)*(-a+b-c)*(a+b-c))^(1/2)=a^2+b^2-c^2, c>a,b integers.
Note cot(2*Pi/3) = -1/sqrt(3).
Also the c-values for solutions to c^2 = a^2 + ab + b^2 in positive integers. Also the numbers which occur as the longest side of some triangle with integer sides and a 120-degree angle. - Paul Boddington, Nov 05 2007
The sequence can also be defined as the numbers w which are Heronian means of two distinct positive integers u and v, i.e., w = [u+sqrt(uv)+v]/3. E.g., 28 is the Heronian mean of 4 and 64 (and also of 12 and 48). - Pahikkala Jussi, Feb 16 2008
From Jean-Christophe Hervé, Nov 24 2013: (Start)
This sequence is the analog of hypotenuse numbers A009003 for triangles with integer sides and a 120-degree angle. There are two integers a and b > 0 such that a(n)^2 = a^2 + ab + b^2, and a, b and a(n) are the sides of the triangle: a(n) is the sequence of lengths of the longest side of these triangles. A004611 is the same for primitive triangles.
a and b cannot be equal because sqrt(3) is not rational. Then the values a(n) are such that a(n)^2 is in A024606. It follows that a(n) is the sequence of multiples of primes of form 6k+1 A002476.
The sequence is closed under multiplication. The primitive elements are those with exactly one prime divisor of the form 6k+1 with multiplicity one, which are also those for which there exists a unique 120-degree integer triangle with its longest side equals to a(n).
(End)
Conjecture: Numbers m such that abs(Sum_{k=1..m} [k|m]*A008683(k)*(-1)^(2*k/3)) = 0. - Mats Granvik, Jul 06 2024

Crossrefs

Cf. A002476, A004611, A024606, A230780 (complement), A009003.
Cf. A027748.

Programs

  • Haskell
    a050931 n = a050931_list !! (n-1)
    a050931_list = filter (any (== 1) . map (flip mod 6) . a027748_row) [1..]
    -- Reinhard Zumkeller, Apr 09 2014
    
  • Mathematica
    Select[Range[2,200],MemberQ[Union[Mod[#,6]&/@FactorInteger[#][[All,1]]],1]&] (* Harvey P. Dale, Aug 24 2019 *)
  • PARI
    is_A050931(n)=n>6&&Set(factor(n)[,1]%6)[1]==1 \\ M. F. Hasler, Mar 04 2018

Formula

A005088(a(n)) > 0. Terms are obtained by the products A230780(k)*A004611(p) for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 24 2013
cot(2*Pi/3) = -1/sqrt(3) = -0.57735... = - A020760. - M. F. Hasler, Aug 18 2016

Extensions

Simpler definition from M. F. Hasler, Mar 04 2018

A030052 Smallest number whose n-th power is a sum of distinct smaller positive n-th powers.

Original entry on oeis.org

3, 5, 6, 15, 12, 25, 40, 84, 47, 63, 68, 81, 102, 95, 104, 162, 123
Offset: 1

Views

Author

Richard C. Schroeppel

Keywords

Comments

Sprague has shown that for any n, all sufficiently large integers are the sum of distinct n-th powers. Sequence A001661 lists the largest number not of this form, so we know that a(n) is less than or equal to the next larger n-th power. - M. F. Hasler, May 25 2020
a(18) <= 200, a(19) <= 234, a(20) <= 242; for more upper bounds see the Al Zimmermann's Programming Contests link: The "Final Report" gives exact solutions for n = 16 through 30; those for n = 16 and 17 have been confirmed to be minimal by Jeremy Sawicki. - M. F. Hasler, Jul 20 2020

Examples

			3^1 = 2^1 + 1^1, and there is no smaller solution given that the r.h.s. is the smallest possible sum of distinct positive powers.
For n = 2, one sees immediately that 3 is not a solution (3^2 > 2^2 + 1^2) and one can check that 4^2 isn't equal to Sum_{x in A} x^2 for any subset A of {1, 2, 3}. Therefore, the well known hypotenuse number 5 (cf. A009003) with 5^2 = 4^2 + 3^2 provides the smallest possible solution.
a(17) = 123 since 123^17 = Sum {3, 5, 7, 8, 9, 11, 13, 16, 17, 19, 30, 33, 34, 35, 38, 40, 41, 43, 51, 52, 54, 55, 58, 59, 60, 63, 66, 69, 70, 71, 72, 73, 75, 76, 81, 86, 87, 88, 89, 90, 92, 95, 98, 106, 107, 108, 120}^17, with obvious notation. [Solution found by Jeremy Sawicki on July 3, 2020, see Al Zimmermann's Programming Contests link.] - _M. F. Hasler_, Jul 18 2020
For more examples, see the link.
		

Crossrefs

Other sequences defined by sums of distinct n-th powers: A001661, A364637.

Programs

  • PARI
    A030052(n, m=n\/log(2)+1, s=0)={if(!s, until(A030052(n, m, (m+=1)^n),), s < 2^n || s > (m+n+1)*m^n\(n+1), m=s<2, m=min(sqrtnint(s, n), m); s==m^n || until( A030052(n, m-1, s-m^n) || (s>=(m+n)*(m-=1)^n\(n+1) && !m=0), )); m} \\ Does exhaustive search to find the least solution m. Use optional 2nd arg to specify a starting value for m. Calls itself with nonzero 3rd (optional) argument: in this case, returns nonzero iff s is the sum of powers <= m^n. - For illustration only: takes very long already for n = 8 and n >= 10. - M. F. Hasler, May 25 2020

Formula

a(n) <= A001661(n)^(1/n) + 1. - M. F. Hasler, May 25 2020
a(n) >= A332101(n) = A078607(n)+2 (conjectured). - M. F. Hasler, May 25 2020

Extensions

a(8)-a(10) found by David W. Wilson
a(11) from Al Zimmermann, Apr 07 2004
a(12) from Al Zimmermann, Apr 13 2004
a(13) from Manol Iliev, Jan 04 2010
a(14) and a(15) from Manol Iliev, Apr 28 2011
a(16) and a(17) due to Jeremy Sawicki, added by M. F. Hasler, Jul 20 2020

A005089 Number of distinct primes == 1 (mod 4) dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A001221, A005091, A005094, A083025 (with multiplicity).

Programs

  • Haskell
    a005089 = sum . map a079260 . a027748_row
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Magma
    [#[p:p in PrimeDivisors(n)|p mod 4 eq 1]: n in [1..100]]; // Marius A. Burtea, Jan 16 2020
  • Maple
    A005089 := proc(n)
        local a,pe;
        a := 0 ;
        for pe in ifactors(n)[2] do
            if modp(op(1,pe),4) =1 then
                a := a+1 ;
            end if;
        end do:
        a ;
    end  proc:
    seq(A005089(n),n=1..100) ; # R. J. Mathar, Jul 22 2021
  • Mathematica
    f[n_]:=Length@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==1&]; Table[f[n],{n,102}] (* Ray Chandler, Dec 18 2011 *)
    a[n_] := DivisorSum[n, Boole[PrimeQ[#] && Mod[#, 4] == 1]&]; Array[a, 100] (* Jean-François Alcover, Dec 01 2015 *)
  • PARI
    for(n=1,100,print1(sumdiv(n,d,isprime(d)*if((d-1)%4,0,1)),","))
    

Formula

Additive with a(p^e) = 1 if p == 1 (mod 4), 0 otherwise.
From Reinhard Zumkeller, Jan 07 2013: (Start)
a(n) = Sum_{k=1..A001221(n)} A079260(A027748(n,k)).
a(A004144(n)) = 0.
a(A009003(n)) > 0. (End)

A024507 Numbers that are the sum of 2 distinct nonzero squares (with repetition).

Original entry on oeis.org

5, 10, 13, 17, 20, 25, 26, 29, 34, 37, 40, 41, 45, 50, 52, 53, 58, 61, 65, 65, 68, 73, 74, 80, 82, 85, 85, 89, 90, 97, 100, 101, 104, 106, 109, 113, 116, 117, 122, 125, 125, 130, 130, 136, 137, 145, 145, 146, 148, 149, 153, 157, 160, 164, 169, 170, 170, 173, 178, 180, 181, 185, 185, 193
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A009000, A009003, A024507, A004431 (duplicates removed), A055096.

Programs

  • Mathematica
    nn=10000;A024507=Table[x^2+y^2,{x,Sqrt[nn]},{y,x+1,Sqrt[nn-x^2]}]//Flatten//Sort (* Zak Seidov, Apr 07 2011*)

Extensions

Name edited by Zak Seidov, Apr 08 2011

A332065 Infinite square array where row n lists the integers whose n-th power is the sum of distinct n-th powers of positive integers; read by falling antidiagonals.

Original entry on oeis.org

3, 4, 5, 5, 7, 6, 6, 9, 9, 15, 7, 10, 12, 25, 12, 8, 11, 13, 27, 23, 25, 9, 12, 14, 29, 24, 28, 40, 10, 13, 15, 30, 28, 32, 43, 84, 11, 14, 16, 31, 29, 34, 44, 85, 47, 12, 15, 17, 33, 30, 35, 45, 86, 49, 63, 13, 16, 18, 35, 31, 36, 46, 87, 52, 64, 68
Offset: 1

Views

Author

M. F. Hasler, Mar 31 2020

Keywords

Comments

Each row contains all sufficiently large integers (Sprague). Sequences A001422, A001476, A046039, A194768, A194769, ... mention the largest number which can't be written as sum of distinct n-th powers for n = 2, 3, 4, 5, 6, ...; see also A001661. Sequence A332066 gives the number of positive integers not in row n.
All positive multiples of any T(n,k) appear later in that row (because if s^n = Sum_{x in S} x^n, then (k*s)^n = Sum_{x in k*S} x^n).

Examples

			The table reads: (Entries from where on T(n,k+1) = T(n,k)+1 are marked by *.)
   n | k=1    2    3    4    5    6    7    8    9   10   11   12   13  ...
  ---+---------------------------------------------------------------------
   1 |   3*   4    5    6    7    8    9   10   11   12   13   14   15  ...
   2 |   5    7    9*  10   11   12   13   14   15   16   17   18   19  ...
   3 |   6    9   12*  13   14   15   16   17   18   19   20   21   22  ...
   4 |  15   25   27   29   30   31   33   35   37   39   41   43   45* ...
   5 |  12   23   24   28*  29   30   31   32   33   34   35   36   37  ...
   6 |  25   28   32   34*  35   36   37   38   39   40   41   42   43  ...
   7 |  40   43*  44   45   46   47   48   49   50   51   52   53   54  ...
   8 |  84*  85   86   87   88   89   90   91   92   93   94   95   96  ...
   9 |  47   49   52*  53   54   55   56   57   58   59   60   61   62  ...
  10 |  63*  64   65   66   67   68   69   70   71   72   73   74   75  ...
  11 |  68   73*  74   75   76   77   78   79   80   81   82   83   84  ...
  ...| ...
Row 1: 3^1 = 2^1 + 1^1, 4^1 = 3^1 + 1^1, 5^1 = 4^1 + 1^1, 6^1 = 5^1 + 1^1, ...
Row 2: 5^2 = 4^2 + 3^2, 7^2 = 6^2 + 3^2 + 2^2, 9^2 = 8^2 + 4^2 + 1^2, ...
Row 3: 6^3 = 5^3 + 4^3 + 3^3, 9^3 = 8^3 + 6^3 + 1, 12^3 = 10^3 + 8^3 + 6^3, ...
Row 4: 15^4 = Sum {14, 9, 8, 6, 4}^4, 25^4 = Sum {21, 20, 12, 10, 8, 6, 2}^4, ...
See the link for other rows.
		

Crossrefs

Cf. A030052 (first column), A001661.
Cf. A009003 (hypotenuse numbers; subsequence of row 2).
Cf. A332066.

Programs

  • PARI
    M332065=Map(); A332065(n,m,r)={if(r, if( m<2^n||m>r^n*(r+n+1)\(n+1), m<2, r=min(sqrtnint(m,n),r), m==r^n || while( !A332065(n,m-r^n,r-=1) && (mA004736(n),n=A002260(n)]; mapisdefined(M332065,[n,m],&r), r, n<2, m+2, r=if(m>1,A332065(n,m-1),n+2); until(A332065(n, (r+=1)^n, r-1),); mapput(M332065,[n,m],r); r)} \\ Calls itself with nonzero (optional) 3rd argument to find by exhaustive search whether r can be written as sum of distinct powers <= m^n. (Comment added by M. F. Hasler, May 25 2020)

Formula

T(1,k) = 2 + k for all k. (Indeed, s^1 = (s-1)^1 + 1 and s-1 > 1 for s > 2.)
T(2,k) = 6 + k for all k >= 3. (Use s^2 = (s-1)^2 + 2*s-1 and A001422, A009003.)
T(3,k) = 9 + k for all k >= 3. (Use max A001476 = 12758 < 24^3.)
T(4,k) = 32 + k for all k >= 13. (Use max A046039 < 48^4.)
T(5,k) = 24 + k for all k >= 4. (Use max(N \ A194768) < 37^5.)
T(6,k) = 30 + k for all k >= 4. (Use max(N \ A194769) < 48^6.)
T(7,k) = 41 + k for all k >= 2.
T(9,k) = 49 + k for all k >= 3.

Extensions

More terms from M. F. Hasler, Jul 19 2020
Previous Showing 11-20 of 77 results. Next