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

A031396 Numbers k such that Pell equation x^2 - k*y^2 = -1 is soluble.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Terms are divisible neither by 4 nor by a prime of the form 4*k + 3 (although these conditions are not sufficient - compare A031398). - Lekraj Beedassy, Aug 17 2005
This is the set of integer solutions of all quadratic forms m^2*x^2 -/+ b*x + c with discriminant b^2 - 4*m^2*c = -4 where m is any term of A004613. - Klaus Purath, Jun 18 2025

References

  • Harvey Cohn, "Advanced Number Theory".

Crossrefs

Equals {1} U A003814.
Cf. A031398, A002313, A133204, A130226 (values of x).
See also A322781, A323271, A323272.

Programs

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

A020893 Squarefree sums of two squares; or squarefree numbers with no prime factors of the form 4k+3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Primitively but not imprimitively represented by x^2 + y^2.
The disjoint union of {1}, A003654, and A031398. - Max Alekseyev, Mar 09 2010
Squarefree members of A202057. - Artur Jasinski, Dec 10 2011
Union of A231754 and 2*A231754. Squarefree numbers whose prime factors are in A002313. - Robert Israel, Aug 23 2017
It appears that a(n) is the n-th index, k, such that f(k) = 2, where f(k) = 3*(Sum_{i=1..k} floor(i^2/k)) - k^2 (see A175908). - John W. Layman, May 16 2011

References

  • Srinivasa Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa Publishing House, New Delhi, 1988; see page 123.

Crossrefs

Programs

  • Haskell
    a020893 n = a020893_list !! (n-1)
    a020893_list = filter (\x -> any (== 1) $ map (a010052 . (x -)) $
                                 takeWhile (<= x) a000290_list) a005117_list
    -- Reinhard Zumkeller, May 28 2015
    
  • Maple
    N:= 1000: # to get all terms <= N
    R:= {1,2}:
    p:= 2:
    do
    p:= nextprime(p);
    if p > N then break fi;
    if p mod 4 <> 1 then next fi;
    R:= R union select(`<=`,map(`*`,R,p),N);
    od:
    sort(convert(R,list)); # Robert Israel, Aug 23 2017
  • Mathematica
    lim = 17; t = Join[{1}, Select[Union[Flatten[Table[x^2 + y^2, {x, lim}, {y, x}]]], # < lim^2 && SquareFreeQ[#] &]]
    Select[Union[Total/@Tuples[Range[0,20]^2,2]],SquareFreeQ] (* Harvey P. Dale, Jul 26 2017 *)
    Block[{nn = 350, p}, p = {1, 2}~Join~Select[Prime@ Range@ PrimePi@ nn, Mod[#, 4] == 1 &]; Select[Range@ nn, And[SquareFreeQ@ #, SubsetQ[p, FactorInteger[#][[All, 1]]]] &]] (* Michael De Vlieger, Aug 23 2017 *)
    (* or *)
    Select[Range[350], SquareFreeQ@ # && ! MemberQ[Mod[First /@ FactorInteger@ #, 4], 3] &] (* Giovanni Resta, Aug 25 2017 *)
  • PARI
    is(n)=my(f=factor(n)); for(i=1,#f~,if(f[i,2]>1 || f[i,1]%4==3, return(0))); 1 \\ Charles R Greathouse IV, Apr 20 2015
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A020893_gen(): # generator of terms
        return filter(lambda n:all(p & 3 != 3 and e == 1 for p, e in factorint(n).items()),count(1))
    A020893_list = list(islice(A020893_gen(),30)) # Chai Wah Wu, Jun 28 2022

Formula

a(n) ~ k*n*sqrt(log n), where k = 2.1524249... = A013661/A064533. - Charles R Greathouse IV, Apr 20 2015

Extensions

Edited by N. J. A. Sloane, Aug 30 2017

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

Original entry on oeis.org

4, 8, 16, 20, 25, 32, 34, 40, 52, 64, 68, 80, 100, 104, 116, 128, 136, 146, 148, 160, 164, 169, 178, 194, 200, 205, 208, 212, 221, 232, 244, 256, 260, 272, 289, 292, 296, 305, 320, 328, 340, 356, 377, 386, 388, 400, 404, 410, 416, 424, 436, 452
Offset: 1

Views

Author

Keywords

References

  • "Advanced Number Theory" by Harvey Cohn.

Crossrefs

A172001 Nonsquare positive integers n such that Pell equation y^2 - n*x^2 = -1 has rational solutions but the norm of fundamental unit of quadratic field Q(sqrt(n)) is 1.

Original entry on oeis.org

34, 136, 146, 178, 194, 205, 221, 305, 306, 377, 386, 410, 466, 482, 505, 514, 544, 545, 562, 584, 674, 689, 706, 712, 745, 776, 793, 802, 820, 850, 866, 884, 890, 898, 905, 1154, 1186, 1202, 1205, 1220, 1224, 1234, 1282, 1314, 1345, 1346, 1394, 1405, 1469
Offset: 1

Views

Author

Max Alekseyev, Jan 21 2010

Keywords

Comments

If the fundamental unit y0 + x0*sqrt(n) of Q(sqrt(n)) has norm -1, then (x0,y0) represents a rational solution to Pell equation y^2 - n*x^2 = -1. For n in this sequence, rational solutions exist but not delivered by the fundamental unit.

Crossrefs

Set difference of A000415 and its subsequence A172000.
Set difference of A087643 and its subsequence A022544.
Squarefree terms form A031398.
Odd terms form A249052.

Formula

A positive integer n is in this sequence iff its squarefree core A007913(n) belongs to A031398.

Extensions

Edited by Max Alekseyev, Mar 09 2010

A249052 Odd numbers n without prime factors of the form 4k+3 such that x^2-n*y^2=-1 has no solutions.

Original entry on oeis.org

205, 221, 305, 377, 505, 545, 689, 725, 745, 793, 905, 1205, 1345, 1405, 1469, 1513, 1517, 1537, 1717, 1885, 1945, 1961, 2005, 2041, 2045, 2105, 2225, 2245, 2329, 2353, 2525, 2533, 2669, 2701, 2845, 2993, 3005, 3205, 3305, 3497, 3505, 3737, 3757, 3805, 3893, 3965, 4069, 4105, 4145, 4205, 4321, 4369
Offset: 1

Views

Author

Joerg Arndt, Apr 09 2008

Keywords

Comments

A positive odd integer n is in this sequence iff its squarefree core A007913(n) belongs to A031398. - Max Alekseyev, Jun 26 2022

Crossrefs

Odd terms of A172001.
Showing 1-6 of 6 results.