A305211 a(n) is the number of possible values of (x^3 + y^3) mod n, where x and y are any integers.
1, 2, 3, 4, 5, 6, 5, 8, 5, 10, 11, 12, 13, 10, 15, 16, 17, 10, 19, 20, 15, 22, 23, 24, 25, 26, 15, 20, 29, 30, 31, 32, 33, 34, 25, 20, 37, 38, 39, 40, 41, 30, 43, 44, 25, 46, 47, 48, 35, 50, 51, 52, 53, 30, 55, 40, 57, 58, 59, 60, 61, 62, 25, 64, 65, 66, 67
Offset: 1
Keywords
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Crossrefs
Cf. A155918 (with squares instead of cubes).
Programs
-
PARI
a(n) = my(v=[]); for (x=1, n, for (y=1, n, v = concat(v, Mod(x, n)^3 + Mod(y, n)^3))); #Set(v); \\ Michel Marcus, Jul 10 2018
-
PARI
a(n) = {my(v = Set(vector(n, i, i^3%n)), l); if(#v == n, return(n) , res = vector(n); for(i = 1, #v, for(j = i, #v, res[1 + (v[i] + v[j]) % n] = 1 ) ); vecsum(res) ) } \\ David A. Corneth, May 22 2020
-
Python
[len(set((pow(x,3,n)+pow(y,3,n))%n for x in range(n) for y in range(x+1))) for n in range(1,51)]
Extensions
a(50)-a(67) from Jon E. Schoenfield, May 28 2018
Comments