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 21-30 of 143 results. Next

A095093 Number of 4k+3 primes whose Legendre-vector is not Dyck-path (A095103) in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 0, 0, 1, 1, 3, 6, 12, 21, 41, 77, 143, 287, 530, 1010, 1967, 3711, 7125, 13806, 26525, 51126
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Cf. A095103.

Programs

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

Formula

a(n) = A095008(n) - A095092(n).

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.

A095103 4*k+3 primes whose Legendre-vector is not valid Dyck-path.

Original entry on oeis.org

19, 43, 67, 107, 127, 139, 163, 179, 211, 223, 227, 283, 307, 331, 347, 367, 379, 443, 463, 467, 487, 491, 499, 523, 547, 571, 587, 619, 631, 643, 683, 691, 727, 739, 787, 811, 823, 827, 859, 883, 907, 947, 967, 1019, 1051, 1087, 1123, 1163
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A095101. Complement of A095102 in A002145.
Cf. A095093, A095108 (diving indices).

Programs

  • Mathematica
    L = {}; Do[p = Prime[k]; If[Mod[p, 4] == 3 && Min[Table[Sum[JacobiSymbol[n, p], {n, 0, m}], {m, 0, p - 1}]] < 0, L = Append[L, p]], {k, 1, 192}]; L (* Jonathan Sondow, Oct 25 2011 *)
  • PARI
    isok(m) = {my(s=0); if(m%4==3&&isprime(m), for(i=1, m-1, if((s+=kronecker(i, m))<0, return(1)))); 0; } \\ Jinyuan Wang, Jul 20 2020
    
  • Sage
    def A095103_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(n+1)[3::4])
        return filter(lambda m: not is_Motzkin(m, m//2), P)
    A095103_list(1163) # Peter Luschny, Aug 08 2012

Formula

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

A095109 Sum of diving indices of all 4k+3 integers in range ]2^n,2^(n+1)].

Original entry on oeis.org

0, 0, 0, 3, 13, 40, 194, 389, 1407, 3646, 13300, 39166, 131464, 389575, 1627565, 5556317, 19913811, 72249861, 272188855, 996509475
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Comments

Diving index is explained at A095269.

Crossrefs

Cf. A095110.

A095110 Sum of maximal Motzkin path prefix-lengths of all 4k+3 integers in range ]2^n,2^(n+1)].

Original entry on oeis.org

2, 6, 24, 80, 303, 847, 3401, 12816, 47255, 168306, 628058, 2243714, 8741445, 33079519, 125266470, 474015314, 1806320048, 6945673364, 26539784794, 102630867522
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

A095286 Primes in whose binary expansion the number of 1 bits is > 1 + number of 0 bits.

Original entry on oeis.org

3, 7, 11, 13, 23, 29, 31, 43, 47, 53, 59, 61, 79, 103, 107, 109, 127, 151, 157, 167, 173, 179, 181, 191, 199, 211, 223, 227, 229, 233, 239, 241, 251, 311, 317, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Examples

			13 is in the sequence because 13 is prime and 13 = 1101_2. '1101' has three 1's and one 0. 3 > 1 + 1. - _Indranil Ghosh_, Feb 07 2017
		

Crossrefs

Complement of A095287 in A000040. Subset of A095070. Subset: A095314. Cf. also A095296.

Programs

  • PARI
    B(x) = {nB = floor(log(x)/log(2)); b1 = 0; b0 = 0;
    for(i = 0, nB, if(bittest(x,i), b1++;, b0++;); );
    if(b1 > (b0+1), return(1);, return(0);); };
    forprime(x = 3, 499, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 11 2011
    
  • Python
    from sympy import isprime
    i = 1
    j = 1
    while j <= 2000:
        bi = bin(i)[2:]
        if isprime(i) and bi.count("1") > 1 + bi.count("0"):
            print(str(j) + " " + str(i))
            j += 1
        i += 1 # Indranil Ghosh, Feb 07 2017

A095314 Primes in whose binary expansion the number of 1 bits is > 2 + number of 0 bits.

Original entry on oeis.org

7, 23, 29, 31, 47, 59, 61, 79, 103, 107, 109, 127, 191, 223, 239, 251, 311, 317, 347, 349, 359, 367, 373, 379, 383, 431, 439, 443, 461, 463, 467, 479, 487, 491, 499, 503, 509, 607, 631, 701, 719, 727, 733, 743, 751, 757, 761, 823, 827, 829, 859
Offset: 1

Views

Author

Antti Karttunen, Jun 04 2004

Keywords

Crossrefs

Complement of A095315 in A000040. Subset of A095286. Subset: A095318. Cf. also A095334.

Programs

  • Maple
    f:= proc(n) local L,d,s;
        if not isprime(n) then return false fi;
        L:= convert(n,base,2);
        convert(L,`+`) > nops(L)/2+1
    end proc:
    select(f, [seq(i,i=3..1000,2)]); # Robert Israel, Oct 26 2023
  • Mathematica
    n1Q[p_]:=Module[{be=IntegerDigits[p,2]},Total[be]>2+Count[be,0]]; Select[ Prime[ Range[150]],n1Q] (* Harvey P. Dale, Oct 26 2022 *)
  • PARI
    B(x) = { nB = floor(log(x)/log(2)); b1 = 0; b0 = 0;
    for(i = 0, nB, if(bittest(x,i), b1++;, b0++;); );
    if(b1 > (2+b0), return(1);, return(0););};
    forprime(x = 2, 859, if(B(x), print1(x, ", "); ); );
    \\ Washington Bomfim, Jan 12 2011

A095730 Primes p whose Zeckendorf-expansion A014417(p) is palindromic.

Original entry on oeis.org

127, 197, 1949, 2137, 3323, 3821, 7253, 8117, 10243, 13183, 14947, 15131, 30941, 31721, 39607, 43691, 49207, 54773, 62213, 66413, 70141, 70429, 70607, 71089, 123457, 123923, 129023, 134039, 137699, 145391, 149381, 157219, 162523, 167759, 172357, 176237, 181253
Offset: 1

Views

Author

Antti Karttunen, Jun 12 2004

Keywords

Crossrefs

Intersection of A000040 and A094202. Cf. A095731 for number of occurrences. A095733 shows the corresponding Fibonacci-representations.

A095067 Number of fib010 primes (A095087) in range [2^n,2^(n+1)].

Original entry on oeis.org

0, 1, 0, 2, 1, 2, 4, 11, 23, 33, 59, 108, 205, 364, 709, 1368, 2546, 4789, 9111, 17259, 33075, 63340, 121467, 232396, 446774, 860552, 1659065, 3203164, 6187452, 11968853, 23171558, 44926416, 87186186, 169306460, 329138934
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A095060(n) - A095062(n).

Extensions

a(34)-a(35) from Amiram Eldar, Jun 13 2024

A095083 Fibodious primes, i.e., primes p whose Zeckendorf-expansion A014417(p) contains an odd number of 1-fibits.

Original entry on oeis.org

2, 3, 5, 13, 17, 19, 31, 41, 43, 59, 61, 71, 73, 79, 89, 103, 107, 113, 131, 151, 167, 173, 179, 181, 191, 197, 211, 227, 229, 233, 239, 251, 257, 269, 293, 307, 313, 347, 349, 353, 367, 383, 401, 419, 431, 433, 449, 457, 463, 467, 479, 487, 491
Offset: 1

Views

Author

Antti Karttunen, Jun 01 2004

Keywords

Crossrefs

Intersection of A000040 and A020899.

Programs

  • Mathematica
    Select[Flatten[Position[Mod[DigitCount[Select[Range[0, 5000], BitAnd[#, 2 #] == 0 &], 2, 1], 2], 1]] - 1, PrimeQ] (* Amiram Eldar, Feb 07 2023 *)
  • Python
    from sympy import fibonacci, primerange
    def a(n):
        k=0
        x=0
        while n>0:
            k=0
            while fibonacci(k)<=n: k+=1
            x+=10**(k - 3)
            n-=fibonacci(k - 1)
        return x
    def ok(n): return str(a(n)).count("1")%2
    print([n for n in primerange(1, 1001) if ok(n)]) # Indranil Ghosh, Jun 08 2017
Previous Showing 21-30 of 143 results. Next