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

A008784 Numbers k such that sqrt(-1) mod k exists; or, numbers that are primitively represented by x^2 + y^2.

Original entry on oeis.org

1, 2, 5, 10, 13, 17, 25, 26, 29, 34, 37, 41, 50, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, 101, 106, 109, 113, 122, 125, 130, 137, 145, 146, 149, 157, 169, 170, 173, 178, 181, 185, 193, 194, 197, 202, 205, 218, 221, 226, 229, 233, 241, 250, 257, 265, 269, 274, 277, 281, 289
Offset: 1

Views

Author

Keywords

Comments

Numbers whose prime divisors are all congruent to 1 mod 4, with the exception of at most a single factor of 2. - Franklin T. Adams-Watters, Sep 07 2008
In appears that {a(n)} is the set of proper divisors of numbers of the form m^2+1. - Kaloyan Todorov (kaloyan.todorov(AT)gmail.com), Mar 25 2009 [This conjecture is correct. - Franklin T. Adams-Watters, Oct 07 2009]
If a(n) is a term of this sequence, then so too are all of its divisors (Euler). - Ant King, Oct 11 2010
From Richard R. Forberg, Mar 21 2016: (Start)
For a given a(n) > 2, there are 2^k solutions to sqrt(-1) mod n (for some k >= 1), and 2^(k-1) solutions primitively representing a(n) by x^2 + y^2.
Record setting values for the number of solutions (i.e., the next higher k values), occur at values for a(n) given by A006278.
A224450 and A224770 give a(n) values with exactly one and exactly two solutions, respectively, primitively representing integers as x^2 + y^2.
The 2^k different solutions for sqrt(-1) mod n can written as values for j, with j <= n, such that integers r = sqrt(n*j-1). However, the set of j values (listed from smallest to largest) transform into themselves symmetrically (i.e., largest to smallest) when the solutions are written as n-r. When the same 2^k solutions are written as r-j, it is clear that only 2^(k-1) distinct and independent solutions exist. (End)
Lucas uses the fact that there are no multiples of 3 in this sequence to prove that one cannot have an equilateral triangle on the points of a square lattice. - Michel Marcus, Apr 27 2020
For n > 1, terms are precisely the numbers such that there is at least one pair (m,k) where m + k = a(n), and m*k == 1 (mod a(n)), m > 0 and m <= k. - Torlach Rush, Oct 18 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
The Diophantine equation x^2 + y^2 = z^5 + z with gcd(x, y, z) = 1 has solutions iff z is a term of this sequence. See Gardiner reference, Olympiad links and A340129. - Bernard Schott, Jan 17 2021
Except for 1, numbers of the form a + b + 2*sqrt(a*b - 1) for positive integers a,b such that a*b-1 is a square. - Davide Rotondo, Nov 10 2024

References

  • B. C. Berndt & R. A. Rankin, Ramanujan: Letters and Commentary, see p. 176; AMS Providence RI 1995.
  • J. W. S. Cassels, Rational Quadratic Forms, Cambridge, 1978.
  • Leonard Eugene Dickson, History of the Theory Of Numbers, Volume II: Diophantine Analysis, Chelsea Publishing Company, 1992, pp.230-242.
  • A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Problem 6 pp. 63 and 167-168 (1985).
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Ch. 20.2-3.

Crossrefs

Apart from the first term, a subsequence of A000404.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a008784 n = a008784_list !! (n-1)
    a008784_list = 1 : 2 : union a004613_list (map (* 2) a004613_list)
    -- Reinhard Zumkeller, Oct 25 2015
  • Maple
    with(numtheory); [seq(mroot(-1,2,p),p=1..300)];
  • Mathematica
    data=Flatten[FindInstance[x^2+y^2==# && 0<=x<=# && 0<=y<=# && GCD[x,y]==1,{x,y},Integers]&/@Range[289],1]; x^2+y^2/.data//Union (* Ant King, Oct 11 2010 *)
    Select[Range[289], And @@ (Mod[#, 4] == 1 & ) /@ (fi = FactorInteger[#]; If[fi[[1]] == {2, 1}, Rest[fi[[All, 1]]], fi[[All, 1]]])&] (* Jean-François Alcover, Jul 02 2012, after Franklin T. Adams-Watters *)
  • PARI
    is(n)=if(n%2==0,if(n%4,n/=2,return(0)));n==1||vecmax(factor(n)[,1]%4)==1 \\ Charles R Greathouse IV, May 10 2012
    
  • PARI
    list(lim)=my(v=List([1,2]),t); lim\=1; for(x=2,sqrtint(lim-1), t=x^2; for(y=0,min(x-1,sqrtint(lim-t)), if(gcd(x,y)==1, listput(v,t+y^2)))); Set(v) \\ Charles R Greathouse IV, Sep 06 2016
    
  • PARI
    for(n=1,300,if(issquare(Mod(-1, n)),print1(n,", "))); \\ Joerg Arndt, Apr 27 2020
    

Extensions

Checked by T. D. Noe, Apr 19 2007

A003654 Squarefree integers m such that the fundamental unit of Q(sqrt(m)) has norm -1. Also, squarefree integers m such that the Pell equation x^2 - m*y^2 = -1 is soluble.

Original entry on oeis.org

2, 5, 10, 13, 17, 26, 29, 37, 41, 53, 58, 61, 65, 73, 74, 82, 85, 89, 97, 101, 106, 109, 113, 122, 130, 137, 145, 149, 157, 170, 173, 181, 185, 193, 197, 202, 218, 226, 229, 233, 241, 257, 265, 269, 274, 277, 281, 290, 293, 298, 313, 314, 317, 337, 346, 349, 353, 362
Offset: 1

Views

Author

N. J. A. Sloane, Mira Bernstein. Entry revised by N. J. A. Sloane, Jun 11 2012

Keywords

Comments

The squarefree elements of A003814 and A172000. - Max Alekseyev, Jun 01 2009
Together with {1} and A031398 forms a disjoint partition of A020893. That is, A020893 = {1} U A003654 U A031398. - Max Alekseyev, Mar 09 2010
Squarefree integers m such that Q(sqrt(m)) contains the infinite continued fraction [k, k, k, k, k, ...] for some positive integer k. For example, Q(sqrt(5)) contains [1, 1, 1, 1, 1, ...] which equals (1 + sqrt(5))/2. - Greg Dresden, Jul 23 2010

References

  • D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, pp. 224-241.
  • M. Kraitchik, Recherches sur la Théorie des Nombres. Gauthiers-Villars, Paris, Vol. 1, 1924, Vol. 2, 1929, see Vol. 1, p. 46.
  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 56.
  • W. Paulsen, Calkin-Wilf sequences for irrational numbers, Fib. Q., 61:1 (2023), 51-59.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    isA003654 := proc(n)
        local cf,p ;
        if not numtheory[issqrfree](n) then
            return false;
        end if;
        for p in numtheory[factorset](n) do
            if modp(p,4) = 3 then
                return false;
            end if;
        end do:
        cf := numtheory[cfrac](sqrt(n),'periodic','quotients') ;
        type( nops(op(2,cf)),'odd') ;
    end proc:
    A003654 := proc(n)
        option remember;
        local a;
        if n = 1 then
            2;
        else
            for a from procname(n-1)+1 do
                if isA003654(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A003654(n),n=1..40) ; # R. J. Mathar, Oct 19 2014
  • Mathematica
    Reap[For[n = 2, n < 1000, n++, If[SquareFreeQ[n], sol = Solve[x^2 - n y^2 == -1, {x, y}, Integers]; If[sol != {}, Sow[n]]]]][[2, 1]] (* Jean-François Alcover, Mar 24 2020 *)

Extensions

Edited by Max Alekseyev, Mar 17 2010

A031398 Squarefree n with no 4k+3 factors such that Pell equation x^2 - n y^2 = -1 is insoluble.

Original entry on oeis.org

34, 146, 178, 194, 205, 221, 305, 377, 386, 410, 466, 482, 505, 514, 545, 562, 674, 689, 706, 745, 793, 802, 866, 890, 898, 905, 1154, 1186, 1202, 1205, 1234, 1282, 1345, 1346, 1394, 1405, 1469, 1513, 1517, 1537, 1538, 1717, 1762, 1802, 1858
Offset: 1

Views

Author

Keywords

Comments

Or, numbers n which are the sum of two relatively-prime squares but for which x^2 - n*y^2 does not represent -1.
Together with {1} and A003654 forms a disjoint partition of A020893. That is, A020893 = {1} U A003654 U A031398. - Max Alekseyev, Mar 09 2010

References

  • Harvey Cohn, "Advanced Number Theory".

Crossrefs

Programs

  • Mathematica
    sel = Select[Range[2000], SquareFreeQ[#] && FreeQ[Mod[FactorInteger[#][[All, 1]], 4], 3]&]; r[n_] := Reduce[x^2-n*y^2 == -1, {x, y}, Integers]; Reap[For[n=1, n <= Length[sel], n++, an = sel[[n]]; If[r[an] === False, Print[an]; Sow[an]]]][[2, 1]] (* Jean-François Alcover, Feb 04 2014 *)

Extensions

Edited by N. J. A. Sloane, Apr 28 2008, at the suggestion of Artur Jasinski

A090735 Number of positive squarefree numbers <= n that can be expressed as a sum of 2 squares > 0.

Original entry on oeis.org

0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17
Offset: 1

Views

Author

Benoit Cloitre, Jan 18 2004

Keywords

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 100

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[Boole[n > 1 && SquareFreeQ[n] && AllTrue[FactorInteger[n][[;; , 1]], Mod[#, 4] < 3 &]], {n, 1, 100}] ] (* Amiram Eldar, May 08 2022 *)
  • PARI
    a(n)=sum(i=1,n,issquarefree(i)*if(sum(u=1,i,sum(v=1,u,if(u^2+v^2-i,0,1))),1,0))

Formula

a(n) is asymptotic to (6K/Pi^2)*n/sqrt(log(n)) where K is the Landau-Ramanujan constant (A064533).

A145017 Squarefree positive integers k for which k-(floor(sqrt(k)))^2 is a perfect square.

Original entry on oeis.org

1, 2, 5, 10, 13, 17, 26, 29, 34, 37, 53, 58, 65, 73, 82, 85, 97, 101, 109, 122, 130, 137, 145, 170, 173, 178, 185, 194, 197, 205, 221, 226, 229, 241, 257, 265, 281, 290, 293, 298, 305, 314, 349, 362, 365, 370, 377, 386, 397, 401, 409, 442, 445, 457, 466, 485, 493
Offset: 1

Views

Author

Vladimir Shevelev, Sep 29 2008

Keywords

Comments

If an odd prime p divides a(n) then it has the form 4k+1.
Conjecture. For every n>=1 there exist infinitely many primes p of the form 4k+1 for which for a(n) > 1 we have s*p-(floor(sqrt(s*p)))^2 is not a perfect square for s=1,...,a(n)-1 while a(n)*p-(floor(sqrt(a(n)*p)))^2 is a perfect square. (See A145016(s=1) and A145022, A145023, A145047, A145048, A145049, A145050 correspondingly for s=2, s=5, s=10, s=13, s=17, s=26.) - Vladimir Shevelev, Sep 30 2008

Crossrefs

Programs

  • Mathematica
    Select[Range@ 500, And[SquareFreeQ@ #, IntegerQ@ Sqrt[# - Floor[Sqrt@ #]^2]] &] (* Michael De Vlieger, Jan 12 2020 *)
  • PARI
    is(n)={issquarefree(n) && issquare(n-sqrtint(n)^2)} \\ Andrew Howroyd, Jan 12 2020

Extensions

Missing a(40) inserted and terms a(42) and beyond from Andrew Howroyd, Jan 12 2020

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

A175908 3*sum(k=1..n, floor(k^2/n)) - n^2.

Original entry on oeis.org

2, 2, 3, 5, 2, 3, 5, 8, 6, 2, 5, 9, 2, 5, 9, 14, 2, 6, 5, 11, 6, 5, 11, 18, 8, 2, 9, 11, 2, 9, 11, 20, 6, 2, 11, 21, 2, 5, 15, 20, 2, 6, 5, 17, 12, 11, 17, 30, 14, 8, 9, 11, 2, 9, 17, 26, 6, 2, 11, 27, 2, 11, 21, 32, 2, 6, 5, 17, 12, 11, 23, 36, 2, 2, 21, 17, 8, 15, 17, 38
Offset: 1

Views

Author

John W. Layman, Oct 14 2010

Keywords

Comments

According to the reference, a(p*q) = a(p) + a(q) - 2 whenever p and q are distinct primes with p congruent to q modulo 4.
The sequences of indices n where a(n)=2 is {1, 2, 5, 10, 13, 17, 26, ...}, which appears to be A020893 (squarefree sums of two squares). This has been confirmed for the first 500 terms. [John W. Layman, May 16 2011]

Crossrefs

Cf. A020893.

Programs

Formula

a(n) = 3*A014817(n) - A000290(n). - Wesley Ivan Hurt, Jul 10 2014

A274044 Squarefree numbers that are the sum of two squares in more than one way.

Original entry on oeis.org

65, 85, 130, 145, 170, 185, 205, 221, 265, 290, 305, 365, 370, 377, 410, 442, 445, 481, 485, 493, 505, 530, 533, 545, 565, 610, 629, 685, 689, 697, 730, 745, 754, 785, 793, 865, 890, 901, 905, 949, 962, 965, 970, 985, 986, 1010, 1037, 1066, 1073, 1090, 1105, 1130, 1145
Offset: 1

Views

Author

Altug Alkan, Jun 07 2016

Keywords

Comments

Squarefree numbers that are the sum of two nonzero squares in more than one way.

Examples

			65 is a term because 65 = 5*13 = 1^2 + 8^2 = 4^2 + 7^2.
		

Crossrefs

Programs

  • PARI
    isA007692(n) = {nb = 0; lim = sqrtint(n); for (x=1, lim, if ((n-x^2 >= x^2) && issquare(n-x^2), nb++); ); nb >= 2; }
    lista(nn) = for(n=1, nn, if(isA007692(n) && issquarefree(n), print1(n, ", ")));

Formula

A005117 INTERSECT A007692. - R. J. Mathar, Feb 01 2017

A371010 Powerful numbers that are the sum of 2 squares.

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 32, 36, 49, 64, 72, 81, 100, 121, 125, 128, 144, 169, 196, 200, 225, 256, 288, 289, 324, 361, 392, 400, 441, 484, 500, 512, 529, 576, 625, 648, 676, 729, 784, 800, 841, 900, 961, 968, 1000, 1024, 1089, 1125, 1152, 1156, 1225, 1296, 1352, 1369
Offset: 1

Views

Author

Amiram Eldar, Mar 08 2024

Keywords

Comments

Each term can be decomposed in a unique way as 2^m * i * j^2 where m >= 2, i is a powerful number whose prime factors are all of the form 4*k + 1 (A369563), and j is a number whose prime factors are all of the form 4*k + 3 (A004614).

Crossrefs

Intersection of A001481 and A001694.
A371011 is a subsequence.

Programs

  • Mathematica
    Select[Range[1500], SquaresR[2, #] > 0 && (# == 1 || Min[FactorInteger[#][[;; , 2]]] > 1) &]
  • PARI
    is(n) = {my(f=factor(n)); for(i=1, #f~, if(f[i, 2] == 1 || (f[i, 2]%2 && f[i, 1]%4 == 3), return(0))); 1;}

Formula

The number of terms that do not exceed x is ~ c * sqrt(x), where c = (6/Pi^2) * (1 + 1/(3*(sqrt(2)-1))) * Product_{primes p == 1 (mod 4)} (1 + 1/((sqrt(p)-1)*(p+1))) * Product_{primes p == 3 (mod 4)} (1 + 1/(p^2-1)) = 1.58769... (Jakimczuk, 2024, Theorem 4.7, p. 50).
Sum_{n>=1} 1/a(n) = (3/2) * Product_{primes p == 1 (mod 4)} (1 + 1/(p*(p-1))) * Product_{primes p == 3 (mod 4)} (1 + 1/(p^2-1)) = (3*Pi^2/16) * A334424 = 1.86676402705119927669... .

A371011 Cubefull numbers that are the sum of 2 squares.

Original entry on oeis.org

1, 8, 16, 32, 64, 81, 125, 128, 256, 512, 625, 648, 729, 1000, 1024, 1296, 2000, 2048, 2197, 2401, 2592, 3125, 4000, 4096, 4913, 5000, 5184, 5832, 6561, 8000, 8192, 10000, 10125, 10368, 11664, 14641, 15625, 16000, 16384, 17576, 19208, 20000, 20736, 23328, 24389, 25000
Offset: 1

Views

Author

Amiram Eldar, Mar 08 2024

Keywords

Comments

For each term k, let p^e be the highest power of a prime p that divides k. Then e >= 4 is even for p == 3 (mod 4), or e >= 3 otherwise.

Crossrefs

Intersection of A001481 and A036966.
Subsequence of A371010.

Programs

  • Mathematica
    Select[Range[25000], SquaresR[2, #] > 0 && (# == 1 || Min[FactorInteger[#][[;; , 2]]] > 2) &]
  • PARI
    is(n) = {my(f=factor(n)); for(i=1, #f~, if(f[i, 2] < 3 || (f[i, 2]%2 && f[i, 1]%4 == 3), return(0))); 1;}

Formula

The number of terms that do not exceed x is ~ c * x^(1/3)/sqrt(log(x)), where c = (6/Pi^2) * sqrt(3) * (1 + 1/(3*(2^(1/3)-1))) * B * Product_{primes p == 1 (mod 4)} (1 + 1/((p^(1/3)-1)*(p+1))) * Product_{primes p == 3 (mod 4)} (1 + p^(1/3)/(p*(p^(2/3)-1))), where B is the Landau-Ramanujan constant (A064533) (Jakimczuk, 2024, Theorem 4.5, p. 47).
Sum_{n>=1} 1/a(n) = (5/4) * Product_{primes p == 1 (mod 4)} (1 + 1/(p^2*(p-1))) * Product_{primes p == 3 (mod 4)} (1 + 1/(p^2*(p^2-1))) = 1.281719491797642498... .
Showing 1-10 of 11 results. Next