OFFSET
1,9
COMMENTS
Strictly speaking, the symbol in the definition is the Legendre-Jacobi-Kronecker symbol, since the Legendre symbol is defined only for odd primes.
REFERENCES
József Beck, Inevitable randomness in discrete mathematics, University Lecture Series, 49. American Mathematical Society, Providence, RI, 2009. xii+250 pp. ISBN: 978-0-8218-4756-5; MR2543141 (2010m:60026). See page 23.
LINKS
G. C. Greubel, Rows n = 1..50 of the irregular triangle, flattened
EXAMPLE
Triangle begins:
1;
1, 0;
1, 0, -1, 0;
1, 2, 1, 2, 1, 0;
1, 0, 1, 2, 3, 2, 1, 0, 1, 0;
1, 0, 1, 2, 1, 0, -1, -2, -1, 0, -1, 0;
1, 2, 1, 2, 1, 0, -1, 0, 1, 0, -1, -2, -1, -2, -1, 0;
...
MAPLE
with(numtheory);
T:=(n, k)->add(legendre(i, ithprime(n)), i=1..k);
f:=n->[seq(T(n, k), k=1..ithprime(n)-1)];
[seq(f(n), n=1..15)];
MATHEMATICA
Table[P = Prime[n]; Table[JacobiSymbol[k, P], {k, P-1}]//Accumulate, {n, 15}]// Flatten (* G. C. Greubel, Oct 05 2024 *)
PROG
(Magma)
A226519:= func< n, k | n eq 1 select k else (&+[JacobiSymbol(j, NthPrime(n)): j in [0..k]]) >;
[A226519(n, k) : k in [1..NthPrime(n)-1], n in [1..15]]; // G. C. Greubel, Oct 05 2024
(SageMath)
def A226519(n, k): return k if n==1 else sum(jacobi_symbol(j, nth_prime(n)) for j in range(k+1))
flatten([[A226519(n, k) for k in range(1, nth_prime(n))] for n in range(1, 16)]) # G. C. Greubel, Oct 05 2024
CROSSREFS
KEYWORD
sign,tabf
AUTHOR
N. J. A. Sloane, Jun 19 2013
STATUS
approved