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 31-40 of 65 results. Next

A124983 Nonprime numbers == 1 (mod 4) with a unique partition as a sum of 2 squares x^2 + y^2.

Original entry on oeis.org

1, 9, 45, 49, 81, 117, 121, 153, 245, 261, 333, 361, 369, 405, 441, 477, 529, 549, 605, 637, 657, 729, 801, 833, 873, 909, 961, 981, 1017, 1053, 1089, 1233, 1341, 1377, 1413, 1421, 1557, 1573, 1629, 1737, 1773, 1805, 1813, 1849, 2009, 2057, 2061, 2097, 2169
Offset: 1

Views

Author

Artur Jasinski, Nov 16 2006

Keywords

Comments

Intersection of A124982 and A125018. - Michel Marcus, Nov 02 2013

Crossrefs

Programs

  • Mathematica
    Select[4 * Range[0, 500] + 1, !PrimeQ[#] && Length @ PowersRepresentations[#, 2, 2] == 1 &] (* Amiram Eldar, Mar 12 2020 *)
  • PARI
    isok(n)= {if (isprime(n) || (n % 4 != 1), return (0)); A000161(n) == 1;} \\ Michel Marcus, Nov 02 2013

Extensions

More terms from Michel Marcus, Nov 02 2013

A216284 Number of solutions to the equation x^4+y^4 = n with x >= y > 0.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

V. Raman, Sep 03 2012

Keywords

Examples

			From _Antti Karttunen_, Aug 28 2017: (Start)
For n = 2 there is one solution: 2 = 1^4 + 1^4, thus a(2) = 1.
For n = 17 there is one solution: 17 = 2^4 + 1^4, thus a(17) = 1.
For n = 635318657 we have two solutions: 635318657 = 158^4 + 59^4 = 134^4 + 133^4, thus a(635318657) = 2. Note that this is the first point where the sequence attains value greater than 1. See _Charles R Greathouse IV_'s Jan 12 2017 comment in A216280.
(End)
		

Crossrefs

Programs

Formula

a(n) <= A216280(n). - Antti Karttunen, Aug 28 2017

Extensions

Definition edited to match the given data and the second part of offset (635318657) explicitly added by Antti Karttunen, Aug 28 2017

A259285 Expansion of psi(x^2) * f(x, x^7) in powers of x where psi(), f(,) are Ramanujan theta functions.

Original entry on oeis.org

1, 1, 1, 1, 0, 0, 1, 2, 0, 1, 1, 0, 2, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 2, 1, 1, 2, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 1, 0, 2, 0, 1, 0, 1, 3, 0, 1, 0, 1, 3, 1, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 1, 1, 0, 2, 1, 0, 0, 3, 1, 0, 1, 0
Offset: 0

Views

Author

Michael Somos, Jun 23 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + x + x^2 + x^3 + x^6 + 2*x^7 + x^9 + x^10 + 2*x^12 + 2*x^13 + ...
G.f. = q^13 + q^29 + q^45 + q^61 + q^109 + 2*q^125 + q^157 + q^173 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^1, x^8] QPochhammer[ -x^2, x^8] QPochhammer[ -x^6, x^8] QPochhammer[ -x^7, x^8] QPochhammer[x^8]^2, {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[ (1 + x^(8 k - 1)) (1 + x^(8 k - 2)) (1 + x^(8 k - 6)) (1 + x^(8 k - 7)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
  • PARI
    {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 13); for(u = (s+3)\-8, (s-3)\8, if( issquare( m - (8*u + 3)^2, &x) && (x%8==2 || x%8==6), c++))); c};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, -1, 0, 0, 1, 0, -1, -1, 2, -1, -1, 0, 1, 0, 0, -1][k%16 + 1], 1 + x * O(x^n)), n))};

Formula

Number of solutions to 16*n + 13 = (8*u + 3)^2 + (8*v + 2)^2 where u,v in Z.
Euler transform of period 16 sequence [ 1, 0, 0, -1, 0, 1, 1, -2, 1, 1, 0, -1, 0, 0, 1, -2, ...].
a(9*n + 2) = A259287(n). a(9*n + 5) = a(9*n + 8) = 0.
-2 * a(n) = A134343(4*n + 3). a(n) = A000161(16*n + 13) = A025426(16*n + 13) = A025435(16*n + 13) = A025441(16*n + 13).

A259287 Expansion of psi(x^2) * f(x^3, x^5) in powers of x where psi(), f(, ) are Ramanujan theta functions.

Original entry on oeis.org

1, 0, 1, 1, 0, 2, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 0, 3, 0, 0, 1, 1, 1, 1, 0, 0, 0, 2, 0, 0, 2, 1, 2, 0, 0, 1, 2, 0, 1, 1, 0, 1, 3, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 2, 0, 0, 2, 2, 1, 1, 1, 0, 0, 1, 0, 1, 1, 2, 0, 2, 0, 2, 2, 0, 1, 0, 0, 2, 1, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Michael Somos, Jun 23 2015

Keywords

Comments

Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			G.f. = 1 + x^2 + x^3 + 2*x^5 + x^6 + x^7 + x^9 + x^11 + x^12 + x^14 + ...
G.f. = q^5 + q^37 + q^53 + 2*q^85 + q^101 + q^117 + q^149 + q^181 + q^197 + ...
		

Crossrefs

Programs

  • Mathematica
    a[ n_] := SeriesCoefficient[ QPochhammer[ -x^2, x^8] QPochhammer[ -x^3, x^8] QPochhammer[ -x^5, x^8] QPochhammer[ -x^6, x^8] QPochhammer[x^8]^2, {x, 0, n}];
    a[ n_] := SeriesCoefficient[ Product[(1 + x^(8 k - 2)) (1 + x^(8 k - 3)) (1 + x^(8 k - 5)) (1 + x^(8 k - 6)) (1 - x^(8 k))^2, {k, Ceiling[n/8]}], {x, 0, n}];
  • PARI
    {a(n) = my(m, s, x, c); if( n<0, 0, s = sqrtint(m = 16*n + 5); for(u = (s+1)\-8, (s-1)\8, if( issquare( m - (8*u + 1)^2, &x) && (x%8==2 || x%8==6), c++))); c};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( prod(k=1, n, (1 - x^k)^[ 2, 0, -1, -1, 1, -1, 0, 0, 2, 0, 0, -1, 1, -1, -1, 0][k%16 + 1], 1 + x * O(x^n)), n))};

Formula

Number of solutions to 16*n + 5 = (8*u + 1)^2 + (8*v + 2)^2 where u,v in Z.
Euler transform of period 16 sequence [ 0, 1, 1, -1, 1, 0, 0, -2, 0, 0, 1, -1, 1, 1, 0, -2, ...].
a(9*n + 1) = a(9*n + 4) = 0. a(9*n + 7) = A259285(n).
-2 * a(n) = A134343(4*n + 1). a(n) = A000161(16*n + 5) = A025426(16*n + 5) = A025435(16*n + 5) = A025441(16*n + 5).

A328803 The minimum value of j + k where j and k are positive integers with j^2 + k^2 = A001481(n).

Original entry on oeis.org

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

Views

Author

Peter Kagey, Oct 27 2019

Keywords

Examples

			For n = 14, A001481(14) = 25 = 0^2 + 5^2 = 3^2 + 4^2, so a(14) = min{0+5, 3+4} = 5.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # for terms where A001481(n)<=N
    for s from 0 to isqrt(N) do
       for i from 0 to s/2 do
          t:= i^2 + (s-i)^2;
          if t > N then break fi;
          if not assigned(R[t]) then R[t]:= s fi;
    od od:
    A1481:= sort(map(op, [indices(R)])):
    seq(R[i],i=A1481); # Robert Israel, Oct 28 2019
  • Python
    from itertools import count, islice
    from sympy.solvers.diophantine.diophantine import diop_DN
    from sympy import factorint
    def A328803_gen(): # generator of terms
        return map(lambda n: min((a+b for a, b in diop_DN(-1,n))), filter(lambda n:(lambda m:all(d&3!=3 or m[d]&1==0 for d in m))(factorint(n)), count(0)))
    A328803_list = list(islice(A328803_gen(),30)) # Chai Wah Wu, Sep 09 2022

A063665 Number of ways 1/n can be written as 1/x^2 + 1/y^2 with y >= x >= 1.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Henry Bottomley, Jul 25 2001

Keywords

Comments

Number of ordered pairs (x,y), with n = (x^2)(y^2)/(x^2 + y^2) and y >= x > 0. - Antti Karttunen, Nov 07 2018

Examples

			a(90)=1 since 1/90 = 1/10^2 + 1/30^2
a(98)=2 since 1/98 = 1/10^2 + 1/70^2 = 1/14^2 + 1/14^2.
a(14400) = 3 since 1/14400 = 1/130^2 + 1/312^2 = 1/136^2 + 1/255^2 = 1/150^2 + 1/200^2. - _Antti Karttunen_, Nov 07 2018
		

Crossrefs

Programs

  • PARI
    A063665(n) = { my(s=0); for(x=1,n,for(y=x,n,if((n*(x*x+y*y)) == (x*x*y*y), s++))); (s); }; \\ Antti Karttunen, Nov 07 2018
    
  • PARI
    A063665(n) = { my(s=0,y); for(x=sqrtint(n),n,my(x2=x*x); if((x2>n)&&issquare((n*x2)/(x2-n),&y)&&(1==denominator(y))&&(y>=x),s++)); (s); }; \\ Antti Karttunen, Nov 07 2018

Extensions

Definition clarified by Antti Karttunen, Nov 07 2018

A102548 Number of positive integers <= n that are expressible in the form u^2+v^2, with u and v integers.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 4, 5, 6, 7, 7, 7, 8, 8, 8, 9, 10, 11, 11, 12, 12, 12, 12, 12, 13, 14, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 19, 19, 19, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 24, 24, 25, 26, 26, 26, 26, 26, 27, 27, 27, 28, 28, 28, 29, 30, 30, 30, 31, 31, 31, 31, 32, 33, 34, 34
Offset: 1

Views

Author

Salvador Perez Gomez (pies314(AT)hotmail.com), Feb 24 2005

Keywords

Examples

			a(8) = 5 because 1 = 0^2 + 1^2, 2 = 1^2 + 1^2, 4 = 0^2 + 2^2, 5 = 1^2 + 2^2, 8 = 2^2 + 2^2, but 3,6 and 7 are not of the form u^2 + v^2, with u and v integers.
		

Crossrefs

Programs

  • Maple
    a := proc(n) local aux,i,m,u,v; aux:=0; for i from 1 to n do m:=floor(sqrt(i/2)); for u from 0 to m do v:=sqrt(i-u^2); if (v = floor(v)) then aux:=aux+1; u:=m; end if; end do; end do; aux; end proc:
  • Mathematica
    a[1]=1; a[n_]:= a[n]= a[n-1] + If[SquaresR[2, n]>0, 1, 0]; Table[a[n], {n,75}] (* Jean-François Alcover, Mar 31 2015 *)
  • PARI
    first(n)= my(v = vector(n + 1), res = vector(n)); res[1] = 1; for(i = 0, sqrtint(n), for(j = i, sqrtint(n - i^2), v[i^2+j^2+1] = 1 ) ); for(i = 2, #res, res[i] = res[i-1] + v[i+1]; ); res \\ David A. Corneth, Jun 05 2020
    
  • Python
    from itertools import count, accumulate, islice
    from sympy import factorint
    def A102548_gen(): # generator of terms
        return accumulate(int(all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(n).items())) for n in count(1))
    A102548_list = list(islice(A102548_gen(),30)) # Chai Wah Wu, Jun 28 2022

Formula

From David A. Corneth, Jun 05 2020: (Start)
A000161(a(n)) > 0.
a(n) = (partial sum of A229062 up to n) - 1. (End)
a(n) = n/sqrt(log n) * (K + B2/log n + O(1/log^2 n)), where K = A064533 and B2 = A227158. In particular, a(n) ~ Kn/sqrt(log n). - Charles R Greathouse IV, Dec 03 2022

Extensions

Name clarified by David A. Corneth, Jun 05 2020

A124134 Positive integers n such that Fibonacci(n) = a^2 + b^2, where a, b are integers.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 19, 21, 23, 25, 26, 27, 29, 31, 33, 35, 37, 38, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 62, 63, 65, 67, 69, 71, 73, 74, 75, 77, 79, 81, 83, 85, 86, 87, 89, 91, 93, 95, 97, 98, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 122, 123, 125, 127
Offset: 1

Views

Author

Melvin J. Knight (melknightdr(AT)verizon.net), Nov 30 2006

Keywords

Comments

All odd numbers are in this sequence, since the Fibonacci number with index 2m+1 is the sum of the squares of the two Fibonacci numbers with indices m and m+1. Those with even indices ultimately depend on certain Lucas numbers being the sum of two squares (see A124132). Joint work with Kevin O'Bryant and Dennis Eichhorn.
Numbers n such that Fibonacci(n) or Fibonacci(n)/2 is a square are only 0, 1, 2, 3, 6, 12. So a and b must be distinct and nonzero for all values of this sequence except 1, 2, 3, 6, 12. - Altug Alkan, May 04 2016

Examples

			14 is in the sequence because F_14=377=11^2+16^2.
16 is not in the sequence because F_16=987 is congruent to 3 (mod 4).
		

Crossrefs

Programs

  • Haskell
    a124134 n = a124134_list !! (n-1)
    a124134_list = filter ((> 0) . a000161 . a000045) [1..]
    -- Reinhard Zumkeller, Oct 10 2013
    
  • Mathematica
    Select[Range@ 128, SquaresR[2, Fibonacci@ #] > 0 &] (* Michael De Vlieger, May 04 2016 *)
  • PARI
    for(n=1, 10^6, t=fibonacci(n); s=sqrtint(t); forstep(i=s, 1, -1, if(issquare(t-i*i), print1(n, ", "); break))) \\ Ralf Stephan, Sep 15 2013
    
  • PARI
    is2s(n)={my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]%2 && f[i, 1]%4==3, return(0))); 1; } \\ see A001481
    for(n=1, 10^6, if(is2s(fibonacci(n)), print1(n, ", "))); \\ Joerg Arndt, Sep 15 2013
    
  • Python
    from itertools import count, islice
    from sympy import factorint, fibonacci
    def A124134_gen(): # generator of terms
        return filter(lambda n:n & 1 or all(p & 3 != 3 or e & 1 == 0 for p, e in factorint(fibonacci(n)).items()),count(1))
    A124134_list = list(islice(A124134_gen(),30)) # Chai Wah Wu, Jun 27 2022

Formula

Intersection of A000045 and A001481.
A000161(A000045(a(n))) > 0. - Reinhard Zumkeller, Oct 10 2013

Extensions

More terms from Ralf Stephan, Sep 15 2013

A133102 Number of partitions of n^3 into n distinct nonzero squares.

Original entry on oeis.org

1, 0, 0, 0, 0, 3, 5, 20, 56, 112, 268, 618, 1922, 8531, 29021, 100407, 321531, 899618, 2937312, 9295401, 31615059, 117365818, 403433963, 1417579281, 4848439367, 15960316056, 55180971700, 190251417034, 670818005444, 2429973932322
Offset: 1

Views

Author

Hugo Pfoertner, Sep 12 2007

Keywords

Examples

			a(6) = 3 because there are 3 ways to express 6^3 = 216 as a sum of 6 distinct nonzero squares: 216 = 1^2 + 2^2 + 4^2 + 5^2 + 7^2 + 11^2 = 1^2 + 3^2 + 5^2 + 6^2 + 8^2 + 9^2 = 3^2 + 4^2 + 5^2 + 6^2 + 7^2 + 9^2.
		

Crossrefs

Cf. A133103 (number of ways to express n^3 as a sum of n nonzero squares), A133105 (number of ways to express n^4 as a sum of n distinct nonzero squares).

Programs

  • PARI
    a(i, n, k)=local(s, j); if(k==1, if(issquare(n) && n
    				

Extensions

2 more terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007
More terms from Robert Gerbicz, May 09 2008

A133103 Number of partitions of n^3 into n nonzero squares.

Original entry on oeis.org

1, 1, 2, 1, 10, 34, 156, 734, 3599, 18956, 99893, 548373, 3078558, 17510598, 101960454, 599522778, 3565904170, 21438347021, 129905092421, 794292345434, 4890875249113, 30326545789640, 189195772457341, 1187032920371427
Offset: 1

Views

Author

Hugo Pfoertner, Sep 11 2007

Keywords

Examples

			a(2)=1 because the only way to express 2^3 = 8 as a sum of two squares is 8 = 2^2 + 2^2.
a(3)=2 because 3^3 = 27 = 1^2 + 1^2 + 5^2 = 3^2 + 3^2 + 3^2.
		

Crossrefs

Cf. A133102 (number of ways to express n^3 as a sum of n distinct nonzero squares), A133104 (number of ways to express n^4 as a sum of n nonzero squares).

Programs

  • PARI
    a(i, n, k)=local(s, j); if(k==1, if(issquare(n), return(1), return(0)), s=0; for(j=ceil(sqrt(n/k)), min(i, floor(sqrt(n-k+1))), s+=a(j, n-j^2, k-1)); return(s)) for(n=1,50, m=n^3; k=n; print1(a(m, m, k)", ") ) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007

Extensions

2 more terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Dec 16 2007
More terms from Robert Gerbicz, May 09 2008
Previous Showing 31-40 of 65 results. Next