login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A048259 Number of distinct solutions to x + y + z = 0 (mod n), where two solutions are equivalent if one can be obtained from the other by multiplying by units in Z/nZ and permuting x,y,z. 4
1, 1, 2, 3, 4, 3, 7, 4, 8, 6, 8, 4, 15, 5, 10, 11, 14, 5, 17, 6, 18, 14, 12, 6, 31, 9, 14, 13, 22, 7, 33, 8, 24, 16, 16, 16, 39, 9, 18, 19, 38, 9, 41, 10, 28, 28, 20, 10, 57, 15, 30, 21, 32, 11, 43, 20, 46, 24, 24, 12, 77, 13, 26, 35, 42, 23, 53, 14, 38, 26, 52, 14, 83 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Sean A. Irvine, Java program (github)
EXAMPLE
For n=6 the 7 solutions are (x,y,z) = (0,0,0), (5,1,0), (4,2,0), (4,1,1), (3,3,0), (3,2,1), (2,2,2).
PROG
(PARI)
iscanon(n, v)={for(d=1, n-1, if(gcd(n, d)==1 && lex(v, vecsort(v*d%n))>0, return(0))); 1}
a(n)={if(n==0, 1, sum(x=0, n-1, sum(y=x, n-1, my(z=(-x-y)%n); y<=z && iscanon(n, [x, y, z]) )))} \\ Andrew Howroyd, Jun 11 2021
CROSSREFS
Sequence in context: A217536 A333618 A058267 * A324150 A198461 A228576
KEYWORD
nonn
AUTHOR
EXTENSIONS
a(42) onward corrected by Sean A. Irvine, Jun 10 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 6 12:05 EDT 2024. Contains 372293 sequences. (Running on oeis4.)