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

A224450 Numbers that are the primitive sum of two nonzero squares in exactly one way.

Original entry on oeis.org

2, 5, 10, 13, 17, 25, 26, 29, 34, 37, 41, 50, 53, 58, 61, 73, 74, 82, 89, 97, 101, 106, 109, 113, 122, 125, 137, 146, 149, 157, 169, 173, 178, 181, 193, 194, 197, 202, 218, 226, 229, 233, 241, 250, 257, 269, 274, 277, 281, 289, 293, 298, 313, 314, 317, 337
Offset: 1

Views

Author

Wolfdieter Lang, Apr 17 2013

Keywords

Comments

If one includes 1 as the first entry then this sequence gives the numbers that are the primitive sum of two squares (square 0 allowed) in exactly one way, if neither the order of the squares nor the signs of the numbers to be squared matters.
Compare this sequence with A025284.
If 2 is omitted from this sequence then all members are primitively represented by two distinct nonzero squares in exactly one way.
The sequence A193138(n), n >= 3, gives the multiplicities of the primitive sums of two squares (automatically distinct and nonzero for n >= 3 if such a sum exists at all).
Numbers such that there is exactly one pair (m,k) where m + k = a(n), and m*k == 1 (mod a(n)), m > 0 and m <= k. - Torlach Rush, Oct 19 2020
A pair (s,t) such that s+t = a(n) and s*t == +1 (mod a(n)) as above is obtained from a square root of -1 (mod a(n)) for s and t = a(n)-s. - Joerg Arndt, Oct 24 2020

Examples

			a(1) = 2 because m = 2 is the first number with a unique doublet (a,b) in question, namely (1,1) (gcd(1,1) = 1).
This is the only case with equal entries a and b (the non-distinct case).
8 is not a member of this sequence (but of A025284) because the only representation is 2^2 +2^2 and (2,2) is not primitive. Similarly for 18, 20, ...
a(2) = 5 because 5 is the second smallest number satisfying the given requirements. 3 and 4 have no representation as sum of two nonzero squares, and the unique doublet for 5 is (1,2) (with distinct a and b).
		

Crossrefs

Cf. A025284, A008784 (primitive sums of two squares with square 0 included), A224770 (exactly 2 ways), A193138 (multiplicities).

Programs

  • Mathematica
    nn = 20; t = Sort[Select[Flatten[Table[If[GCD[a, b] == 1, a^2 + b^2, 0], {a, nn}, {b, a, nn}]], 0 < # <= nn^2 &]]; t2 = Transpose[Select[Tally[t], #[[2]] == 1 &]][[1]] (* T. D. Noe, Apr 20 2013 *)

Formula

This sequence gives the increasingly ordered numbers m which satisfy m = a^2 + b^2, with a and b integers, 0 < a <= b, gcd(a,b) = 1, and there is only one such representation, denoted by one doublet (a,b).

A338667 Numbers that are the sum of two positive cubes in exactly one way.

Original entry on oeis.org

2, 9, 16, 28, 35, 54, 65, 72, 91, 126, 128, 133, 152, 189, 217, 224, 243, 250, 280, 341, 344, 351, 370, 407, 432, 468, 513, 520, 539, 559, 576, 637, 686, 728, 730, 737, 756, 793, 854, 855, 945, 1001, 1008, 1024, 1027, 1064, 1072, 1125, 1216, 1241, 1332, 1339, 1343, 1358, 1395, 1456, 1458, 1512, 1547, 1674, 1736
Offset: 1

Views

Author

David Consiglio, Jr., Apr 22 2021

Keywords

Comments

This sequence differs from A003325 at term 61: A003325(61) = 1729 is the famous Ramanujan taxicab number and is excluded from this sequence because it is the sum of two cubes in two distinct ways.

Examples

			35 is a term of this sequence because 2^3 + 3^3 = 8 + 27 = 35 and this is the one and only way to express 35 as the sum of two cubes.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@2000,Length[s=PowersRepresentations[#,2,3]]==1&&And@@(#>0&@@@s)&] (* Giorgos Kalogeropoulos, Apr 24 2021 *)
  • Python
    from itertools import combinations_with_replacement as cwr
    from collections import defaultdict
    from bisect import bisect_left as bisect
    keep = defaultdict(lambda: 0)
    power_terms = [x**3 for x in range(1,1000)]
    for pos in cwr(power_terms,2):
        tot = sum(pos)
        keep[tot] += 1
    rets = sorted([k for k,v in keep.items() if v == 1])
    for x in range(len(rets)):
        print(rets[x])

A273318 Numbers n such that n+k-1 is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

58472, 79208, 104616, 150048, 160848, 205648, 224648, 234448, 252808, 259648, 259920, 294048, 297448, 387648, 421648, 433448, 462976, 488448, 506248, 563048, 621448, 683648, 770976, 790848, 799648, 837448, 1008648, 1040848, 1084904, 1186632, 1195648, 1205648, 1212064
Offset: 1

Views

Author

Altug Alkan, May 19 2016

Keywords

Comments

Numbers n such that n+k-1 is the sum of two nonzero squares in exactly 4-k ways for all k = 1, 2, 3 are 22984, 65600, 80800, 85544, ...

Examples

			58472 is a term because;
58472 = 86^2 + 226^2.
58473 = 48^2 + 237^2 = 147^2 + 192^2.
58474 = 57^2 + 235^2 = 125^2 + 207^2 = 143^2 + 195^2.
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # get all terms <= N-2
    R:= Vector(N):
    for x from 1 to floor(sqrt(N)) do
      for y from 1 to min(x,floor(sqrt(N-x^2))) do
        R[x^2+y^2]:= R[x^2+y^2]+1
    od od:
    count:= 0:
    for n from 1 to N-2 do
      if [R[n],R[n+1],R[n+2]] = [1,2,3] then
      count:= count+1; A[count]:= n;
    fi
    od:
    seq(A[i],i=1..count); # Robert Israel, May 19 2016
  • PARI
    is(n,k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
    isok(n) = is(n,1) && is(n+1,2) && is(n+2,3);

A173256 Partial sums of A001481.

Original entry on oeis.org

0, 1, 3, 7, 12, 20, 29, 39, 52, 68, 85, 103, 123, 148, 174, 203, 235, 269, 305, 342, 382, 423, 468, 517, 567, 619, 672, 730, 791, 855, 920, 988, 1060, 1133, 1207, 1287, 1368, 1450, 1535, 1624, 1714, 1811, 1909, 2009, 2110, 2214, 2320, 2429, 2542, 2658, 2775
Offset: 1

Views

Author

Jonathan Vos Post, Feb 14 2010

Keywords

Comments

The subsequence of primes in this sequence begins 3, 7, 29, 103, 269, 619, 1811, 3271.

Examples

			a(66) = 0 + 1 + 2 + 4 + 5 + 8 + 9 + 10 + 13 + 16 + 17 + 18 + 20 + 25 + 26 + 29 + 32 + 34 + 36 + 37 + 40 + 41 + 45 + 49 + 50 + 52 + 53 + 58 + 61 + 64 + 65 + 68 + 72 + 73 + 74 + 80 + 81 + 82 + 85 + 89 + 90 + 97 + 98 + 100 + 101 + 104 + 106 + 109 + 113 + 116 + 117 + 121 + 122 + 125 + 128 + 130 + 136 + 137 + 144 + 145 + 146 + 148 + 149 + 153 + 157 + 160 = 4876.
		

Crossrefs

Programs

  • Maple
    N:= 1000:
    A001481:= sort(convert({seq(seq(x^2+y^2, y=0..floor(sqrt(N-x^2))),x=0..floor(sqrt(N)))},list)):
    ListTools:-PartialSums(A001481); # Robert Israel, Mar 15 2016
  • Python
    from itertools import count, accumulate, islice
    from sympy import factorint
    def A173256_gen(): # generator of terms
        return accumulate(filter(lambda n:all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items()),count(0)))
    A173256_list = list(islice(A173256_gen(),30)) # Chai Wah Wu, Jun 27 2022

Formula

a(n) = Sum_{i=1..n} A001481(i) = Sum_{i=1..n} (numbers that are the sum of 2 nonnegative squares) = Sum_{i=1..n} (numbers n such that i = x^2 + y^2 has a solution in nonnegative integers x, y).

Extensions

a(21) corrected by Robert Israel, Mar 15 2016

A379925 Numbers k for which nonnegative integers x and y exist such that x^2 + y^2 = k and x + y is a square.

Original entry on oeis.org

0, 1, 8, 10, 16, 41, 45, 53, 65, 81, 128, 130, 136, 146, 160, 178, 200, 226, 256, 313, 317, 325, 337, 353, 373, 397, 425, 457, 493, 533, 577, 625, 648, 650, 656, 666, 680, 698, 720, 746, 776, 810, 848, 890, 936, 986, 1040, 1098, 1160, 1201, 1205, 1213, 1225, 1226
Offset: 1

Views

Author

Felix Huber, Jan 25 2025

Keywords

Comments

Numbers k for which exists at least one solution to k = x^2 + (z^2 - x)^2 in integers x and z with x >= 0 and z >= sqrt(2*x).
Subsequence of A001481.

Examples

			10 is in the sequence because 10 = 1^2 + 3^2 and 1 + 3 = 2^2.
81 is in the sequence because 81 = 0^2 + 9^2 and 0 + 9 = 3^2.
		

Crossrefs

Programs

  • Maple
    # Calculates the first 10005 terms.
    A379925:=proc(K)
        local i,j,L;
        L:={};
        for i from 0 to floor(sqrt((K+1)^2)/2) do
            for j from 0 to floor(sqrt((K+1)^2/2-i^2)) do
                if issqr(i+j) then
                    L:=L union {i^2+j^2}
                fi
            od
        od;
        return op(L)
    end proc;
    A379925(1737);
  • PARI
    isok(n)=my(x=0, r=0); while(x<=sqrt(n) && r==0, if(issquare(n-x^2) && issquare(x+sqrtint(n-x^2)), r=1); x++); r; \\ Michel Marcus, Feb 10 2025

Formula

k = m^(4*j) is in the sequence for nonnegative integers m and j (not both 0) because x = 0 and z = m^j is a solution to m^(4*j) = x^2 + (z^2 - x)^2.

A115592 Number of distinct representations of n as the sum of two nonzero squares nontrivially divides the number of distinct representations of n as the sum of two primes.

Original entry on oeis.org

50, 200, 260, 290, 370, 530, 578, 610, 650, 740, 884, 962, 1060, 1170, 1300, 1370, 1460, 1508, 1530, 1690
Offset: 1

Views

Author

Jonathan Vos Post, Apr 02 2006

Keywords

Comments

"Nontrivially" meaning the number of distinct representations of n as the sum of two nonzero squares is at least 2.

Examples

			a(1) = 50 because 50 = 1^2 + 49^2 = 5^2 + 5^2 (2 distinct ways as sum of nonzero squares) and 50 = 3 + 47 = 7 + 43 = 13 + 37 = 19 + 31 (4 distinct ways as sum of two primes) and 2 | 4.
a(2) = 200 because 200 = 2^2 + 14^2 = 10^2 + 10^2 (2 distinct ways as sum of nonzero squares) and 200 = 3 + 197 = 7 + 193 = 19 + 181 = 37 + 163 = 43 + 157 = 61 + 139 = 73 + 127 = 97 + 103, (8 distinct ways as sum of two primes) and 2 | 8.
a(3) = 260 because (2 distinct ways as sum of nonzero squares) divides (10 distinct ways as sum of two primes).
a(4) = 290 because (2 distinct ways as sum of nonzero squares) divides (10 distinct ways as sum of two primes).
a(5) = 370 because (2 distinct ways as sum of nonzero squares) divides (14 distinct ways as sum of two primes).
a(6) = 530 because (2 distinct ways as sum of nonzero squares) divides (14 distinct ways as sum of two primes).
a(7) = 578 because (2 distinct ways as sum of nonzero squares) divides (12 distinct ways as sum of two primes).
a(8) = 610 because (2 distinct ways as sum of nonzero squares) divides (20 distinct ways as sum of two primes).
a(9) = 650 because (3 distinct ways as sum of nonzero squares) divides (21 distinct ways as sum of two primes).
a(10) = 740 because (2 distinct ways as sum of nonzero squares) divides (18 distinct ways as sum of two primes).
1300 is in the sequence because (3 distinct ways as sum of nonzero squares) divides (33 distinct ways as sum of two primes).
		

Crossrefs

Formula

Numbers n such that #{a^2 + b^2 = n and a>0 and b>0 and a>= b} > 1 and #{a^2 + b^2 = n and a>0 and b>0 and a>= b} | #{p(i) + p(j) = n and i >= j where p(k) = A000040(k)}.

Extensions

More terms from Nate Falkenstein (njf127(AT)psu.edu), Apr 25 2006

A273236 Primes p such that p + k is the sum of two nonzero squares in exactly k ways for all k = 1, 2, 3.

Original entry on oeis.org

563047, 1186631, 1205647, 1421647, 1871503, 2058047, 2615047, 2739103, 2795047, 3703463, 3743647, 4106447, 4723847, 4748047, 4758847, 5744447, 6991847, 8376847, 9951047, 10014847, 12214303, 12773447, 14161183, 14402447, 15232031, 15630847
Offset: 1

Views

Author

Altug Alkan, May 26 2016

Keywords

Comments

All terms of this sequence are the sum of 4 but no fewer nonzero squares.

Examples

			The prime 563047 is a term because 563048 = 218^2 + 718^2, 563049 = 165^2 + 732^2 = 357^2 + 660^2 and 563050 = 71^2 + 747^2 = 141^2 + 737^2 = 505^2 + 555^2.
		

Crossrefs

Programs

  • PARI
    is(n, k) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb == k; }
    isok(n) = isprime(n) && is(n+1, 1) && is(n+2, 2) && is(n+3, 3);

A273530 Numbers n such that n is the sum of two nonzero squares in exactly one way, n+1 is the sum of a positive square and a positive cube in exactly one way and n+2 is the sum of 2 positive cubes in exactly one way.

Original entry on oeis.org

349, 853, 12634, 42937, 51741, 59912, 97677, 169748, 195137, 199528, 231892, 269728, 337768, 343636, 392272, 403037, 599561, 920456, 1458538, 1521873, 1645873, 1894121, 2337928, 2388697, 3131728, 3159673, 3186349, 3731769, 3835024, 3890248, 4037794
Offset: 1

Views

Author

Altug Alkan, May 24 2016

Keywords

Examples

			349 is a term because 349 = 5^2 + 18^2, 350 = 15^2 + 5^3, 351 = 2^3 + 7^3.
		

Crossrefs

Previous Showing 11-18 of 18 results.