The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A318412 Number of different frequencies of values in the set { i*j mod n: 0 <= i, j <= n-1 }. 1
 1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 7, 3, 4, 4, 6, 2, 8, 2, 6, 4, 4, 4, 7, 2, 4, 4, 8, 2, 8, 2, 6, 6, 4, 2, 10, 3, 6, 4, 6, 2, 7, 4, 8, 4, 4, 2, 12, 2, 4, 6, 7, 4, 8, 2, 6, 4, 8, 2, 11, 2, 4, 6, 6, 4, 8, 2, 10, 5, 4, 2, 12, 4, 4, 4, 8, 2, 12, 4, 6, 4, 4, 4, 11, 2, 6, 6, 7, 2, 8, 2, 8, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Records occur at n = 1, 2, 4, 6, 12, 24, 30, 48, 60, 120, 210, 240, 360, 420, 840, 1680, 2520, 4620, 6720, 9240, ... - Antti Karttunen, Nov 13 2018 LINKS Antti Karttunen, Table of n, a(n) for n = 1..16384 EXAMPLE For n=3 we have to take into consideration the set Z3=[0,1,2], integers modulo 3, multiplying Z3 by itself. So we have these outcomes: 0 (0x0), 0 (0x1), 0 (0x2), 0 (1x0), 1 (1x1), 2 (1x2), 0 (2x0), 2 (2x1) and 1 (2x2 mod 3). Frequency of outcome 0 is 5, of 1 is 2 and of 2 is 2. Different frequencies are only 5 and 2, for a total of two. So a(3)=2. MATHEMATICA a[n_] := Length@ Union[Last /@ Tally@ Mod[ Times @@@ Tuples[Range@ n, 2], n]]; Array[a, 69] (* Giovanni Resta, Sep 03 2018 *) PROG (Python) fine=70 zc = [] ris="" def nclass(v):     n=0     l=[]     for item in v:         if item not in l:             l.append(item)             n+=1     return n for z in range(1, fine):     for k in range(z): zc.append(0)     for i in range(z):         for j in range(z):             r=(i*j)%z             zc[r]+=1     ris = ris + ", " + str(nclass(zc))     zc = [] print(ris) (PARI) A318412(n) = { my(m=Map(), fs=List([])); for(i=0, n-1, for(j=0, n-1, my(r=(i*j)%n, p = if(mapisdefined(m, r), mapget(m, r), 0)); mapput(m, r, p+1))); for(i=0, n-1, listput(fs, mapget(m, i))); #Set(fs); }; \\ Antti Karttunen, Nov 09 2018 (PARI) A318412(n) = { my(fs=vector(n)); fs[1+0] = (n+n-1+(0==(n%4))); if(2==(n%4), fs[1+(((n/2)^2)%n)] = 1); for(i=1, n\2, for(j=1, (n-1)\2, fs[1+((i*j)%n)] += 2; fs[1+((i*(n-j))%n)] += 2)); #Set(fs); }; \\ Antti Karttunen, Nov 10 2018 CROSSREFS Cf. A285052. Sequence in context: A074848 A252505 A325560 * A322986 A335519 A167447 Adjacent sequences:  A318409 A318410 A318411 * A318413 A318414 A318415 KEYWORD nonn AUTHOR Pierandrea Formusa, Sep 01 2018 EXTENSIONS More terms from Antti Karttunen, Nov 09 2018 STATUS approved

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

Last modified June 24 18:38 EDT 2021. Contains 345419 sequences. (Running on oeis4.)