Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #41 Nov 09 2022 07:56:37
%S 0,0,0,0,1,8,10,7,1,24,21,31,30,31,27,29,14,49,64,19,67,37,20,56,20,
%T 74,50,34,73,29,109,64,4,137,66,32,154,64,106,51,119,97,95,110,63,102,
%U 169,28,166
%N a(n) = A000594(p) mod p, where p = prime(n).
%H Chai Wah Wu, <a href="/A273651/b273651.txt">Table of n, a(n) for n = 1..10000</a> (n = 1..1000 from Seiichi Manyama)
%F for n > 1, a(n) = -1680*Sum_{i=1..(p-1)/2} i**4*sigma(i)*sigma(p-i) mod p where p = prime(n). - _Chai Wah Wu_, Nov 08 2022
%t Mod[RamanujanTau@ #, #] & /@ Prime@ Range@ 80 (* _Michael De Vlieger_, May 27 2016 *)
%o (Ruby)
%o require 'prime'
%o def mul(f_ary, b_ary, m)
%o s1, s2 = f_ary.size, b_ary.size
%o ary = Array.new(s1 + s2 - 1, 0)
%o s10 = [s1 - 1, m].min
%o (0..s10).each{|i|
%o s20 = [s2 - 1, m - i].min
%o (0..s20).each{|j|
%o ary[i + j] += f_ary[i] * b_ary[j]
%o }
%o }
%o ary
%o end
%o def power(ary, n, m)
%o return [1] if n == 0
%o k = power(ary, n >> 1, m)
%o k = mul(k, k, m)
%o return k if n & 1 == 0
%o return mul(k, ary, m)
%o end
%o def A000594(n)
%o ary = Array.new(n + 1, 0)
%o i = 0
%o j, k = 2 * i + 1, i * (i + 1) / 2
%o while k <= n
%o i & 1 == 1? ary[k] = -j : ary[k] = j
%o i += 1
%o j, k = 2 * i + 1, i * (i + 1) / 2
%o end
%o power(ary, 8, n).unshift(0)[1..n]
%o end
%o def A273651(n)
%o p_ary = Prime.each.take(n)
%o t_ary = A000594(p_ary[-1])
%o p_ary.inject([]){|s, i| s << t_ary[i - 1] % i}
%o end
%o p A273651(n)
%o (PARI) a(n,p=prime(n))=(65*sigma(p, 11)+691*sigma(p, 5)-691*252*sum(k=1, p-1, sigma(k, 5)*sigma(p-k, 5)))/756%p \\ _Charles R Greathouse IV_, Jun 07 2016
%o (Python)
%o from sympy import prime, divisor_sigma
%o def A273651(n):
%o p = prime(n)
%o return -1680*sum(pow(i,4,p)*divisor_sigma(i)*divisor_sigma(p-i) for i in range(1,p+1>>1)) % p # _Chai Wah Wu_, Nov 08 2022
%Y Cf. A000594, A007659, A273650.
%K nonn
%O 1,6
%A _Seiichi Manyama_, May 27 2016