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-8 of 8 results.

A095274 a(n) = (A095100(n)-3)/4.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 13, 14, 15, 17, 18, 19, 20, 21, 23, 25, 27, 29, 32, 33, 35, 37, 39, 41, 42, 43, 45, 47, 49, 53, 57, 59, 60, 62, 63, 65, 67, 69, 71, 73, 74, 75, 77, 79, 81, 83, 85, 87, 89, 90, 92, 93, 95, 97, 98, 99, 101, 103, 104, 107, 109, 111, 113
Offset: 0

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Cf. A095100. Complement of A095275. Subset: A095272.

A095090 Number of 4k+3 integers in range ]2^n,2^(n+1)] whose Jacobi-vector is a Motzkin-path (A095100).

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 17, 33, 60, 108, 202, 360, 703, 1328, 2519, 4779, 9103, 17501, 33473, 64761
Offset: 1

Views

Author

Antti Karttunen and Jun 01 2004

Keywords

Crossrefs

Programs

  • PARI
    is(m) = {my(s=0); for(i=1, m-1, if((s+=kronecker(i, m))<0, return(0))); 1; }
    a(n) = {my(c=0); forstep(m=2^n+3-(n==1), 2^(n+1), 4, c+=is(m)); c; } \\ Jinyuan Wang, Jul 20 2020

Formula

a(n) = 2^(n-2) - A095091(n) for n > 1.

A095102 Odd primes p for which all sums Sum_{i=1..u} L(i/p) (with u ranging from 1 to (p-1)) are nonnegative, where L(i/p) is Legendre symbol of i and p, defined to be 1 if i is a quadratic residue (mod p) and -1 if i is a quadratic non-residue (mod p).

Original entry on oeis.org

3, 7, 11, 23, 31, 47, 59, 71, 79, 83, 103, 131, 151, 167, 191, 199, 239, 251, 263, 271, 311, 359, 383, 419, 431, 439, 479, 503, 563, 599, 607, 647, 659, 719, 743, 751, 839, 863, 887, 911, 919, 971, 983, 991, 1031, 1039, 1063, 1091, 1103, 1151
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

All 4k+3 primes whose Legendre-vector (cf. A055094) forms a valid Dyck-path (cf. A014486).

Crossrefs

Intersection of A000040 and A095100. Subset of A080114 (see comments there). Complement of A095103 in A002145.
Cf. A095092.

Programs

  • Mathematica
    isMotzkin[n_, k_] := Module[{s = 0, r = True}, Do[s += JacobiSymbol[i, n]; If[s < 0, r = False; Break[]], {i, 1, k}]; r]; A095102[max_] := Select[ Range[3, max, 4], PrimeQ[#] && isMotzkin[#, Quotient[#, 2]]&]; A095102[1151] (* Jean-François Alcover, Feb 16 2018, after Peter Luschny *)
  • PARI
    isok(m) = {if(!isprime(m-(m<3)), return(0)); my(s=0); for(i=1, m-1, if((s+=kronecker(i, m))<0, return(0))); 1; } \\ Jinyuan Wang, Jul 20 2020
  • Sage
    def A095102_list(n) :
        def is_Motzkin(n, k):
            s = 0
            for i in (1..k):
                s += jacobi_symbol(i, n)
                if s < 0: return False
            return True
        P = filter(is_prime, range(3, n+1, 4))
        return filter(lambda m: is_Motzkin(m, m//2), P)
    A095102_list(1151) # Peter Luschny, Aug 09 2012
    

Formula

a(n) = 4*A095272(n) + 3.

A095101 Integers m of the form 4k+3 for which some of the sums Sum_{i=1..u} J(i/m) (with u ranging from 1 to (m-1)) is negative, where J(i/m) is Jacobi symbol of i and m.

Original entry on oeis.org

19, 43, 51, 67, 91, 99, 107, 115, 123, 127, 139, 147, 155, 163, 179, 187, 195, 203, 207, 211, 219, 223, 227, 235, 247, 259, 267, 275, 283, 291, 307, 315, 323, 331, 339, 347, 355, 367, 379, 387, 403, 411, 423, 427, 435, 443, 451, 459, 463, 467
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

Integers whose Jacobi-vector does not form a valid Motzkin-path.

Crossrefs

Subset of A095103. Complement of A095100 in A004767.
Cf. A095091.

Programs

  • PARI
    isok(m) = {my(s=0); if(m%4==3, for(i=1, m-1, if((s+=kronecker(i, m))<0, return(1)))); 0; } \\ Jinyuan Wang, Jul 20 2020
  • Sage
    def is_Motzkin(n, k):
        s = 0
        for i in (1..k) :
            s += jacobi_symbol(i, n)
            if s < 0 : return False
        return True
    def A095101_list(n):
        return [m for m in range(3, n+1, 4) if not is_Motzkin(m, m//2)]
    A095101_list(467) # Peter Luschny, Aug 08 2012
    

Formula

a(n) = 4*A095275(n) + 3.

A165469 Numbers of the form 4n+3 for which Sum_{i=1..u} J(i,4n+3) is never zero for any u in range [1,(2n+1)], where J(i,m) is the Jacobi symbol.

Original entry on oeis.org

3, 7, 15, 23, 31, 39, 47, 55, 71, 79, 87, 95, 111, 119, 143, 151, 159, 167, 183, 191, 199, 215, 231, 239, 255, 263, 271, 287, 303, 311, 327, 335, 359, 383, 391, 399, 407, 431, 439, 447, 455, 471, 479, 503, 511, 519, 527, 535, 551, 559, 591, 599, 615, 623
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2009

Keywords

Crossrefs

a(n) = A004767(A165468(n)). Setwise difference of A095100 and A165608. A165580 gives the primes in this sequence.

A165608 Numbers of the form 4n+3 for which Sum_{i=1..u} J(i,4n+3) is never negative for any u in range [1,2n+1], but obtains at least one value zero, where J(i,m) is the Jacobi symbol.

Original entry on oeis.org

11, 27, 35, 59, 63, 75, 83, 103, 131, 135, 171, 175, 243, 251, 279, 295, 299, 319, 343, 351, 363, 371, 375, 395, 415, 419, 495, 539, 563, 567, 575, 607, 635, 659, 675, 703, 711, 731, 735, 755, 783, 867, 875, 895, 899, 903, 927, 943, 971, 999, 1063, 1067
Offset: 1

Views

Author

Antti Karttunen, Oct 06 2009

Keywords

Comments

Setwise difference of A095100 and A165469.

Crossrefs

a(n) = A004767(A165607(n)). Subset of A095100. A165977 gives the primes only. Cf. A165603.

Extensions

Definition edited by Jonathan Sondow, Sep 27 2011

A166409 Odd numbers corresponding to the positions of zeros in A166406.

Original entry on oeis.org

5, 13, 17, 21, 29, 33, 37, 41, 45, 53, 57, 61, 65, 69, 73, 77, 85, 89, 93, 97, 99, 101, 105, 109, 113, 117, 125, 129, 133, 137, 141, 145, 147, 149, 153, 157, 161, 165, 173, 177, 181, 185, 189, 193, 197, 201, 205, 207, 209, 213, 217, 221, 229, 233, 237, 241
Offset: 1

Views

Author

Antti Karttunen, Oct 21 2009, Oct 22 2009

Keywords

Comments

Those odd numbers 2n+1 for which the sum of i in [1,2n+1] with J(i,2n+1)=-1 is equal to the sum of i in [1,2n+1] with J(i,2n+1)=+1. Here J(i,k) is the Jacobi symbol.
Probably a union of A077425 & A165603: It is clear that A077425 is a subsequence of this sequence. For the remaining terms to be equal to A165603, it is at least required that the intersection of A165603 and A095100 be empty.

Crossrefs

Programs

  • Python
    from sympy import jacobi_symbol as J
    def a(n):
        l=0
        m=0
        for i in range(1, 2*n + 2):
            if J(i, 2*n + 1)==-1: l+=i
            elif J(i, 2*n + 1)==1: m+=i
        return l - m
    print([2*n + 1 for n in range(201) if a(n)==0]) # Indranil Ghosh, Jun 12 2017

A227194 Natural numbers for which all sums Sum_{i=1..u} K(i/n) (with u ranging from 1 to n) are nonnegative, where K(i/n) is Kronecker symbol of i and n.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 14, 15, 16, 23, 24, 25, 26, 27, 30, 31, 34, 35, 36, 38, 39, 42, 44, 47, 48, 49, 54, 55, 56, 58, 59, 62, 63, 64, 66, 71, 74, 75, 76, 79, 81, 82, 83, 86, 87, 94, 95, 96, 100, 103, 106, 108, 110, 111, 114, 119, 120, 121, 130, 131
Offset: 1

Views

Author

Antti Karttunen, Jul 06 2013

Keywords

Crossrefs

Subsets: A095100, A095102 (gives the prime terms). Cf. A227196-A227198.

Programs

  • PARI
    firstdiving(n) = {s=0;for(k=1,n,s=s+kronecker(k,n);if(s<0,return(k)));return(0)}
    for(n=1,500,if((0==firstdiving(n)),print1(n,", ")))
Showing 1-8 of 8 results.