cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-14 of 14 results.

A097343 Triangle read by rows in which row n gives Legendre symbol (k,p) for 0

Original entry on oeis.org

1, -1, 0, 1, -1, -1, 1, 0, 1, 1, -1, 1, -1, -1, 0, 1, -1, 1, 1, 1, -1, -1, -1, 1, -1, 0, 1, -1, 1, 1, -1, -1, -1, -1, 1, 1, -1, 1, 0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 0, 1, -1, -1, 1, 1, 1, 1
Offset: 2

Views

Author

Robert G. Wilson v, Aug 02 2004

Keywords

Comments

Row sums = 0. (p,k)==k^((p-1)/2) (mod p). For example, row n=4 of the triangle (for the 4th prime p = 7) reads: 1,1,-1,1,-1,-1,0 because 1^3==1, 2^3==1, 3^3==-1, 4^3==1, 5^3==-1, 6^3==-1, 7^3==0 (mod 7). - Geoffrey Critzer, Apr 18 2015

Examples

			1,-1,0 ; # A102283
1,-1,-1,1,0; # A080891
1,1,-1,1,-1,-1,0; # A175629
1,-1,1,1,1,-1,-1,-1,1,-1,0; # A011582
		

Crossrefs

See A226520 for another version.
Cf. A068717.

Programs

  • Haskell
    a097343 n k = a097343_tabf !! (n-2) !! (k-1)
    a097343_row n = a097343_tabf !! (n-2)
    a097343_tabf =
       map (\p -> map (flip legendreSymbol p) [1..p]) $ tail a000040_list
    legendreSymbol a p = if a' == 0 then 0 else twoSymbol * oddSymbol where
       a' = a `mod` p
       (s,q) = a' `splitWith` 2
       twoSymbol = if (p `mod` 8) `elem` [1,7] || even s then 1 else -1
       oddSymbol = if q == 1 then 1 else qrMultiplier * legendreSymbol p q
       qrMultiplier = if p `mod` 4 == 3 && q `mod` 4 == 3 then -1 else 1
       splitWith n p = spw 0 n where
          spw s t = if m > 0 then (s, t) else spw (s + 1) t'
                    where (t', m) = divMod t p
    -- See link.  Reinhard Zumkeller, Feb 02 2014
  • Maple
    with(numtheory):
    T:= n-> (p-> seq(jacobi(k, p), k=1..p))(ithprime(n)):
    seq(T(n), n=2..15);  # Alois P. Heinz, Apr 19 2015
  • Mathematica
    Flatten[ Table[ JacobiSymbol[ Range[ Prime[n]], Prime[n]], {n, 2, 8}]]

Formula

(p, p)=0, all others are +- 1.

A055088 Triangle of generalized Legendre symbols L(a/b) read by rows, with 1's for quadratic residues and 0's for quadratic non-residues.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Apr 18 2000

Keywords

Comments

L(a/b) is 1 if an integer c exists such that c^2 is congruent to a (mod b) and 0 otherwise.
For every prime of the form 4k+1 (A002144) the row is symmetric and for every prime of the form 4k+3 (A002145) the row is "complementarily symmetric".

Examples

			The tenth row gives the quadratic residues and non-residues of 11 (see A011582) and the twelfth row gives the same information for 13 (A011583), with -1's replaced by zeros.
.
Triangle starts:
  [ 1] [1]
  [ 2] [1, 0]
  [ 3] [1, 0, 0]
  [ 4] [1, 0, 0, 1]
  [ 5] [1, 0, 1, 1, 0]
  [ 6] [1, 1, 0, 1, 0, 0]
  [ 7] [1, 0, 0, 1, 0, 0, 0]
  [ 8] [1, 0, 0, 1, 0, 0, 1, 0]
  [ 9] [1, 0, 0, 1, 1, 1, 0, 0, 1]
  [10] [1, 0, 1, 1, 1, 0, 0, 0, 1, 0]
  [11] [1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0]
  [12] [1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1]
		

Crossrefs

Each row interpreted as a binary number: A055094.

Programs

  • Maple
    # See A054431 for one_or_zero and trinv.
    with(numtheory,quadres); quadres_0_1_array := (n) -> one_or_zero(quadres((n-((trinv(n-1)*(trinv(n-1)-1))/2)), (trinv(n-1)+1)));
  • Mathematica
    row[n_] := With[{rr = Table[Mod[k^2, n + 1], {k, 1, n}] // Union}, Boole[ MemberQ[rr, #]]& /@ Range[n]];
    Array[row, 14] // Flatten (* Jean-François Alcover, Mar 05 2016 *)
  • Sage
    def A055088_row(n) :
        Q = quadratic_residues(n+1)
        return [int(i in Q) for i in (1..n)]
    for n in (1..14) : print(A055088_row(n))  # Peter Luschny, Aug 08 2012

A322829 a(n) = Jacobi (or Kronecker) symbol (n/21).

Original entry on oeis.org

0, 1, -1, 0, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 0, -1, 1, 0, 1, -1, 0, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 0, -1, 1, 0
Offset: 0

Views

Author

Jianing Song, Dec 27 2018

Keywords

Comments

Period 21: repeat [0, 1, -1, 0, 1, 1, 0, 0, -1, 0, -1, -1, 0, -1, 0, 0, 1, 1, 0, -1, 1].
Also a(n) = Kronecker symbol (21/n).
This sequence is one of the three non-principal real Dirichlet characters modulo 21. The other two are Jacobi or Kronecker symbols {(n/63)} (or {(-63/n)}) and {(n/147)} (or {(-147/n)}).

Crossrefs

Cf. A035203 (inverse Moebius transform).
Kronecker symbols {(d/n)} where d is a fundamental discriminant with |d| <= 24: A109017(d=-24), A011586 (d=-23), A289741 (d=-20), A011585 (d=-19), A316569 (d=-15), A011582 (d=-11), A188510 (d=-8), A175629 (d=-7), A101455 (d=-4), A102283 (d=-3), A080891 (d=5), A091337 (d=8), A110161 (d=12), A011583 (d=13), A011584 (d=17), this sequence (d=21), A322796 (d=24).

Programs

  • Mathematica
    JacobiSymbol[Range[0, 100], 21] (* Paolo Xausa, Mar 19 2025 *)
  • PARI
    a(n) = kronecker(n, 21)

Formula

a(n) = 1 for n == 1, 4, 5, 16, 17, 20 (mod 21); -1 for n == 2, 8, 10, 11, 13, 19 (mod 21); 0 for n that are not coprime with 21.
Completely multiplicative with a(p) = a(p mod 21) for primes p.
a(n) = A102283(n)*A175629(n).
a(n) = a(n+21) = -a(n) for all n in Z.
From Chai Wah Wu, Feb 18 2021: (Start)
a(n) = a(n-1) - a(n-3) + a(n-4) - a(n-6) + a(n-8) - a(n-9) + a(n-11) - a(n-12) for n > 11.
G.f.: -x*(x - 1)*(x + 1)*(x^8 - 2*x^7 + 2*x^6 + 2*x^2 - 2*x + 1)/(x^12 - x^11 + x^9 - x^8 + x^6 - x^4 + x^3 - x + 1). (End)

A065103 A level 11 weight 5 form.

Original entry on oeis.org

1, 15, 82, 241, 626, 1230, 2400, 3855, 6643, 9390, 14641, 19762, 28560, 36000, 51332, 61681, 83520, 99645, 130320, 150866, 196800, 219615, 279842, 316110, 391251, 428400, 538084, 578400, 707280, 769980, 923522, 986895, 1200562
Offset: 1

Views

Author

Kok Seng Chua (chuaks(AT)ihpc.nus.edu.sg), Nov 20 2001

Keywords

Comments

Multiplicative because convolution of multiplicative functions. - Michael Somos, Jun 07 2005

Crossrefs

Cf. A011582.

Programs

  • Mathematica
    a[n_]:= If[n < 0, 0, Sum[KroneckerSymbol[d, 11]*(n/d)^4, {d, Divisors[n]}]]; Table[a[n], {n,1,50}] (* G. C. Greubel, Apr 17 2018 *)
  • PARI
    a(n) = sumdiv(n, d, kronecker(d, 11) * (n/d)^4); \\ Amiram Eldar, Jan 18 2025

Formula

a(n) = Sum_{d | n} Kronecker(d/11)*(n/d)^4.
Previous Showing 11-14 of 14 results.