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

A080112 Positions of A080114 in A000040.

Original entry on oeis.org

2, 3, 4, 5, 6, 9, 11, 12, 15, 17, 20, 22, 23, 27, 32, 36, 39, 43, 46, 52, 54, 56, 58, 64, 72, 76, 81, 83, 85, 92, 96, 103, 109, 111, 118, 120, 128, 132, 133, 146, 150, 154, 156, 157, 164, 166, 167, 173, 175, 179, 182, 185, 190, 200, 202, 207, 215, 222, 225, 228, 229
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2003

Keywords

Crossrefs

Complement of A080113. Characteristic function: A080110.

Programs

  • Maple
    A080112 := proc(n) option remember; local i; if(1 = n) then RETURN(2); fi; i := A080112(n-1)+1; while(i > 0) do if(A080110(i) > 0) then RETURN(i); fi; i := i+1; od; end;
  • Mathematica
    s[p_, u_] := Sum[JacobiSymbol[j, p], {j, 1, u}]; Select[Range[2, 300], (p = Prime[#]; AllTrue[Range[(p - 1)/2], s[p, #] >= 0 &]) &] (* Jean-François Alcover, Mar 07 2016 *)
  • Sage
    @CachedFunction
    def A080112(n) :
         if 1 == n : return 2
         i = A080112(n-1) + 1
         while i > 0 :
             if A080110(i) > 0 : return i
             i += 1
    [A080112(n) for n in (1..61)] # Peter Luschny, Aug 09 2012

A080115 Primes not in A080114.

Original entry on oeis.org

2, 17, 19, 29, 41, 43, 53, 61, 67, 73, 89, 97, 101, 107, 109, 113, 127, 137, 139, 149, 157, 163, 173, 179, 181, 193, 197, 211, 223, 227, 229, 233, 241, 257, 269, 277, 281, 283, 293, 307, 313, 317, 331, 337, 347, 349, 353, 367, 373, 379, 389, 397, 401, 409, 421
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2003

Keywords

Crossrefs

Cf. A080113.

Programs

A080120 Dyck path encodings of Legendre's candelabras formed for primes in A080114. (I.e., symmetric rooted plane trees constructed from their quadratic residue sets.)

Original entry on oeis.org

10, 1010, 110100, 1011100010, 101100110010, 1111010110011001010000, 110110111100010101110000100100, 101100101111000100110111000010110010, 1111011110010101110010011011000101011000010000
Offset: 1

Views

Author

Antti Karttunen, Feb 11 2003

Keywords

Comments

For the 2nd, 5th and 8th term of the sequence, the quadratic residue set of the corresponding prime (5,13,37, of the form 4k+1) has been converted from symmetric to complementarily symmetric as 1001->1010, 101100001101->101100110010, 101100101111000100001000111101001101->101100101111000100110111000010110010, for the others (of the form 4k+3), it is the quadratic residue set encoded as in A055094 (with +1 mapped to 1 and -1 to 0).

Crossrefs

Same sequence in decimal: A080118. Cf. A080114.

Programs

Formula

a(n) = A063171(A080119(n)).

A095094 Number of A080114-primes in range ]2^n,2^(n+1)].

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 7, 10, 16, 30, 51, 88, 153, 277, 509, 905, 1660, 3079, 5535, 10234, 19053
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Cf. A080114.

Programs

  • PARI
    is(p) = {if(!isprime(p), return(0)); my(s=0); for(i=1, (p-1)/2, if((s+=kronecker(i, p))<0, return(0))); 1; }
    a(n) = sum(p=2^n+1, 2^(n+1), is(p)); \\ Jinyuan Wang, Jul 20 2020

Formula

a(n) = A036378(n) - A095095(n).

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.

A166051 Nonsquare integers of the form 4n+1 for which Sum_{i=1..u} J(i,4n+1) is never negative for any u in range [1,(2n)], where J(i,k) is the Jacobi symbol.

Original entry on oeis.org

5, 13, 21, 37, 85, 93, 165
Offset: 1

Views

Author

Antti Karttunen, Oct 08 2009

Keywords

Comments

Conjecture: There are no more terms after 165. (Checked up to A016813(290511) = 1162045.) If this is true, then also 5, 13 and 37 are only 4k+1 primes in A080114.

Crossrefs

Setwise difference of A016754 and A166049.

Programs

  • Sage
    def is_what(n, k):
        s = 0
        for i in (1..k):
            s += jacobi_symbol(i, n)
            if s < 0: return False
        return not is_square(n)
    def A166051_list(n):
        return [m for m in range(1, n + 1, 4) if is_what(m, m // 2)]
    A166051_list(1000) # Peter Luschny, Aug 08 2012
Showing 1-6 of 6 results.