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.

A152819 "Upper primes" (see A152754).

Original entry on oeis.org

2, 11, 37, 41, 43, 47, 59, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 227, 229, 233, 239, 251, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727
Offset: 1

Views

Author

Vladimir Shevelev, Dec 13 2008

Keywords

Crossrefs

Cf. A152754.

Programs

  • Mathematica
    fh[n_,h_] := If[h==1, Mod[n,2], If[Mod[n,4]>=2,1,0]]; half[n_, h_ ] := Module[{t=1, s=0, m=n}, While[m>0, s += fh[m,h]*t; m=Quotient[m,4]; t *= 2]; s]; mb[n_] := FromDigits[Riffle[IntegerDigits[n, 2], 0], 2]; aQ[n_] := PrimeQ[n] && mb[half[ n,1]] < mb[half[n, 2]]; Select[Range[730], aQ] (* Amiram Eldar, Dec 16 2018 from the PARI code *)
  • PARI
    a000695(n) = fromdigits(binary(n), 4);
    half1(n) = { my(t=1, s=0); while(n>0, s += (n%2)*t; n \= 4; t *= 2); (s); }; \\ A059905
    half2(n) = { my(t=1, s=0); while(n>0, s += ((n%4)>=2)*t; n \= 4; t *= 2); (s); }; \\ A059906
    isok(n) = isprime(n) && a000695(half1(n)) < a000695(half2(n)); \\ Michel Marcus, Dec 15 2018

Extensions

More terms from Michel Marcus, Dec 15 2018

A152820 Non-upper primes (see A152754).

Original entry on oeis.org

3, 5, 7, 13, 17, 19, 23, 29, 31, 53, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 193, 197, 199, 211, 223, 241, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419
Offset: 1

Views

Author

Vladimir Shevelev, Dec 13 2008

Keywords

Crossrefs

Extensions

More terms from Amiram Eldar, Sep 12 2019

A152810 Let the binary expansion of n be n = Sum_{k} 2^{r_k}, let e(n) be the number of r_k's that are even, o(n) the number that are odd; sequence gives odd n such that e(n) > o(n) and e(n)-o(n) == 1 or 2 (mod 6).

Original entry on oeis.org

1, 5, 7, 13, 17, 19, 23, 25, 29, 31, 37, 49, 53, 55, 61, 65, 67, 71, 73, 77, 79, 83, 89, 91, 95, 97, 101, 103, 109, 113, 115, 119, 121, 125, 127, 133, 145, 149, 151, 157, 181, 193, 197, 199, 205, 209, 211, 215, 217, 221, 223, 229, 241, 245, 247, 253, 257, 259
Offset: 1

Views

Author

Vladimir Shevelev, Dec 13 2008

Keywords

Comments

Primes in the sequence are not in A065049.

Crossrefs

Programs

  • Mathematica
    aQ[n_] := Module[{d = Reverse[IntegerDigits[n, 2]]}, e = Total@d[[1 ;; -1 ;; 2]]; o = Total@d[[2 ;; -1 ;; 2]]; e > o && MemberQ[{1, 2}, Mod[e - o, 6]]]; Select[Range[1, 260, 2], aQ] (* Amiram Eldar, Sep 12 2019 *)

Extensions

More terms from Amiram Eldar, Sep 12 2019
Showing 1-3 of 3 results.