login

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”).

A273651
a(n) = A000594(p) mod p, where p = prime(n).
2
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, 74, 50, 34, 73, 29, 109, 64, 4, 137, 66, 32, 154, 64, 106, 51, 119, 97, 95, 110, 63, 102, 169, 28, 166
OFFSET
1,6
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000 (n = 1..1000 from Seiichi Manyama)
FORMULA
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
MATHEMATICA
Mod[RamanujanTau@ #, #] & /@ Prime@ Range@ 80 (* Michael De Vlieger, May 27 2016 *)
PROG
(Ruby)
require 'prime'
def mul(f_ary, b_ary, m)
s1, s2 = f_ary.size, b_ary.size
ary = Array.new(s1 + s2 - 1, 0)
s10 = [s1 - 1, m].min
(0..s10).each{|i|
s20 = [s2 - 1, m - i].min
(0..s20).each{|j|
ary[i + j] += f_ary[i] * b_ary[j]
}
}
ary
end
def power(ary, n, m)
return [1] if n == 0
k = power(ary, n >> 1, m)
k = mul(k, k, m)
return k if n & 1 == 0
return mul(k, ary, m)
end
def A000594(n)
ary = Array.new(n + 1, 0)
i = 0
j, k = 2 * i + 1, i * (i + 1) / 2
while k <= n
i & 1 == 1? ary[k] = -j : ary[k] = j
i += 1
j, k = 2 * i + 1, i * (i + 1) / 2
end
power(ary, 8, n).unshift(0)[1..n]
end
def A273651(n)
p_ary = Prime.each.take(n)
t_ary = A000594(p_ary[-1])
p_ary.inject([]){|s, i| s << t_ary[i - 1] % i}
end
p A273651(n)
(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
(Python)
from sympy import prime, divisor_sigma
def A273651(n):
p = prime(n)
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
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, May 27 2016
STATUS
approved