Search: gaussian prime
|
|
A055025
|
|
Norms of Gaussian primes.
|
|
+40
38
|
|
|
2, 5, 9, 13, 17, 29, 37, 41, 49, 53, 61, 73, 89, 97, 101, 109, 113, 121, 137, 149, 157, 173, 181, 193, 197, 229, 233, 241, 257, 269, 277, 281, 293, 313, 317, 337, 349, 353, 361, 373, 389, 397, 401, 409, 421, 433, 449, 457, 461, 509, 521, 529, 541, 557, 569
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
This is the range of the norm a^2 + b^2 of Gaussian primes a + b i. A239621 lists for each norm value a(n) one of the Gaussian primes as a, b with a >= b >= 0. In A239397, any of these (a, b) is followed by (b, a), except for a = b = 1. - Wolfdieter Lang, Mar 24 2014, edited by M. F. Hasler, Mar 09 2018
The present sequence is related to the square lattice, and to its division in square sublattices. Let's say that an integer n divides a lattice if there exists a sublattice of index n. Example: 2, 4, 5 divide the square lattice. Then A001481 (norms of Gaussian integers) is the sequence of divisors of the square lattice. Say that n is a "prime divisor" if the index-n sublattice is not contained in any other sublattice except the original lattice itself. The present sequence gives the "prime divisors" of the square lattice.
Similarly, A055664 (Norms of Eisenstein-Jacobi primes) is the sequence of "prime divisors" of the hexagonal lattice. (End)
The sequence is formed of 2, the prime numbers of form 4k+1, and the square of other primes (of form 4k+3). These are the primitive elements of A001481. With 0 and 1, they are the numbers that are uniquely decomposable in the sum of two squares. - Jean-Christophe Hervé, Nov 17 2013
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems in Number Theory, A16.
L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
|
|
LINKS
|
|
|
FORMULA
|
Consists of 2; rational primes = 1 (mod 4) [A002144]; and squares of rational primes = 3 (mod 4) [A002145^2].
|
|
EXAMPLE
|
There are 8 Gaussian primes of norm 5, +-1+-2i and +-2+-i, but only two inequivalent ones (2+-i). In A239621 2+i is listed as 2, 1.
|
|
MATHEMATICA
|
Union[(#*Conjugate[#] & )[ Select[Flatten[Table[a + b*I, {a, 0, 23}, {b, 0, 23}]], PrimeQ[#, GaussianIntegers -> True] & ]]][[1 ;; 55]] (* Jean-François Alcover, Apr 08 2011 *)
(* Or, from formula: *) maxNorm = 569; s1 = Select[Range[1, maxNorm, 4], PrimeQ]; s3 = Select[Range[3, Sqrt[maxNorm], 4], PrimeQ]^2; Union[{2}, s1, s3] (* Jean-François Alcover, Dec 07 2012 *)
|
|
PROG
|
(PARI) list(lim)=my(v=List()); if(lim>=2, listput(v, 2)); forprime(p=3, sqrtint(lim\1), if(p%4==3, listput(v, p^2))); forprime(p=5, lim, if(p%4==1, listput(v, p))); Set(v) \\ Charles R Greathouse IV, Feb 06 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Larry Reeves (larryr(AT)acm.org), Oct 03 2000
|
|
STATUS
|
approved
|
|
|
|
|
A078458
|
|
Total number of factors in a factorization of n into Gaussian primes.
|
|
+40
15
|
|
|
0, 2, 1, 4, 2, 3, 1, 6, 2, 4, 1, 5, 2, 3, 3, 8, 2, 4, 1, 6, 2, 3, 1, 7, 4, 4, 3, 5, 2, 5, 1, 10, 2, 4, 3, 6, 2, 3, 3, 8, 2, 4, 1, 5, 4, 3, 1, 9, 2, 6, 3, 6, 2, 5, 3, 7, 2, 4, 1, 7, 2, 3, 3, 12, 4, 4, 1, 6, 2, 5, 1, 8, 2, 4, 5, 5, 2, 5, 1, 10, 4, 4, 1, 6, 4, 3, 3, 7, 2, 6, 3, 5, 2, 3, 3, 11, 2, 4, 3, 8, 2, 5, 1, 8
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(n)+1 is also the total number of factors in a factorization of n+n*i into Gaussian primes. - Jason Kimberley, Dec 17 2011
Record high values are at a(2^k) = 2*k, k=0,1,2.... - Bill McEachen, Oct 11 2022
|
|
LINKS
|
|
|
FORMULA
|
Fully additive with a(p)=2 if p=2 or p mod 4=1 and a(p)=1 if p mod 4=3. - Vladeta Jovovic, Jan 20 2003
|
|
EXAMPLE
|
2 = (1+i)*(1-i), so a(2) = 2; 9 = 3*3, so a(9) = 2.
a(1006655265000) = a(2^3*3^2*5^4*7^5*11^3) = 3*a(2)+2*a(3)+4*a(5)+5*a(7)+3*a(11) = 3*2+2*1+4*2+5*1+3*1 = 24. - Vladeta Jovovic, Jan 20 2003
|
|
MATHEMATICA
|
Join[{0}, Table[f = FactorInteger[n, GaussianIntegers -> True]; cnt = Total[Transpose[f][[2]]]; If[MemberQ[{-1, I, -I}, f[[1, 1]]], cnt--]; cnt, {n, 2, 100}]] (* T. D. Noe, Mar 31 2014 *)
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A103431
|
|
Subsequence of the Gaussian primes, where only Gaussian primes a+bi with a>0, b>=0 are listed. Ordered by the norm N(a+bi)=a^2+b^2 and the size of the real part, when the norms are equal. a(n) is the real part of the Gaussian prime. Sequence A103432 gives the imaginary parts.
|
|
+40
15
|
|
|
1, 1, 2, 3, 2, 3, 1, 4, 2, 5, 1, 6, 4, 5, 7, 2, 7, 5, 6, 3, 8, 5, 8, 4, 9, 1, 10, 3, 10, 7, 8, 11, 4, 11, 7, 10, 6, 11, 2, 13, 9, 10, 7, 12, 1, 14, 2, 15, 8, 13, 4, 15, 1, 16, 10, 13, 9, 14, 5, 16, 2, 17, 12, 13, 11, 14, 9, 16, 5, 18, 8, 17, 19, 7, 18, 10, 17, 6, 19, 1, 20, 3, 20, 14, 15, 12, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
Definition of Gaussian primes (Pieper, Die komplexen Zahlen, p. 122): 1) i+i, norm N(i+i) = 2. 2) Natural primes p with p = 3 mod 4, norm N(p) = p^2. 3) primes a+bi, a>0, b>0 with a^2 + b^2 = p = 1 mod 4, p natural prime. Norm N(a+bi) = p. b+ai is a different Gaussian prime number, b+ai cannot be factored into a+bi and a unit. 4) All complex numbers from 1) to 3) multiplied by the units -1,i,-i, these are the associated numbers. The sequence contains all the Gaussian primes mentioned in 1) - 3).
Every complex number can be factored completely into the Gaussian prime numbers defined by the sequence, an additional unit as factor can be necessary. This factorization can be used to calculate the complex sigma, as defined by Spira. The elements a(n) are ordered by the size of their norm. If the two different primes a+bi and b+ai have the same norm, they are ordered by the size of the real part of the complex prime number. So a+bi follows b+ai in the sequence, if a > b.
Of course this is not the only possible definition. As primes p = 1 mod 4 can be factored in p = (-i)(a+bi)(b+ai) and the norm N(a+bi) = N(b+ai) = p, these primes a+bi occur much earlier in the sequence than p does in the sequence of natural primes. 4+5i with norm 41 occurs before prime 7 with norm 49.
|
|
REFERENCES
|
H. Pieper, "Die komplexen Zahlen", Verlag Harri Deutsch, p. 122
|
|
LINKS
|
|
|
MAPLE
|
N:= 100: # to get all terms with norm <= N
p1:= select(isprime, [seq(i, i=3..N, 4)]):
p2:= select(isprime, [seq(i, i=1..N^2, 4)]):
p2:= map(t -> GaussInt:-GIfactors(t)[2][1][1], p2):
p3:= sort( [1+I, op(p1), op(p2)], (a, b) -> Re(a)^2 + Im(a)^2 < Re(b)^2 + Im(b)^2):
g:= proc(z)
local a, b;
a:= Re(z); b:= Im(z);
if b = 0 then z
else
a:= abs(a);
b:= abs(b);
if a = b then a
elif a < b then a, b
else b, a
fi
fi
end proc:
|
|
MATHEMATICA
|
maxNorm = 500;
norm[z_] := Re[z]^2 + Im[z]^2;
m = Sqrt[maxNorm] // Ceiling;
gp = Select[Table[a + b I, {a, 1, m}, {b, 0, m}] // Flatten, norm[#] <= maxNorm && PrimeQ[#, GaussianIntegers -> True]&];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Sven Simon, Feb 05 2005; corrected Feb 20 2005 and again on Aug 06 2006
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A055029
|
|
Number of inequivalent Gaussian primes of norm n.
|
|
+40
14
|
|
|
0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,6
|
|
COMMENTS
|
These are the primes in the ring of integers a+bi, a and b rational integers, i = sqrt(-1).
Two primes are considered equivalent if they differ by multiplication by a unit (+-1, +-i).
|
|
REFERENCES
|
R. K. Guy, Unsolved Problems in Number Theory, A16.
L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 2 if n is a prime = 1 (mod 4); a(n) = 1 if n is 2, or p^2 where p is a prime = 3 (mod 4); a(n) = 0 otherwise. - Franklin T. Adams-Watters, May 05 2006
|
|
EXAMPLE
|
There are 8 Gaussian primes of norm 5, +-1+-2i and +-2+-i, but only two inequivalent ones (2+-i).
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
a055029 2 = 1
a055029 n = 2 * a079260 n + a079261 (a037213 n)
(PARI) a(n)=if(isprime(n), if(n%4==1, 2, n==2), if(issquare(n, &n) && isprime(n) && n%4==3, 1, 0)) \\ Charles R Greathouse IV, Feb 07 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A086275
|
|
Number of distinct Gaussian primes in the factorization of n.
|
|
+40
12
|
|
|
0, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 2, 2, 2, 3, 1, 2, 2, 1, 3, 2, 2, 1, 2, 2, 3, 1, 2, 2, 4, 1, 1, 2, 3, 3, 2, 2, 2, 3, 3, 2, 3, 1, 2, 3, 2, 1, 2, 1, 3, 3, 3, 2, 2, 3, 2, 2, 3, 1, 4, 2, 2, 2, 1, 4, 3, 1, 3, 2, 4, 1, 2, 2, 3, 3, 2, 2, 4, 1, 3, 1, 3, 1, 3, 4, 2, 3, 2, 2, 4, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
As shown in the formula, a(n) depends on the number of distinct primes of the forms 4*k+1 (A005089) and 4*k-1 (A005091) and whether n is divisible by 2 (A059841).
Note that associated divisors are counted only once. - Jianing Song, Aug 30 2018
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
a(1006655265000) = a(2^3*3^2*5^4*7^5*11^3) = 1 + 2*1 + 3 = 6 because n is divisible by 2, has 1 prime factor of the form 4*k+1 and 3 primes of the form 4*k+3. Over the Gaussian integers, 1006655265000 is factored as i*(1 + i)^6*(2 + i)^4*(2 - i)^4*3^2*7^5*11^3, the 6 distinct Gaussian factors are 1 + i, 2 + i, 2 - i, 3, 7 and 11.
|
|
MATHEMATICA
|
Join[{0}, Table[f=FactorInteger[n, GaussianIntegers->True]; cnt=Length[f]; If[MemberQ[{-1, I, -I}, f[[1, 1]]], cnt-- ]; cnt, {n, 2, 100}]]
|
|
PROG
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A103432
|
|
Subsequence of the Gaussian primes, where only Gaussian primes a+bi with a>0, b>=0 are listed. Ordered by the norm N(a+bi)=a^2+b^2 and the size of the real part when the norms are equal. The sequence gives the imaginary parts. See A103431 for the real parts.
|
|
+40
11
|
|
|
1, 2, 1, 0, 3, 2, 4, 1, 5, 2, 6, 1, 5, 4, 0, 7, 2, 6, 5, 8, 3, 8, 5, 9, 4, 10, 1, 10, 3, 8, 7, 0, 11, 4, 10, 7, 11, 6, 13, 2, 10, 9, 12, 7, 14, 1, 15, 2, 13, 8, 15, 4, 16, 1, 13, 10, 14, 9, 16, 5, 17, 2, 13, 12, 14, 11, 16, 9, 18, 5, 17, 8, 0, 18, 7, 17, 10, 19, 6, 20, 1, 20, 3, 15, 14, 17
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MAPLE
|
N:= 100: # to get all terms with norm <= N
p1:= select(isprime, [seq(i, i=3..N, 4)]):
p2:= select(isprime, [seq(i, i=1..N^2, 4)]):
p2:= map(t -> GaussInt:-GIfactors(t)[2][1][1], p2):
p3:= sort( [1+I, op(p1), op(p2)], (a, b) -> Re(a)^2 + Im(a)^2 < Re(b)^2 + Im(b)^2):
h:= proc(z)
local a, b;
a:= Re(z); b:= Im(z);
if b = 0 then 0
else
a:= abs(a);
b:= abs(b);
if a = b then a
elif a < b then b, a
else a, b
fi
fi
end proc:
|
|
MATHEMATICA
|
maxNorm = 500;
norm[z_] := Re[z]^2 + Im[z]^2;
m = Sqrt[maxNorm] // Ceiling;
gp = Select[Table[a + b I, {a, 1, m}, {b, 0, m}] // Flatten, norm[#] <= maxNorm && PrimeQ[#, GaussianIntegers -> True]&];
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Sven Simon, Feb 05 2005; corrected Feb 20 2005 and again on Aug 06 2006
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A112633
|
|
Mersenne prime indices that are also Gaussian primes.
|
|
+40
11
|
|
|
3, 7, 19, 31, 107, 127, 607, 1279, 2203, 4423, 86243, 110503, 216091, 756839, 1257787, 20996011, 24036583, 25964951, 37156667
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Also, primes p (A000043) such that 2^p-1 is prime (A000668) and congruent to 7 mod 5!. - Artur Jasinski, Sep 30 2008. Proof that this is the same sequence, from Jeppe Stig Nielsen, Jan 02 2018: An odd index p>2 will be either 1 or 3 mod 4. If it is 1, then 2^p = 2^(4k+1) will be 2 mod 5, and be 0 mod 4, and be 2 mod 3. This completely determines 2^p (and hence 2^p - 1) mod 5!. The other case, when p is 3 mod 4, will make 2^p congruent to 3 mod 5, to 0 mod 4, and to 2 mod 3. This leads to the other (distinct) value of 2^p mod 5!.
|
|
LINKS
|
|
|
FORMULA
|
|
|
MATHEMATICA
|
p = {2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 43112609}; a = {}; Do[If[Mod[2^p[[n]] - 1, 5! ] == 7, AppendTo[a, p[[n]]]], {n, 1, Length[p]}]; a (* Artur Jasinski, Sep 30 2008 *)
Select[{2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, 521, 607, 1279, 2203, 2281, 3217, 4253, 4423, 9689, 9941, 11213, 19937, 21701, 23209, 44497, 86243, 110503, 132049, 216091, 756839, 859433, 1257787, 1398269, 2976221, 3021377, 6972593, 13466917, 20996011, 24036583, 25964951, 30402457, 32582657, 37156667, 43112609}, Mod[2^#-1, 120]==7&] (* Harvey P. Dale, Nov 26 2013 *)
|
|
PROG
|
(Python)
from itertools import count, islice
from sympy import isprime, prime
def A112633_gen(): # generator of terms
return filter(lambda p: p&2 and isprime((1<<p)-1), (prime(n) for n in count(2)))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A345436
|
|
Represent the ring of Gaussian integers E = {x+y*i: x, y rational integers, i = sqrt(-1)} by the cells of a square grid; number the cells of the grid along a counterclockwise square spiral, with the cells representing the ring identities 0, 1 numbered 0, 1. Sequence lists the index numbers of the cells which are 0 or a prime in E.
|
|
+40
9
|
|
|
0, 2, 4, 6, 8, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 51, 53, 59, 61, 67, 69, 75, 77, 81, 83, 87, 89, 91, 93, 97, 99, 101, 103, 107, 109, 111, 113, 117, 119, 121, 125, 127, 131, 133, 137, 139, 143, 145, 149, 151, 155, 157
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The cell with spiral index m represents the Gaussian integer A174344(m+1) + A274923(m+1) * i. So the set of Gaussian primes is {A174344(a(n)+1) + A274923(a(n)+1) * i : n >= 2}. - Peter Munn, Aug 02 2021
The Gaussian integer z = x+i*y has norm x^2+y^2. There are four units (of norm 1), +-1, +-i. The number of Gaussian integers of norm n is A004018(n).
The norms of the Gaussian primes are listed in A055025, and the number of primes with a given norm is given in A055026.
The successive norms of the Gaussian integers along the square spiral are listed in A336336.
|
|
REFERENCES
|
J. H. Conway and N. J. A. Sloane, "Sphere Packings, Lattices and Groups", Springer-Verlag; Table 4.2, p. 106.
L. W. Reid, The Elements of the Theory of Algebraic Numbers, MacMillan, NY, 1910, see Chap. V.
H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970; Theorem 8.22 on page 295 lists the nine UFDs of the form Q(sqrt(-d)), cf. A003173.
|
|
LINKS
|
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A078908
|
|
Let r+i*s be the sum, with multiplicity, of the first-quadrant Gaussian primes dividing n; sequence gives r values (with a(1) = 0).
|
|
+40
7
|
|
|
0, 2, 3, 4, 3, 5, 7, 6, 6, 5, 11, 7, 5, 9, 6, 8, 5, 8, 19, 7, 10, 13, 23, 9, 6, 7, 9, 11, 7, 8, 31, 10, 14, 7, 10, 10, 7, 21, 8, 9, 9, 12, 43, 15, 9, 25, 47, 11, 14, 8, 8, 9, 9, 11, 14, 13, 22, 9, 59, 10, 11, 33, 13, 12, 8, 16, 67, 9, 26, 12, 71, 12, 11, 9, 9, 23, 18, 10, 79, 11, 12, 11
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A Gaussian integer z = x+iy is in the first quadrant if x > 0, y >= 0. Just one of the 4 associates z, -z, i*z, -i*z is in the first quadrant.
The sequence is fully additive.
|
|
LINKS
|
|
|
EXAMPLE
|
5 factors into the product of the primes 1+2*i, 1-2*i, but the first-quadrant associate of 1-2*i is i*(1-2*i) = 2+i, so r+i*s = 1+2*i + 2+i = 3+3*i. Therefore a(5) = 3.
|
|
MATHEMATICA
|
a[n_] := Module[{f = FactorInteger[n, GaussianIntegers->True]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Re[Plus @@ ((If[Abs[#] == 1, 0, #]& /@ p) * e)]]; Array[a, 100] (* Amiram Eldar, Feb 28 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A078909
|
|
Let r+i*s be the sum, with multiplicity, of the first-quadrant Gaussian primes dividing n; sequence gives s values.
|
|
+40
6
|
|
|
0, 2, 0, 4, 3, 2, 0, 6, 0, 5, 0, 4, 5, 2, 3, 8, 5, 2, 0, 7, 0, 2, 0, 6, 6, 7, 0, 4, 7, 5, 0, 10, 0, 7, 3, 4, 7, 2, 5, 9, 9, 2, 0, 4, 3, 2, 0, 8, 0, 8, 5, 9, 9, 2, 3, 6, 0, 9, 0, 7, 11, 2, 0, 12, 8, 2, 0, 9, 0, 5, 0, 6, 11, 9, 6, 4, 0, 7, 0, 11, 0, 11, 0, 4, 8, 2, 7, 6, 13, 5, 5, 4, 0, 2, 3, 10, 13, 2, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
A Gaussian integer z = x+iy is in the first quadrant if x > 0, y >= 0. Just one of the 4 associates z, -z, i*z, -i*z is in the first quadrant.
The sequence is fully additive.
|
|
LINKS
|
|
|
EXAMPLE
|
5 factors into the product of the primes 1+2*i, 1-2*i, but the first-quadrant associate of 1-2*i is i*(1-2*i) = 2+i, so r+i*s = 1+2*i + 2+i = 3+3*i. Therefore a(5) = 3.
|
|
MATHEMATICA
|
a[n_] := Module[{f = FactorInteger[n, GaussianIntegers->True]}, p = f[[;; , 1]]; e = f[[;; , 2]]; Im[Plus @@ ((If[Abs[#] == 1, 0, #]& /@ p) * e)]]; Array[a, 100] (* Amiram Eldar, Feb 28 2020 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.264 seconds
|