A320044 Number of positive integers k < prime(n)/2 with {k^3/prime(n)} > 1/2, where {x} = x - floor(x) is the fractional part of a real number x.
0, 0, 1, 1, 2, 4, 3, 2, 4, 7, 9, 10, 7, 9, 12, 15, 12, 14, 15, 18, 19, 25, 18, 19, 20, 23, 28, 22, 30, 27, 34, 30, 33, 37, 39, 35, 40, 38, 36, 51, 38, 42, 50, 50, 49, 53, 44, 57, 62, 59, 55, 54, 49, 62, 65, 62, 69, 59, 65, 67, 77, 69, 71, 80, 80, 69, 76, 78, 88, 87, 87, 94, 87, 87, 99, 96, 87, 97, 97, 94
Offset: 1
Keywords
Examples
a(3) = 1 since prime(3) = 5 and {0 < k < 5/2: {k^3/5} > 1/2} = {2}. a(4) = 1 since prime(4) = 7 and {0 < k < 7/2: {k^3/7} > 1/2} = {3}. a(5) = 2 since prime(5) = 11 and {0 < k < 11/2: {k^3/11} > 1/2} = {2,4}.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Quadratic residues and related permutations and identities, arXiv:1809.07766 [math.NT], 2018.
Programs
-
Mathematica
s[p_]:=s[p]=Sum[Boole[Mod[k^3,p]>p/2],{k,1,(p-1)/2}];Table[s[Prime[n]],{n,1,80}]
Comments