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.

A271724 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(x+2*y+3*z) a square, where w,x,y,z are nonnegative integers with x > 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 13 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 7, 15, 47, 151, 4^k*q (k = 0,1,2,... and q = 1, 23, 71).
(ii) For positive integers a,b,c with gcd(a,b,c) squarefree, any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and w*(a*x+b*y+c*z) a square, if and only if {a,b,c} is among {1,2,3}, {1,3,6}, {1,6,9}, {5,6,9}, {18,30,114}.
(iii) For each quadruple (a,b,c,d) = (1,1,2,12), (1,2,7,60), (1,3,9,48), (1,4,11,48), (1,5,8,24), (1,8,11,24), (2,6,8,15), (3,5,6,24), (3,6,15,40), (3,6,18,40), (3,12,15,20), (4,4,8,15), (4,8,12,21), (4,8,12,45), (4,8,20,15), (4,8,36,45), (5,10,15,24), (6,9,15,20), (7,14,28,60), (7,21,28,60), (7,21,42,60), (12,36,48,55), (14,21,28,60), (3,9,18,112), (3,21,33,80), (4,5,9,120), (4,12,16,105), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that (a*x+b*y+c*z)^2 + (d*w)^2 is a square.
See also A271510, A271513, A271518, A271644, A271665, A271714 and A271721 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 1 > 0 and 0*(1+2*0+3*0) = 0^2.
a(3) = 2 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1*(1+2*0+3*1) = 2^2, and 3 = 0^2 + 1^2 + 1^2 + 1^2 with 0*(1+2*1+3*1) = 0^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1*(1+2*1+3*2) = 3^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 2*(3+2*1+3*1) = 4^2.
a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with 1*(3+2*2+3*3) = 4^2.
a(31) = 2 since 31 = 2^2 + 1^2 + 1^2 + 5^2 with 2*(1+2*1+3*5) = 6^2, and also 31 = 2^2 + 3^2 + 3^2 + 3^2 with 2*(3+2*3+3*3) = 6^2.
a(47) = 1 since 47 = 1^2 + 1^2 + 3^2 + 6^2 with 1*(1+2*3+3*6) = 5^2.
a(71) = 1 since 71 = 1^2 + 6^2 + 5^2 + 3^2 with 1*(6+2*5+3*3) = 5^2.
a(151) = 1 since 151 = 9^2 + 6^2 + 5^2 + 3^2 with 9*(6+2*5+3*3) = 15^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[Sqrt[n-x^2-y^2-z^2](x+2y+3z)],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Label[aa];Continue,{n,1,80}]

A271775 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 (x >= y >= z <= w) with x - y a square, where w,x,y,z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 13 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 47, 2^{4k+3}*m (k = 0,1,2,... and m = 1, 3, 7, 15, 79).
(ii) Let a and b be positive integers with a <= b and gcd(a,b) squarefree. Then any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x-b*y a square, if and only if (a,b) is among the ordered pairs (1,1), (2,1), (2,2), (4,3), (6,2). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iii) Let a and b be positive integers with gcd(a,b) squarefree. Then any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x+b*y a square, if and only if {a,b} is among {1,2}, {1,3} and {1,24}. Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iv) Let a,b,c be positive integers with a <= b and gcd(a,b,c) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,1), (1,3,3), (1,4,4), (1,5,1), (1,6,6), (1,8,6), (1,12,4), (1,16,1), (1,17,1), (1,18,1), (2,2,2), (2,2,4), (2,3,2), (2,3,3), (2,4,1), (2,4,2), (2,6,1), (2,6,2), (2,6,6), (2,7,4), (2,7,7), (2,8,2), (2,9,2), (2,32,2), (3,3,3), (3,4,2), (3,4,3), (3,8,3), (4,5,4), (4,8,3), (4,9,4), (4,14,14), (5,8,5), (6,8,6), (6,10,8), (7,9,7), (7,18,7), (7,18,12), (8,9,8), (8,14,14), (8,18,8), (14,32,14), (16,18,16), (30,32,30), (31,32,31), (48,49,48), (48,121,48). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(v) Let a,b,c be positive integers with b <= c and gcd(a,b,c) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x-b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (2,1,1), (2,1,2), (3,1,2) and (4,1,2).
(vi) Let a,b,c,d be positive integers with a <= b, c <= d and gcd(a,b,c,d) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y-(c*z+d*w) a square, if and only if (a,b,c,d) is among the quadruples (1,2,1,1), (1,2,1,2), (1,3,1,2), (1,4,1,3), (2,4,1,2), (2,4,2,4), (8,16,7,8), (9,11,2,9) and (9,16,2,7).
(vii) Let a,b,c,d be positive integers with a <= b <= c and gcd(a,b,c,d) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x+b*y+c*z-d*w a square, if and only if (a,b,c,d) is among the quadruples (1,1,2,1), (1,2,3,1), (1,2,3,3), (1,2,4,2), (1,2,4,4), (1,2,5,5), (1,2,6,2), (1,2,8,1), (2,2,4,4), (2,4,6,4), (2,4,6,6), and (2,4,8,2).
It is known that any natural number not of the form 4^k*(16*m+14) (k,m = 0,1,2,...) can be written as x^2 + y^2 + 2*z^2 = x^2 + y^2 + z^2 + z^2 with x,y,z nonnegative integers.
See also A271510, A271513, A271518, A271644, A271665, A271714, A271721 and A271724 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 = 1 > 0 < 1 and 1 - 1 = 0^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 = 1 < 2 and 1 - 1 = 0^2.
a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 = 2 > 0 = 0 and 2 - 2 = 0^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1 = 1 > 0 < 3 and 1 - 1 = 0^2.
a(24) = 1 since 24 = 2^2 + 2^2 + 0^2 + 4^2 with 2 = 2 > 0 < 4 and 2 - 2 = 0^2.
a(47) = 1 since 47 = 3^2 + 3^2 + 2^2 + 5^2 with 3 = 3 > 2 < 5 and 3 - 3 = 0^2.
a(53) = 2 since 53 = 3^2 + 2^2 + 2^2 + 6^2 with 3 > 2 = 2 < 6 and 3 - 2 = 1^2, and also 53 = 6^2 + 2^2 + 2^2 + 3^2 with 6 > 2 = 2 < 3 and 6 - 2 = 2^2.
a(56) = 1 since 56 = 6^2 + 2^2 + 0^2 + 4^2 with 6 > 2 > 0 < 4 and 6 - 2 = 2^2.
a(120) = 1 since 120 = 8^2 + 4^2 + 2^2 + 6^2 with 8 > 4 > 2 < 6 and 8 - 4 = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 > 12 > 6 < 14 and 16 - 12 = 2^2.
		

References

  • L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939, pp. 112-113.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[x-y]&&SQ[n-x^2-y^2-z^2],r=r+1],{z,0,Sqrt[n/4]},{y,z,Sqrt[(n-z^2)/2]},{x,y,Sqrt[(n-y^2-z^2)]}];Print[n," ",r];Continue,{n,0,70}]

A271721 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= z >= 0, x > 0 and w >= z such that (x-y)*(w-z) is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 12 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 5, 11, 15, 23, 35, 95, 4^k*190 (k = 0,1,2,...).
(ii) For each k = 4, 5, 6, 7, 8, 11, 12, 13, 15, 17, 18, 20, 22, 25, 27, 29, 33, 37, 38, 41, 50, 61, any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that (x-y)*(w-k*z) is a square.
(iii) For each triple (a,b,c) = (3,1,1), (1,2,1), (2,2,1), (3,2,1), (2,2,2), (6,2,1), (1,3,1), (3,3,1), (15,3,1), (1,4,1), (2,4,1), (1,5,1), (3,5,1), (5,5,1), (1,5,2), (1,6,1), (2,6,1), (3,6,1), (15,6,1), (1,7,1), (5,7,1), (1,8,1), (1,8,5), (3,9,1), (1,10,1), (1,12,1), (1,13,1), (3,13,1), (1,14,1), (1,15,1), (1,15,2), (6,16,1), (2,18,1), (3,18,1), (1,20,2), (1,21,1), (3,21,1), (1,23,1), (1,24,1), (1,27,1), (3,27,1), (1,34,1), (1,45,1), (3,45,1), (3,48,1), (1,55,1), (1,60,1), (5,60,1), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*(x+b*y)*(w-c*z) is a square.
This is stronger than Lagrange's four-square theorem. Note that for k = 2 or 3, any natural number n can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and (x-y)*(w-k*z) = 0, for, if n cannot be represented by x^2 + y^2 + 2*z^2 then it has the form 4^k*(16*m+14) (k,m = 0,1,2,...) and hence it can be represented by x^2 + y^2 + (k^2+1)*z^2. It is known that natural numbers not represented by x^2 + y^2 + 5*z^2 have the form 4^k*(8*m+3), and that positive even numbers not represented by x^2 + y^2 + 10*z^2 have the form 4^k*(16*m+6) (as conjectured by S. Ramanujan and proved by L. E. Dickson).
See also A271510, A271513, A271518, A271644, A271714 and A271724 for other conjectures refining Lagrange's theorem.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 0^2 with 1 = 1 > 0 = 0 and (1-1)*(0-0) = 0^2.
a(5) = 1 since 5 = 2^2 + 1^2 + 0^2 + 0^2 with 2 > 1 > 0 = 0 and (2-1)*(0-0) = 0^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1 = 1 > 0 < 3 and (1-1)*(3-0) = 0^2.
a(14) = 2 since 14 = 3^2 + 1^2 + 0^2 + 2^2 with 3 > 1 > 0 < 2 and (3-1)*(2-0) = 2^2, and also 14 = 3^2 + 2^2 + 0^2 + 1^2 with 3 > 2 > 0 < 1 and (3-2)*(1-0) = 1^2.
a(15) = 1 since 15 = 3^2 + 2^2 + 1^2 + 1^2 with 3 > 2 > 1 = 1 and (3-2)*(1-1) = 0^2.
a(23) = 1 since 23 = 3^2 + 3^2 + 1^2 + 2^2 with 3 = 3 > 1 < 2 and (3-3)*(2-1) = 0^2.
a(35) = 1 since 35 = 3^2 + 3^2 + 1^2 + 4^2 with 3 = 3 > 1 < 4 and (3-3)*(4-1) = 0^2.
a(95) = 1 since 95 = 5^2 + 5^2 + 3^2 + 6^2 with 5 = 5 > 3 < 6 and (5-5)*(6-3) = 0^2.
a(190) = 1 since 190 = 13^2 + 4^2 + 1^2 + 2^2 with 13 > 4 > 1 < 2 and (13-4)*(2-1) = 3^2.
		

References

  • L. E. Dickson, Integers represented by positive ternary quadratic forms, Bull. Amer. Math. Soc. 33(1927), 63-70.
  • L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939, pp. 112-113.

Crossrefs

Programs

  • Mathematica
      SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&SQ[(Sqrt[n-x^2-y^2-z^2]-z)*(x-y)],r=r+1],{z,0,Sqrt[n/4]},{y,z,Sqrt[(n-z^2)/2]},{x,Max[1,y],Sqrt[(n-y^2-2z^2)]}];Print[n," ",r];Continue,{n,1,100}]

A259915 Least positive integer k such that phi(k) and sigma(k*n) are both squares, where phi(.) is Euler's totient function and sigma(m) is the sum of all positive divisors of m.

Original entry on oeis.org

1, 85, 1, 273, 34, 85, 10, 364, 250, 17, 2, 2223, 204, 5, 34, 546, 10, 60, 680, 60, 10, 1, 5, 364, 48, 34, 40, 451, 136, 17, 10, 273, 2, 5, 2, 5089, 10570, 1020, 451, 10, 60, 5, 1970, 114, 114, 17, 2, 4446, 185, 8, 10, 17, 5, 546, 17, 285, 63, 204, 8, 540, 816, 5, 57, 147744, 2761, 1, 505, 451, 5, 1
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 08 2015

Keywords

Comments

Conjecture: a(n) exists for any n > 0. In general, every positive rational number r can be written as m/n, where m and n are positive integers with phi(m) and sigma(n) both squares of integers.
For example, 4/5 = 136/170 with phi(136) = 8^2 and sigma(170) = 18^2, and 5/4 = 1365/1092 with phi(1365) = 24^2 and sigma(1092) = 56^2.

Examples

			a(2) = 85 since phi(85) = 64 = 8^2 and sigma(85*2) = 324 = 18^2.
a(673) = 3451030792 since phi(3451030792) = 1564993600 = 39560^2 and sigma(3451030792*673) = sigma(2322543723016) = 4768807737600 = 2183760^2.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    sigma[n_]:=DivisorSigma[1,n]
    Do[k=0;Label[aa];k=k+1;If[SQ[EulerPhi[k]]&&SQ[sigma[k*n]],Goto[bb],Goto[aa]];Label[bb];Print[n, " ", k];Continue,{n,1,70}]
    (* Second program: *)
    Table[k = 1; While[Times @@ Boole@ Map[IntegerQ@ Sqrt@ # &, {EulerPhi@ k, DivisorSigma[1, k n]}] < 1, k++]; k, {n, 70}] (* Michael De Vlieger, May 04 2017 *)
  • Perl
    use ntheory ":all"; for my $n (1..100) { my $k = 1; $k++ until is_power(euler_phi($k),2) && is_power(divisor_sum($k*$n),2); say "$n $k" } # Dana Jacobsen, May 04 2017

A259916 Least positive integer k such that sigma(k) and phi(k*n) are both squares, where sigma(k) is the sum of all positive divisors of k, and phi(.) is Euler's totient function.

Original entry on oeis.org

1, 1, 210, 3, 1, 170, 81, 1, 70, 1, 400, 1, 210, 81, 357, 3, 1, 119, 3, 3, 3, 651, 1990, 170, 66, 70, 210, 884, 3810, 357, 1066, 1, 217, 1, 81, 3, 1, 3, 70, 1, 22, 3, 1624, 217, 119, 3383, 11510, 1, 364, 22, 210, 81, 8743, 170, 510, 81, 1, 1270, 2902, 1, 385, 1155, 1, 3, 357, 217, 966, 3, 4179, 81
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 08 2015

Keywords

Comments

The conjecture in A259915 implies that a(n) exists for any n > 0.

Examples

			a(3) = 210 since sigma(210) = 576 =24^2 and phi(210*3) = 144 = 12^2.
a(719) = 42862647 since sigma(42862647) = 58003456 = 7616^2 and phi(42862627*719) = phi(30818243193) = 20210602896 = 142164^2.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    sigma[n_]:=DivisorSigma[1, n]
    Do[k=0; Label[aa]; k=k+1; If[SQ[sigma[k]]&&SQ[EulerPhi[k*n]], Goto[bb], Goto[aa]]; Label[bb]; Print[n, " ", k]; Continue, {n, 1, 70}]
    lpi[n_]:=Module[{k=1},While[!IntegerQ[Sqrt[DivisorSigma[1,k]]]|| !IntegerQ[ Sqrt[ EulerPhi[ n*k]]],k++];k]; Array[lpi,70] (* Harvey P. Dale, Jul 17 2020 *)

A255677 Least integer k > 1 such that pi(k)^2 + pi(k*n)^2 is a square, where pi(.) is the prime-counting function given by A000720.

Original entry on oeis.org

5, 30, 8458, 18, 252, 25, 1407, 476, 9098, 108, 1814, 1868, 153, 1005, 67, 26532, 1592, 200, 963, 99, 833, 1356, 3869, 981, 531, 127, 4961, 366, 1192, 1873, 41308, 409, 21756, 194664, 180, 27071, 7433, 160179, 2076, 544, 211, 10639, 19571, 33483, 603, 68380, 1517, 47529, 35923
Offset: 2

Views

Author

Zhi-Wei Sun, Jul 10 2015

Keywords

Comments

Conjecture: Each positive rational number r < 1 can be written as m/n with 1 < m < n such that pi(m)^2 + pi(n)^2 is a square. Also, any rational number r > 1 can be written as m/n with m > n > 1 such that pi(m)^2 - pi(n)^2 is a square.
For example, 23/24 = 19947716/20815008 with pi(19947716)^2 + pi(20815008)^2 = 1267497^2 + 1319004^2 = 1829295^2, and 7/3 = 26964/11556 with pi(26964)^2 - pi(11556)^2 = 2958^2 - 1392^2 = 2610^2.

Examples

			a(2) = 5 since pi(5)^2 + pi(5*2)^2 = 3^2 + 4^2 = 5^2.
a(3) = 30 since pi(30)^2 + pi(30*3)^2 = 10^2 + 24^2 = 26^2.
a(68) = 6260592 since pi(6260592)^2 + pi(6260592*68)^2 = 429505^2 + 22632876^2 = 22636951^2.
a(95) = 7955506 since pi(7955506)^2 + pi(7955506*95)^2 = 536984^2 + 38985687^2 = 38989385^2.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[k=1;Label[aa];k=k+1;If[SQ[PrimePi[k]^2+PrimePi[k*n]^2],Goto[bb],Goto[aa]];Label[bb];Print[n," ",k];Continue,{n,2,50}]
  • PARI
    a(n)={ k=2; while(!issquare(primepi(k)^2 + primepi(k*n)^2),k++); return(k);}
    main(size)={ v=vector(size); for(i=2, size+1, v[i-1]=a(i)); return(v);} /* Anders Hellström, Jul 11 2015 */
Showing 1-6 of 6 results.