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 21-30 of 55 results. Next

A034044 Numbers that are primitively but not imprimitively represented by x^2+y^2+z^2.

Original entry on oeis.org

1, 2, 3, 5, 6, 10, 11, 13, 14, 17, 19, 21, 22, 26, 29, 30, 33, 34, 35, 37, 38, 41, 42, 43, 46, 51, 53, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 73, 74, 77, 78, 82, 83, 85, 86, 89, 91, 93, 94, 97, 101, 102, 105, 106, 107, 109, 110, 113, 114, 115, 118, 122, 123
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

Union of A034043 and A034044 is A000378. Union of A034044 and A034045 is A034047. Numbers that are in A000378 and squarefree. - Ray Chandler, Sep 05 2004

A034046 Numbers that are both primitively and imprimitively represented by x^2+y^2+z^2.

Original entry on oeis.org

9, 18, 25, 27, 45, 49, 50, 54, 75, 81, 90, 98, 99, 117, 121, 125, 126, 147, 150, 153, 162, 169, 171, 189, 198, 225, 234, 242, 243, 245, 250, 261, 270, 275, 289, 294, 297, 306, 315, 325, 333, 338, 342, 350, 361, 363, 369, 378, 387, 405, 414, 425
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

Union of A034046 and A034047 is A000378. Intersection of A047449 and A034043 is A034046. Numbers that are in A000378 and neither squarefree nor congruent to 0 mod 4. - Ray Chandler, Sep 05 2004

A072400 (Factors of 4 removed from n) modulo 8.

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 1, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 2, 1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 3, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 1, 1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 5, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 16 2002

Keywords

Comments

a(n) <> 7 iff n equals the sum of 3 integer squares.
a(A004215(k)) = 7 for k>0;

Examples

			From _Michael De Vlieger_, May 08 2017: (Start)
a(4) = 1 since 4 = 1 * 4^1 and 4 / 4^1 = 1; 1 = 1 (mod 8).
a(5) = 5 since it is not a multiple of 4; 5 = 5 (mod 8).
a(12) = 3 since 12 = 3 * 4^1 and 12 / 4^1 = 3; 3 = 3 (mod 8).
a(44) = 3 since 44 = 11 * 4^1 and 44 / 4^1 = 11; 3 = 11 (mod 8).
a(64) = 1 since 64 = 1 * 4^3 and 64 / 4^3 = 1; 1 = 1 (mod 8). (End)
		

Crossrefs

Programs

  • Mathematica
    Array[Mod[If[Mod[#, 4] == 0, #/4^IntegerExponent[#, 4], #], 8] &, 96] (* Michael De Vlieger, May 08 2017 *)
  • PARI
    a(n) = (n >> (2*valuation(n, 4))) % 8; \\ Amiram Eldar, May 15 2025
  • Python
    def A072400(n): return (n>>((~n&n-1).bit_length()&-2))&7 # Chai Wah Wu, Aug 01 2023
    

Formula

a(n) = A065883(n) mod 8.
A072401(n) = 1 - A057427(7 - a(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, May 15 2025

Extensions

Offset corrected (from 0 to 1) by Antti Karttunen, May 08 2017

A125084 Cubes which have a partition as the sum of 3 squares.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 512, 729, 1000, 1331, 1728, 2197, 2744, 4096, 4913, 5832, 6859, 8000, 9261, 10648, 13824, 15625, 17576, 19683, 24389, 27000, 32768, 35937, 39304, 42875, 46656, 50653, 54872, 64000, 68921, 74088, 79507, 85184, 91125
Offset: 1

Views

Author

Artur Jasinski, Nov 20 2006, Nov 21 2006, Nov 22 2006

Keywords

Comments

If n is of the form 4^i*(8j+7) (where i>=0, j>=0) then n^3 is not in the sequence because n^3 is of the mentioned form so n^3 is in A004215 hence according to the definition n^3 is not in this sequence (see formula for A004215). Hence 7^3, 15^3, 23^3, 28^3, 31^3, 39^3, ... are not in the sequence. Is there a number n such that n^3 is not in the sequence but n is not of the form 4^i*(8j+7)? - Farideh Firoozbakht, Nov 23 2006
A number n^3 belongs to this sequence if and only if n is sum of three squares. Proof is immediate from Catalan's identity (x^2 + y^2 + z^2)^3 = x^2*(3*z^2 - x^2 - y^2)^2 + y^2*(3*z^2 - x^2 - y^2)^2 + z^2*(z^2 - 3*x^2 - 3*y^2)^2. - Artur Jasinski, Dec 09 2006
If n = a^2 + b^2 + c^2, then n^3 = (n*a)^2 + (n*b)^2 + (n*c)^2. Conversely, suppose there were an n such that n^3 is in A000378 but n is not. Then n must be of form 4^k*(8i+7). But n^3 would also be of the form 4^k*(8i+7) and thus n^3 would not be in A000378, contradicting the original assumption. This argument is easily extended to all odd powers, i.e., n^(2k+1) is in A000378 iff n is in A000378. - Ray Chandler, Feb 03 2009

Examples

			125 is in the sequence because
  125 = 5^3 = 0^2 + 2^2 + 11^2
            = 0^2 + 5^2 + 10^2
            = 3^2 + 4^2 + 10^2
            = 5^2 + 6^2 +  8^2.
   27 = 3^3 = 1^2 + 1^2 +  5^2, so  27 is a term.
  125 = 5^3 = 0^2 + 2^2 + 11^2, so 125 is a term.
  216 = 6^3 = 2^2 + 4^2 + 14^2, so 216 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 50]^3, SquaresR[3, # ] > 0 &] (* Ray Chandler, Nov 23 2006 *)
  • PARI
    isA125084(n)={ local(cnt,a,b) ; cnt=0 ; a=0; while(a^2<=n, b=0 ; while(b<=a && a^2+b^2<=n, if(issquare(n-a^2-b^2), return(1) ) ; b++ ; ) ; a++ ; ) ; return(0) ; } { for(n=1,300, if(isA125084(n^3), print1(n^3,", ") ; ) ; ) ; } \\ R. J. Mathar, Nov 23 2006

Formula

a(n) = A000378(n)^3.
Equals A000578 INTERSECT A000378.

Extensions

Corrected and extended by Farideh Firoozbakht, Ray Chandler and R. J. Mathar, Nov 23 2006

A294595 Numbers that are the sum of three squares (square 0 allowed) in exactly six ways.

Original entry on oeis.org

194, 209, 269, 281, 290, 297, 321, 326, 329, 342, 365, 386, 389, 401, 426, 434, 449, 459, 482, 485, 489, 497, 513, 531, 534, 542, 546, 554, 558, 561, 578, 601, 602, 633, 649, 659, 662, 665, 675, 678, 681, 693, 699, 705, 713, 714, 722, 737, 741, 747, 750, 754
Offset: 1

Views

Author

Robert Price, Nov 03 2017

Keywords

Comments

These are the numbers for which A000164(a(n)) = 6.
a(n) is the n-th largest number which has a representation as a sum of three integer squares (square 0 allowed), in exactly six ways, if neither the order of terms nor the signs of the numbers to be squared are taken into account. The multiplicity of a(n) with order and signs taken into account is A005875(a(n)).
This sequence is a proper subsequence of A000378.

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 1000], Length[PowersRepresentations[#, 3, 2]] == 6 &]

Extensions

Updated Mathematica program to Version 11. by Robert Price, Nov 01 2019

A004014 Norms of vectors in the b.c.c. lattice.

Original entry on oeis.org

0, 3, 4, 8, 11, 12, 16, 19, 20, 24, 27, 32, 35, 36, 40, 43, 44, 48, 51, 52, 56, 59, 64, 67, 68, 72, 75, 76, 80, 83, 84, 88, 91, 96, 99, 100, 104, 107, 108, 115, 116, 120, 123, 128, 131, 132, 136, 139, 140, 144, 147, 148, 152, 155, 160, 163, 164, 168
Offset: 0

Views

Author

Keywords

Comments

Integers such that A004013(n) is nonzero. - Michael Somos, Jul 28 2014
A subsequence of A047458. The complement seems to be 4*A004215. - Andrey Zabolotskiy, Nov 11 2021
From Mohammed Yaseen, Nov 06 2022: (Start)
These are numbers of the form x^2+y^2+z^2 where x, y and z are either all even (including zero) or all odd.
The selection rule for the planes with Miller indices (hkl) to undergo X-ray diffraction in an f.c.c. lattice is h^2+k^2+l^2 = N where N is a term of this sequence. See A000378 for simple cubic lattice. (End)

References

  • J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag, p. 116. (Chapter 4 section 6.7)
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Union of A034045 and A017101. - Mohammed Yaseen, Nov 06 2022

Programs

  • Maple
    f:= JacobiTheta2(0,z^4)^3+JacobiTheta3(0,z^4)^3:
    S:= series(f,z,1001):
    select(t -> coeff(S,z,t) <> 0, [$0..1000]); # Robert Israel, Oct 18 2015
  • Mathematica
    f = EllipticTheta[2, 0, z^4]^3 + EllipticTheta[3, 0, z^4]^3; S = f + O[z]^200; Flatten[Position[CoefficientList[S, z], ?Positive] - 1] (* _Jean-François Alcover, Oct 23 2016, after Robert Israel *)

Extensions

More terms from Sean A. Irvine, Oct 17 2015

A124978 Smallest positive number which has exactly n different partitions as a sum of 4 squares x^2+y^2+z^2+t^2.

Original entry on oeis.org

1, 4, 18, 34, 50, 66, 82, 114, 90, 130, 150, 178, 162, 198, 318, 210, 250, 234, 322, 406, 465, 330, 306, 402, 462, 390, 474, 378, 490, 486, 654, 610, 522, 450, 778, 678, 642, 570, 666, 726, 594, 714, 770, 774, 986, 630, 738, 945, 1035, 850, 1222, 978, 1014, 918
Offset: 1

Views

Author

Artur Jasinski, Nov 14 2006

Keywords

Comments

Is it known that a(n) always exists? - Franklin T. Adams-Watters, Dec 18 2006
A002635(a(n)) = n. - Reinhard Zumkeller, Jul 13 2014

Examples

			a(4)=34 because 34 is smallest number which has 4 partitions 34=4^2+3^2+3^2+0^2 = 4^2+4^2+1^2+1^2 = 5^2+2^2+2^2+1^2 = 5^2+3^2+0^2+0^2
a(3)=18 which has 3 partitions 18=0^2+0^2+3^2+3^2=0^2+1^2+1^2+4^2=1^2+2^2+2^2+3^2.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a124978 = (+ 1) . fromJust . (`elemIndex` (tail a002635_list))
    -- Reinhard Zumkeller, Jul 13 2014
  • Mathematica
    kmin[n_] := If[n<5, 1, 10n](* empirical, should be lowered in case of doubt *);
    a[n_] := a[n] = For[k=kmin[n], True, k++, If[Length[PowersRepresentations[ k, 4, 2]] == n, Return[k]]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 1000}] (* Jean-François Alcover, Mar 11 2019 *)
  • PARI
    cnt4sqr(n)={ local(cnt=0,t2) ; for(x=0,floor(sqrt(n)), for(y=x,floor(sqrt(n-x^2)), for(z=y,floor(n-x^2-y^2), t2=n-x^2-y^2-z^2 ; if( t2>=z^2 && issquare(n-x^2-y^2-z^2), cnt++ ; ) ; ) ; ) ; ) ; return(cnt) ; }
    A124978(n)= { local(a=1) ; while(1, if( cnt4sqr(a)==n, return(a) ; ) ; a++ ; ) ; }
    { for(n=1,100, print(n," ",A124978(n)) ; ) ; } \\ R. J. Mathar, Nov 29 2006
    

Extensions

Corrected and extended by R. J. Mathar, Nov 29 2006
More terms from Franklin T. Adams-Watters, Dec 18 2006

A166687 Numbers of the form x^2 + y^2 + 1, x, y integers.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 11, 14, 17, 18, 19, 21, 26, 27, 30, 33, 35, 37, 38, 41, 42, 46, 50, 51, 53, 54, 59, 62, 65, 66, 69, 73, 74, 75, 81, 82, 83, 86, 90, 91, 98, 99, 101, 102, 105, 107, 110, 114, 117, 118, 122, 123, 126, 129, 131, 137, 138, 145, 146, 147, 149, 150, 154, 158, 161
Offset: 1

Views

Author

N. J. A. Sloane, Mar 05 2010

Keywords

Comments

A001481 is the main entry for this sequence.
As Ng points out (Lemma 2.2), each prime divides some member of this sequence: 2 divides a(2) = 2, 3 divides a(3) = 3, 5 divides a(4) = 5, 7 divides a(9) = 14, etc. - Charles R Greathouse IV, Jan 04 2016

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    S:= {seq(seq(x^2+y^2+1,y=0..floor(sqrt(N-1-x^2))),x=0..floor(sqrt(N-1)))}:
    sort(convert(S,list)); # Robert Israel, Jan 05 2016
  • Mathematica
    Select[Range@ 162, Resolve[Exists[{x, y}, Reduce[# == x^2 + y^2 + 1, {x, y}, Integers]]] &] (* Michael De Vlieger, Jan 05 2016 *)
  • PARI
    is(n)=my(f=factor(n-1)); for(i=1, #f~, if(f[i,1]%4==3 && f[i,2]%2, return(0))); 1 \\ Charles R Greathouse IV, Jan 04 2016
    
  • PARI
    list(lim)=my(v=List(),t); lim\=1; for(m=0,sqrtint(lim-1), t=m^2+1; for(n=0, min(sqrtint(lim-t),m), listput(v,t+n^2))); Set(v) \\ Charles R Greathouse IV, Jan 05 2016

A261904 Largest x such that n can be written as n = x^2 + y^2 + z^2 with x >= y >= z >= 0, or -1 if no such x exists.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 08 2015

Keywords

Comments

a(n) = -1 iff n is in A004215, a(n) >= 0 iff n is in A000378.
Somehow maximizing x seems like the right thing to do (since it is natural to try a greedy algorithm first). If we minimize x we get A261915.

Examples

			Tabls showing initial values of n,x,y,z:
0 0 0 0
1 1 0 0
2 1 1 0
3 1 1 1
4 2 0 0
5 2 1 0
6 2 1 1
7 -1 -1 -1
8 2 2 0
9 3 0 0
10 3 1 0
11 3 1 1
12 2 2 2
13 3 2 0
14 3 2 1
15 -1 -1 -1
16 4 0 0
17 4 1 0
18 4 1 1
19 3 3 1
20 4 2 0
...
		

Crossrefs

Analogs for 4 squares: A178786 and A122921.

Extensions

More terms from David Consiglio, Jr., Sep 08 2015

A261915 Smallest x such that n can be written as n = x^2 + y^2 + z^2 with x >= y >= z >= 0, or -1 if no such x exists.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Sep 11 2015

Keywords

Comments

a(n) = -1 iff n is in A004215, a(n) >= 0 iff n is in A000378.
If we maximize x we get A261904.

Examples

			Table showing initial values of n,x,y,z:
   0  0  0  0
   1  1  0  0
   2  1  1  0
   3  1  1  1
   4  2  0  0
   5  2  1  0
   6  2  1  1
   7 -1 -1 -1
   8  2  2  0
   9  2  2  1
  10  3  1  0
  11  3  1  1
  12  2  2  2
  13  3  2  0
  14  3  2  1
  15 -1 -1 -1
  16  4  0  0
  17  3  2  2
  18  3  3  0
  19  3  3  1
  20  4  2  0
  ...
		

Crossrefs

Analogs for 4 squares: A178786 and A122921.

Extensions

a(17) corrected, more terms from David Consiglio, Jr., Sep 11 2015
Previous Showing 21-30 of 55 results. Next