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

A084349 Squarefree numbers that are not the sum of two squares.

Original entry on oeis.org

1, 3, 6, 7, 11, 14, 15, 19, 21, 22, 23, 30, 31, 33, 35, 38, 39, 42, 43, 46, 47, 51, 55, 57, 59, 62, 66, 67, 69, 70, 71, 77, 78, 79, 83, 86, 87, 91, 93, 94, 95, 102, 103, 105, 107, 110, 111, 114, 115, 118, 119, 123, 127, 129, 131, 133, 134, 138, 139, 141, 142, 143
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 21 2003

Keywords

Comments

Intersection of A005117 (squarefree) and A018825. - Michel Marcus, Dec 02 2015

Examples

			A005117(10) = 14: 14 - 1^2 = 13, 14 - 2^2 = 10 and 14 - 3^3 = 5 are nonsquares, therefore 14 is a term;
A005117(9) = 13 is not a term: A020893(4) = 13 = 2^2 + 3^2.
		

Crossrefs

Programs

  • Haskell
    a084349 n = a084349_list !! (n-1)
    a084349_list = 1 : filter (\x -> all (== 0) $ map (a010052 . (x -)) $
                               takeWhile (<= x) a000290_list) a005117_list
    -- Reinhard Zumkeller, Dec 11 2011
  • Mathematica
    Prepend[Select[Range@ 144, SquareFreeQ@ # && SquaresR[2, #] == 0 &], 1] (* Michael De Vlieger, Dec 02 2015 *)

A214329 Complement of A214328.

Original entry on oeis.org

2, 3, 5, 6, 8, 9, 10, 11, 12, 13, 14, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 59, 61, 62, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 84, 85, 86, 88, 89, 90, 91, 93, 94, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109
Offset: 1

Views

Author

N. J. A. Sloane, Jul 26 2012, following a suggestion from Hans Isdahl, Apr 19 2012

Keywords

Comments

Numbers that are the sum of 2 or 3 nonzero squares. - Altug Alkan, Jan 13 2016

Crossrefs

Programs

  • PARI
    is2(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2))}
    is3(n) = {my(a, b) ; a=1; while(a^2+1Altug Alkan, Jan 13 2016

A331802 Integers having no representation as sum of two nonsquarefree numbers.

Original entry on oeis.org

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

Views

Author

Bernard Schott, Feb 23 2020

Keywords

Comments

This sequence is finite with 14 terms and 23 is the largest term (see Prime Curios link); a proof can be found in comments of A331801.

Examples

			With the two smallest nonsquarefree numbers 4 and 8, it is not possible to get 1, 2, 3, 4, 5, 6, 7, 9, 10 and 11 as sum of two nonsquarefree numbers.
		

Crossrefs

Cf. A005117 (squarefree), A013929 (nonsquarefree), A331801 (complement).
Cf. A000404 (sum of 2 nonzero squares), A018825 (not the sum of 2 nonzero squares).
Cf. A001694 (squareful), A052485 (not squareful), A076871 (sum of 2 squareful), A085253 (not the sum of 2 squareful).

Programs

  • Mathematica
    max = 25; Complement[Range[max], Union @ Select[Total /@ Tuples[Select[Range[max], !SquareFreeQ[#] &], 2], # <= max &]] (* Amiram Eldar, Feb 24 2020 *)

A337140 Numbers m = a + b with a and b positive integers whose product a*b = k^2 is a square.

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 48, 50, 51, 52, 53, 54, 55, 56, 58, 60, 61, 62, 64, 65, 66, 68, 70, 72, 73, 74, 75, 76, 78, 80, 82, 84, 85, 86, 87, 88, 89, 90, 91
Offset: 1

Views

Author

Hein van Winkel, Aug 18 2020

Keywords

Comments

Related to Heron triangles with a partition point on one of the sides. Calculations become quite different when the partition a + b = m gives the perfect square k^2 = a*b.
These numbers coincide with the numbers > 1 not in A004614.
Let m = 2^t * p_1^a_1 * p_2^a_2 * ... * p_r^a_r * q_1^b_1 * q_2^b_2 * ... * q_s^b_s with t >= 0, a_i >= 0 for i=1..r, where p_i == 1 (mod 4) for i=1..r and q_j == -1 (mod 4) for j=1..s.
Even numbers (A005843) belong to this sequence: m = 2*k and p = k^2.
Numbers divisible by a prime q congruent to 1 (mod 4) (cf. A004613) belong to this sequence: m = q * m_1 = (u^2 + v^2) * m_1 and p = (u*v*q)^2.
The other numbers are divisible only by primes congruent to 3 (mod 4) (cf. A004614).
If a term m is not in the union of A005843 and A004613, then m = q_1^b_1 * q_2^b_2 * ... * q_s^b_s is a term of A018825 (numbers not the sum of two nonzero squares) = q_i * m_1 = q_i *(u^2 + v) and p = q_i^2 * u^2 * v for all u^2 < m_1 and v nonsquare. And so m is not a term: A contradiction.

Examples

			Even numbers m = 2*k give a = b = k. For example, 94 = 47+47 and k^2 = 47^2.
Numbers which are divisible by a prime q congruent to 1 (mod 4) give m = q*m' = (u^2 + v^2)*m' and p = (u*v*m')^2. For example, 87 = 3*29 = 3*(25 + 4) = (5*4*3)^2 = 60^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Length @ Select[Times @@@ IntegerPartitions[#, {2}], IntegerQ @ Sqrt[#1] &] > 0 &] (* Amiram Eldar, Aug 26 2020 *)
  • PARI
    upto(n) = { my(res = List(vector(n\2, i, 2*i))); forstep(i = 1, n, 2, c = core(i); for(k = 1, sqrtint((n-i)\c), listput(res, i + c*k^2); ) ); listsort(res, 1); res } \\ David A. Corneth, Aug 26 2020
    
  • PARI
    is(n) = for(i = 1, n\2 + 1, if(issquare(i * (n-i)), return(n>1))); 0 \\ David A. Corneth, Aug 26 2020
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A337140_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n: n&1^1 or not all(p&2 for p in primefactors(n>>(~n & n-1).bit_length())), count(max(startvalue,2)))
    A337140_list = list(islice(A337140_gen(),30)) # Chai Wah Wu, Aug 21 2024

A267967 Integers n such that n^n is the sum of two nonzero squares while n is not.

Original entry on oeis.org

30, 60, 70, 78, 102, 110, 120, 140, 150, 156, 174, 182, 190, 204, 210, 220, 222, 230, 238, 240, 246, 270, 280, 286, 300, 310, 312, 318, 330, 348, 350, 364, 366, 374, 380, 390, 406, 408, 420, 430, 438, 440, 444, 460, 470, 476, 480, 492, 494, 510, 518, 534, 540, 546, 550, 560
Offset: 1

Views

Author

Altug Alkan, Jan 22 2016

Keywords

Comments

Terms that are not divisible by 10 are 78, 102, 156, 174, 182, 204, 222, 238, 246, 286, 312, 318, 348, 364, 366, 374, 406, 408, 438, 444, 476, 492, 494, 518, 534, 546, 572, 574, 582, 598, 606, 624, 636, 638, 646, 654, 678, 696, 728, ...
If k^2 is the sum of 2 nonzero squares, (2*k)^(2*k) is. (2*k)^(2*k) = 2^(2*k) * k^(2*k) = (2^k)^2 * k^2 * k^(2*k-2) = (2^k)^2 * k^2 * (k^(k-1))^2. So if k^2 = a^2 + b^2, then (2*k)^(2*k) = (k^(k-1)*2^k*a)^2 + (k^(k-1)*2^k*b)^2. And if k^2 = a^2 + b^2 and k is not the sum of 2 nonzero squares, 2*k is not the sum of 2 nonzero squares. So 2 * A162592(n) appears in this sequence. Note that all terms appear as even numbers.

Examples

			30 is a term because 30 is not the sum of 2 nonzero squares and 30^30 = 8609344200000000000000^2 + 11479125600000000000000^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 120, SquaresR[2, #] == 0 && Resolve[Exists[{a, b}, Reduce[#^# == (a^2 + b^2), {a, b}, Integers], a > b > 0]] &] (* Michael De Vlieger, Jan 24 2016 *)
  • PARI
    isA000404(n) = {for( i=1, #n=factor(n)~%4, n[1, i]==3 && n[2, i]%2 && return); n && ( vecmin(n[1, ])==1 || (n[1, 1]==2 && n[2, 1]%2));}
    for(n=1, 1e3, if(isA000404(n^n) && !isA000404(n), print1(n, ", ")));

A331801 Integers that are sum of two nonsquarefree numbers.

Original entry on oeis.org

8, 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, 83, 84, 85
Offset: 1

Views

Author

Bernard Schott, Jan 26 2020

Keywords

Comments

Proposition: All integers > 23 are terms of this sequence (see link Prime Curios!).
Proof by exhaustion:
1) For numbers {4*k} with k>=6, then 4*k = 4*(k-1) + 4 is a term as 4*(k-1) and 4 are nonsquarefree;
2) For numbers {4*k+1} with k>=6, then 4*k+1 = 4*(k-2) + 9 is a term as 4*(k-2) and 9 are nonsquarefree;
3) For numbers {4*k+2} with k>=6, then 4*k+2 = 4*(k-4) + 18 is a term as 4*(k-4) and 18 are nonsquarefree;
4) For numbers {4*k+3}; with k=6, 27 = 9+18 is a term as 9 and 18 are nonsquarefree, and with k>=7, 4*k+3 = 4*(k-6) + 27 is also a term as 4*(k-6) and 27 are nonsquarefree.
Conclusion: every integer > 23 is sum of two nonsquarefree numbers (QED).

Examples

			13 = 4 + 9 and 21 = 9 + 12 are terms of this sequence as 4, 9 and 12 are nonsquarefree numbers.
		

Crossrefs

Cf. A005117 (squarefree), A013929 (nonsquarefree), A331802 (complement).
Cf. A000404 (sum of 2 nonzero squares), A018825 (not the sum of 2 nonzero squares).
Cf. A001694 (squareful), A052485 (not squareful), A076871 (sum of 2 squareful), A085253 (not the sum of 2 squareful).

Programs

  • Mathematica
    max = 85; Union @ Select[Total /@ Tuples[Select[Range[max], !SquareFreeQ[#] &], 2], # <= max &] (* Amiram Eldar, Feb 04 2020 *)
    Join[{8,12,13,16,17,18,20,21,22},Range[24,100]] (* or *) Complement[Range[100],{1,2,3,4,5,6,7,9,10,11,14,15,19,23}] (* Harvey P. Dale, Dec 04 2024 *)
  • PARI
    isok(m) = {for (i=1, m-1, if (!issquarefree(i) && !issquarefree(m-i), return (1));); return(0);} \\ Michel Marcus, Jan 31 2020

A350864 Nonprimes that are not the sum of 2 nonzero squares.

Original entry on oeis.org

1, 4, 6, 12, 14, 15, 21, 22, 24, 27, 28, 30, 33, 35, 38, 39, 42, 44, 46, 48, 51, 54, 55, 56, 57, 60, 62, 63, 66, 69, 70, 75, 76, 77, 78, 84, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 102, 105, 108, 110, 111, 112, 114, 115, 118, 119, 120, 123, 124, 126, 129, 132
Offset: 1

Views

Author

Robert P. P. McKone, Jan 19 2022

Keywords

Comments

a(1) = 1 and a(2) = 4 are squares, but are not the sum of two nonzero squares. If zero were allowed, then 1 and 4 would not be terms, since 1 = 1 + 0 and 4 = 4 + 0.

Crossrefs

Intersection of A018252 and A018825.
Cf. A001481.

Programs

  • Mathematica
    a[n_] := Complement[Table[m, {m, 1, n}], Table[Prime[m], {m, 1, PrimePi[n]}], Select[Range[5, n], SquaresR[2, #] != 0 &]]; a[132]
Previous Showing 11-17 of 17 results.