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.

Showing 1-3 of 3 results.

A068718 Boustrophedon transform of A068717 with A068717(1) = -1 instead of 0.

Original entry on oeis.org

1, 2, 2, 2, 8, 25, 90, 404, 2055, 11792, 75053, 525622, 4015361, 33231679, 296182315, 2828335731, 28809181418, 311788442591, 3572832236720, 43216177809190, 550245463265240, 7356239983352887, 103028812072639378
Offset: 0

Views

Author

Frank Ellermann, Feb 26 2002

Keywords

Comments

Signs omitted, all terms < 0. A068717(1) = -1 means soluble (1*1 -1*0*0 = +1 resp. 0*0 -1*1*1 = -1).

Crossrefs

Programs

  • Python
    from itertools import accumulate, count, islice
    from math import isqrt
    from sympy import continued_fraction_periodic
    def A068718_gen(): # generator of terms
        yield 1
        blist = (1,)
        for n in count(2):
            yield (blist := tuple(accumulate(reversed(blist),initial=0 if (a:=isqrt(n)**2==n) else (1 if len(continued_fraction_periodic(0,1,n)[1]) & 1 else int(a)-1))))[-1]
    A068718_list = list(islice(A068718_gen(),40)) # Chai Wah Wu, Jun 14 2022

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.

A068716 a(n) = 1 if x^2 + 1 = n * y^2 has infinitely many solutions in integers (x,y), otherwise a(n) = 0.

Original entry on oeis.org

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

Views

Author

Frank Ellermann, Feb 25 2002

Keywords

Examples

			a(2) = 1 as x*x + 1 = 2 * y*y is soluble, e.g., 7*7 + 1= 2*5*5.
		

References

  • H. Davenport, The Higher Arithmetic. Cambridge Univ. Press, 7th ed., 1999, table 1.

Crossrefs

Formula

a(n) = 1 - (A067280(n) mod 2 ).

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 31 2003
Showing 1-3 of 3 results.