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

A133388 Largest integer m such that n-m^2 is a square, or 0 if no such m exists.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 23 2007

Keywords

Comments

The sequence could be extended to a(0) = 0.
We could have defined a(n) = -1 instead of 0 if n is not sum of two squares, and then include unambiguously a(0) = 0. At present, a(n) = 0 <=> A000161(n) = 0.

Examples

			a(3) = 0 since 3 cannot be written as sum of 2 perfect squares;
a(5) = 2 since 5 = 2^2 + 1^2.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local t, d;
          for t from 0 do d:= n-t^2;
            if d<0 then break elif issqr(d) then return isqrt(d) fi
          od; 0
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, May 14 2015
  • Mathematica
    a[n_] := Module[{m, d, s}, For[m = 0, True, m++, d = n - m^2; If[d < 0, Break[], s = Sqrt[d]; If[IntegerQ[s], Return[s]]]]; 0];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, May 18 2018, after Alois P. Heinz *)
  • PARI
    sum2sqr(n)={ if(n>1, my(L=List(), f, p=1); for(i=1, matsize(f=factor(n))[1], if(f[i,1]%4==1, listput(L, [qfbsolve(Qfb(1,0,1), f[i,1])*[1, I]~, f[i,2]] ),/*elseif*/ f[i,1]==2, p = (1+I)^f[i,2],/*elseif*/ bittest(f[i,2],0), return([]),/*else*/ p *= f[i,1]^(f[i,2]\2))); L=apply(s->vector(s[2]+1, j, s[1]^(s[2]+1-j)*conj(s[1])^(j-1)), L); my(S=List()); forvec(T=vector(#L, i, [1,#L[i]]), listput(S, prod( j=1, #T, L[j][T[j]] ))); Set(apply(f->vecsort(abs([real(f), imag(f)])), Set(S)*p)), if(n<0, [], [[0, n]]))} \\ updated by M. F. Hasler, May 12 2018. (If PARI version 2.12.x returns an error, append [1] to qfbsolve(...) above. - M. F. Hasler, Dec 12 2019)
    apply( A133388=n->if(n=sum2sqr(n),vecmax(Mat(n~))), [1..50]) \\ This sequence: maximum
    
  • Python
    from sympy.solvers.diophantine.diophantine import diop_DN
    def A133388(n): return max((a for a, b in diop_DN(-1,n)),default=0) # Chai Wah Wu, Sep 08 2022

Formula

a(n) = max( sup { max(a,b) | a^2+b^2 = n ; a,b in Z }, 0 )
a(A022544(j))=0, j>0. - R. J. Mathar, Jun 17 2009
a(n^2) = a(n^2 + 1) = n, for all n. Conversely, whenever a(n) = a(n+1), then n = k^2. - M. F. Hasler, Sep 02 2018

A018825 Numbers that are not the sum of 2 nonzero squares.

Original entry on oeis.org

1, 3, 4, 6, 7, 9, 11, 12, 14, 15, 16, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 62, 63, 64, 66, 67, 69, 70, 71, 75, 76, 77, 78, 79, 81, 83, 84, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 102, 103, 105, 107, 108, 110
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A022544, A081324, A000404 (complement), A004431.

Programs

  • Haskell
    import Data.List (elemIndices)
    a018825 n = a018825_list !! (n-1)
    a018825_list = tail $ elemIndices 0 a025426_list
    -- Reinhard Zumkeller, Aug 16 2011
    
  • Maple
    isA000404 := proc(n)
        local x,y ;
        for x from 1 do
            if x^2> n then
                return false;
            end if;
            for y from 1 do
                if x^2+y^2 > n then
                    break;
                elif x^2+y^2 = n then
                    return true;
                end if;
            end do:
        end do:
    end proc:
    A018825 := proc(n)
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if not isA000404(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A018825(n),n=1..30) ; # R. J. Mathar, Jul 28 2014
  • Mathematica
    q=13;q2=q^2+1;lst={};Do[Do[z=a^2+b^2;If[z<=q2,AppendTo[lst,z]],{b,a,1,-1}],{a,q}];lst; u=Union@lst;Complement[Range[q^2],u] (* Vladimir Joseph Stephan Orlovsky, May 30 2010 *)
  • PARI
    is(n)=my(f=factor(n), t=prod(i=1,#f~, if(f[i,1]%4==1, f[i,2]+1, if(f[i,2]%2 && f[i,1]>2, 0, 1)))); if(t!=1, return(!t)); for(k=sqrtint((n-1)\2)+1, sqrtint(n-1), if(issquare(n-k^2), return(0))); 1 \\ Charles R Greathouse IV, Sep 02 2015

Formula

A025426(a(n)) = 0; A063725(a(n)) = 0. - Reinhard Zumkeller, Aug 16 2011

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)

A118882 Numbers which are the sum of two squares in two or more different ways.

Original entry on oeis.org

25, 50, 65, 85, 100, 125, 130, 145, 169, 170, 185, 200, 205, 221, 225, 250, 260, 265, 289, 290, 305, 325, 338, 340, 365, 370, 377, 400, 410, 425, 442, 445, 450, 481, 485, 493, 500, 505, 520, 530, 533, 545, 565, 578, 580, 585, 610, 625, 629, 650, 676, 680
Offset: 1

Views

Author

Keywords

Comments

Numbers whose prime factorization includes at least two primes (not necessarily distinct) congruent to 1 mod 4 and any prime factor congruent to 3 mod 4 has even multiplicity. Products of two values in A004431.
Squares of distances that are the distance between two points in the square lattice in two or more nontrivially different ways. A quadrilateral with sides a,b,c,d has perpendicular diagonals iff a^2+c^2 = b^2+d^2. This sequence is the sums of the squares of opposite sides of such quadrilaterals, excluding kites (a=b,c=d), but including right triangles (the degenerate case d=0).

Examples

			50 = 7^2 + 1^2 = 5^2 + 5^2, so 50 is in the sequence.
		

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a118882 n = a118882_list !! (n-1)
    a118882_list = findIndices (> 1) a000161_list
    -- Reinhard Zumkeller, Aug 16 2011
    
  • Mathematica
    Select[Range[1000], Length[PowersRepresentations[#, 2, 2]] > 1&] (* Jean-François Alcover, Mar 02 2019 *)
  • Python
    from itertools import count, islice
    from math import prod
    from sympy import factorint
    def A118882_gen(startvalue=1): # generator of terms >= startvalue
        for n in count(max(startvalue,1)):
            f = factorint(n)
            if 1>1):
                yield n
    A118882_list = list(islice(A118882_gen(),30)) # Chai Wah Wu, Sep 09 2022

Formula

A000161(a(n)) > 1. [Reinhard Zumkeller, Aug 16 2011]

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

A248150 Numbers whose sum of divisors (A000203) is divisible by 4.

Original entry on oeis.org

3, 6, 7, 11, 12, 14, 15, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 38, 39, 42, 43, 44, 46, 47, 48, 51, 54, 55, 56, 57, 59, 60, 62, 63, 65, 66, 67, 69, 70, 71, 75, 76, 77, 78, 79, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 102, 103, 105, 107, 108, 110, 111, 112, 114, 115, 118
Offset: 1

Views

Author

M. F. Hasler, Oct 02 2014

Keywords

Comments

A subsequence of A028983 (even sum of divisors) which contains all numbers but the squares and twice the squares, so no term of this sequence is of that form, either.
Any number having at least two odd prime factors to an odd power is in this sequence, therefore it has asymptotic density 1. - M. F. Hasler, Apr 26 2017

Crossrefs

First differs from A022544 by including 65.

Programs

  • Mathematica
    Select[Range[200],Divisible[DivisorSigma[1,#],4]&] (* Harvey P. Dale, Feb 20 2015 *)
  • PARI
    for(n=1,999,sigma(n)%4||print1(n","))

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 01 2015

A103826 Unitary arithmetic numbers (those for which the arithmetic mean of the unitary divisors is an integer).

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 69, 70, 71, 73, 75, 76, 77, 78, 79, 81, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93
Offset: 1

Views

Author

Emeric Deutsch, Feb 17 2005

Keywords

Comments

The arithmetic means of the unitary arithmetic numbers are in A103827.
From Amiram Eldar, Mar 10 2023: (Start)
Union of the odd numbers (A005408) and twice the numbers that are not the sum of 2 squares (A022544).
The asymptotic density of this sequence is 1. (End)

Examples

			12 is a unitary arithmetic number because the unitary divisors of 12 are 1,3,4 and 12 and (1+3+4+12)/4=5 is an integer.
		

Crossrefs

Programs

  • Maple
    with(numtheory):unitdiv:=proc(n) local A, k: A:={}: for k from 1 to tau(n) do if gcd(divisors(n)[k], n/divisors(n)[k])=1 then A:=A union {divisors(n)[k]} else A:=A fi od end:utau:=n->nops(unitdiv(n)):usigma:=n->add(unitdiv(n)[j],j=1..nops(unitdiv(n))): p:=proc(n) if type(usigma(n)/utau(n),integer)=true then n else fi end:seq(p(n),n=1..103);
  • Mathematica
    udiQ[n_]:=IntegerQ[Mean[Select[Divisors[n],GCD[#,n/#]==1&]]]; Select[ Range[ 100],udiQ] (* Harvey P. Dale, May 20 2012 *)
    Select[Range[100], IntegerQ[Times @@ ((1 + Power @@@ FactorInteger[#])/2)] &] (* Amiram Eldar, Jun 14 2022 *)
  • PARI
    is(n)=my(f=factor(n)); prod(i=1,#f~, f[i,1]^f[i,2]+1)%2^#f~==0 \\ Charles R Greathouse IV, Sep 01 2015

A125022 Numbers with a unique partition as the sum of 2 squares x^2 + y^2.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 10, 13, 16, 17, 18, 20, 26, 29, 32, 34, 36, 37, 40, 41, 45, 49, 52, 53, 58, 61, 64, 68, 72, 73, 74, 80, 81, 82, 89, 90, 97, 98, 101, 104, 106, 109, 113, 116, 117, 121, 122, 128, 136, 137, 144, 146, 148, 149, 153, 157, 160, 162, 164, 173, 178, 180, 181
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Comments

A000161(a(n)) = 1. [Reinhard Zumkeller, Aug 16 2011]

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a125022 n = a125022_list !! (n-1)
    a125022_list = elemIndices 1 a000161_list
    -- Reinhard Zumkeller, Aug 16 2011
  • Mathematica
    Select[Range[0,200],Length@PowersRepresentations[#,2,2]==1&] (* Giorgos Kalogeropoulos, Mar 21 2021 *)

Formula

a(n) = A125021(n)/2.

Extensions

Name edited by Giorgos Kalogeropoulos, Mar 21 2021

A084109 n is congruent to 1 (mod 4) and is not the sum of two squares.

Original entry on oeis.org

21, 33, 57, 69, 77, 93, 105, 129, 133, 141, 161, 165, 177, 189, 201, 209, 213, 217, 237, 249, 253, 273, 285, 297, 301, 309, 321, 329, 341, 345, 357, 381, 385, 393, 413, 417, 429, 437, 453, 465, 469, 473, 489, 497
Offset: 1

Views

Author

William P. Orrick, Jun 18 2003

Keywords

Comments

Alternatively, n is congruent to 1 (mod 4) with at least 2 distinct prime factors congruent to 3 (mod 4) in the squarefree part of n. - Comment corrected by Jean-Christophe Hervé, Oct 25 2015
Applications to the theory of optimal weighing designs and maximal determinants: An (n+1) X (n+1) conference matrix is impossible.
The upper bound of Ehlich/Wojtas on the determinant of a (0,1) matrix of order congruent to 1 (mod 4) cannot be achieved for n X n matrices.
The bound of Ehlich/Wojtas on the determinant of a (-1,1) matrix of order congruent to 2 (mod 4) cannot be achieved for (n+1) X (n+1) matrices.
Numbers with only odd prime factors, of which a strictly positive even number are raised to an odd power and congruent to 3 (mod 4). - Jean-Christophe Hervé, Oct 24 2015

Examples

			a(1) = 3*7 = 21, a(2) = 3*11 = 33, a(3) = 3*19 = 57, a(14) = 3^3*7 = 189.
		

References

  • F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes, Elsevier-North Holland, 1978, p. 56.

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all entries <= N
    S:= {seq(i,i=1..N,4)} minus
       {seq(seq(i^2+j^2, j=1..floor(sqrt(N-i^2)),2),i=0..floor(sqrt(N)),2)}:
    sort(convert(S,list)); # Robert Israel, Oct 25 2015
  • Mathematica
    a[m_] := Complement[Range[1, m, 4], Union[Flatten[Table[j^2+k^2, {j, 1, Sqrt[m], 2}, {k, 0, Sqrt[m], 2}]]]]
  • PARI
    is(n)=if(n%4!=1, return(0)); my(f=factor(n)); for(i=1, #f~, if(f[i, 1]%4==3 && f[i, 2]%2, return(1))); 0 \\ Charles R Greathouse IV, Jul 01 2016

A203850 G.f.: Product_{n>=1} (1 - Lucas(n)*x^n + (-x^2)^n) / (1 + Lucas(n)*x^n + (-x^2)^n) where Lucas(n) = A000204(n).

Original entry on oeis.org

1, -2, -4, 0, 14, 16, 0, 0, 4, -152, -188, 0, 0, -44, 0, 0, 4414, 5456, -4, 0, 1288, 0, 0, 0, 0, -335406, -414728, 0, 0, -97904, 0, 0, 4, 0, -8828, 0, 66770564, 82532956, 0, 0, 19483388, -304, 0, 0, 0, 1756816, 0, 0, 0, -34787592002, -42999828492, 0, 60508, -10150882544, 0, 0, 0, 0, -915304508, 0, 0, 796
Offset: 0

Views

Author

Paul D. Hanna, Jan 07 2012

Keywords

Comments

Compare to: Product_{n>=1} (1-q^n)/(1+q^n) = 1 + 2*Sum_{n>=1} (-1)^n*q^(n^2), the Jacobi theta_4 function, which has the g.f: exp( Sum_{n>=1} -(sigma(2*n)-sigma(n)) * q^n/n ).

Examples

			G.f.: A(x) = 1 - 2*x - 4*x^2 + 14*x^4 + 16*x^5 + 4*x^8 - 152*x^9 - 188*x^10 +...
-log(A(x)) = 2*x + 4*3*x^2/2 + 8*4*x^3/3 + 8*7*x^4/4 + 12*11*x^5/5 + 16*18*x^6/6 +...+ (sigma(2*n)-sigma(n))*Lucas(n)*x^n/n +...
Compare to the logarithm of Jacobi theta4 H(x) = 1 + 2*Sum_{n>=1} (-1)^n*x^(n^2):
-log(H(x)) = 2*x + 4*x^2/2 + 8*x^3/3 + 8*x^4/4 + 12*x^5/5 + 16*x^6/6 + 16*x^7/7 +...+ (sigma(2*n)-sigma(n))*x^n/n +...
The g.f. equals the product:
A(x) = (1-x-x^2)/(1+x-x^2) * (1-3*x^2+x^4)/(1+3*x^2+x^4) * (1-4*x^3-x^6)/(1+4*x^3-x^6) * (1-7*x^4+x^8)/(1+7*x^4+x^8) * (1-11*x^5-x^10)/(1+11*x^5-x^10) *...* (1 - Lucas(n)*x^n + (-x^2)^n)/(1 + Lucas(n)*x^n + (-x^2)^n) *...
Positions of zeros form A022544:
[3,6,7,11,12,14,15,19,21,22,23,24,27,28,30,31,33,35,38,39,42,43,44,...]
which are numbers that are not the sum of 2 squares.
		

Crossrefs

Programs

  • PARI
    /* Subroutine used in PARI programs below: */
    {Lucas(n)=fibonacci(n-1)+fibonacci(n+1)}
    
  • PARI
    {a(n)=polcoeff(prod(m=1, n, 1 - Lucas(m)*x^m + (-1)^m*x^(2*m) +x*O(x^n))/prod(m=1, n, 1 + Lucas(m)*x^m + (-1)^m*x^(2*m) +x*O(x^n)), n)}
    
  • PARI
    {a(n)=polcoeff(prod(m=1, n\2+1, (1 - Lucas(2*m-1)*x^(2*m-1) - x^(4*m-2))^2*(1 - Lucas(2*m)*x^(2*m) + x^(4*m) +x*O(x^n))), n)}
    
  • PARI
    {a(n)=polcoeff(exp(sum(k=1, n,-(sigma(2*k)-sigma(k))*Lucas(k)*x^k/k)+x*O(x^n)), n)}

Formula

a(n) = 0 iff n is not the sum of 2 squares (A022544).
G.f.: Product_{n>=1} (1 - Lucas(2*n-1)*x^(2*n-1) - x^(4*n-2))^2 * (1 - Lucas(2*n)*x^(2*n) + x^(4*n)).
G.f.: exp( Sum_{n>=1} -(sigma(2*n)-sigma(n)) * Lucas(n) * x^n/n ) where Lucas(n) = A000204(n).
Previous Showing 11-20 of 59 results. Next