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 31-37 of 37 results.

A177801 Record lengths of chains of consecutive evil primes, starting with A177748(n).

Original entry on oeis.org

2, 3, 5, 7, 8, 12, 16, 20, 23, 25, 26, 30, 31, 32, 34, 38, 39, 40, 41, 42, 44
Offset: 1

Views

Author

Vladimir Shevelev, Dec 12 2010

Keywords

Comments

In contrast to the sequence of all positive integers, where the length of every chain of consecutive evil numbers cannot exceed 2, we conjecture that for the sequence of primes such length is not bounded with growth of n.

Crossrefs

Cf. A177800 (odious version), A177748, A177798, A000069, A001969, A027697, A027699.

Programs

  • PARI
    {l=0;r=0; forprime( p=1, default(primelimit), if( bittest( norml2(binary(p)),0), l>r & print1(r=l ", "); l & l=0, l++))} \\ M. F. Hasler, Dec 12 2010

Extensions

Extended by D. S. McNeil, Dec 12 2010
a(18)-a(21) from Amiram Eldar, Dec 09 2020

A234999 Primes p such that the p-th evil number is prime; 2 together with evil primes p such that 2p - 1 is prime.

Original entry on oeis.org

2, 3, 139, 337, 547, 619, 691, 811, 937, 1237, 1297, 1399, 1429, 2089, 2179, 2221, 2281, 2467, 2539, 2617, 2707, 2719, 2791, 2851, 3019, 3067, 3499, 3739, 3769, 4027, 4177, 4357, 4447, 4567, 4951, 5431, 5479, 5557, 5581, 5749, 6037, 6229, 6379, 6421, 6691, 6841, 7507
Offset: 1

Views

Author

Keywords

Comments

This sequence is the intersection of A005382 and A027699.

Examples

			2 is a prime and A001969(2) = 3, a prime also, thus 2 is in this sequence; 3 is a prime and A001969(3) = 5, a prime also, thus 3 is in this sequence; 139 is a prime A001969(139) = 277, a prime also, thus 139 is this sequence.
		

Crossrefs

Programs

Extensions

a(28) inserted by Charles R Greathouse IV, Jan 02 2014

A384427 Evil numbers that are not a multiple of any other evil number.

Original entry on oeis.org

3, 5, 17, 23, 29, 43, 53, 71, 77, 83, 89, 101, 113, 139, 149, 163, 169, 197, 209, 257, 263, 269, 277, 281, 287, 293, 311, 317, 329, 337, 343, 347, 349, 353, 359, 373, 383, 389, 401, 407, 413, 427, 449, 461, 467, 469, 479, 503, 509, 523, 533, 547, 553, 571, 593, 599
Offset: 1

Views

Author

Francisco J. Muñoz, May 28 2025

Keywords

Crossrefs

Union of A217790 and A027699.

Programs

  • Maple
    isevil:= proc(n) convert(convert(n,base,2),`+`)::even end proc:
    N:= 1000: # for terms <= N
    V:= Vector(N,1):
    for i from 1 to N do
        if isevil(i) then V[[seq(j,j=2*i .. N, i)]]:= 0
        else V[i]:= 0
        fi
    od:
    select(t -> V[t]=1, [$1..N]); # Robert Israel, Jun 18 2025
  • Mathematica
    evilQ[n_] := EvenQ[DigitCount[n, 2, 1]]; q[n_] := evilQ[n] && AllTrue[Divisors[n], # == n || ! evilQ[#] &]; Select[Range[600], q] (* Amiram Eldar, May 31 2025 *)
  • PARI
    isevil(n) = hammingweight(n) % 2 == 0;
    noevildiv(n) = {fordiv(n, d, if ((d < n) && isevil(d), return (0)); ); 1; }
    isok(n) = isevil(n) && noevildiv(n); \\ Michel Marcus, May 31 2025

A385126 Hereditarily evil prime powers: numbers of the form p^k where p is prime and p^j is evil for 1 <= j <= k.

Original entry on oeis.org

3, 5, 9, 17, 23, 27, 29, 43, 53, 71, 83, 89, 101, 113, 139, 149, 163, 197, 257, 263, 269, 277, 281, 293, 311, 317, 337, 347, 349, 353, 359, 373, 383, 389, 401, 449, 461, 467, 479, 503, 509, 523, 547, 571, 593, 599, 619, 643, 673, 683, 691, 739, 751, 773, 797, 811, 821, 839, 853, 857, 863, 881
Offset: 1

Views

Author

Robert Israel, Jun 18 2025

Keywords

Examples

			a(6) = 27 is a term because 3, 9 and 27 are all evil.
The first term that is a fourth power is 277^4 = 5887339441.
The first term that is a fifth power is 317^5 = 3201078401357.
		

Crossrefs

Cf. A001969.
Contains A027699.

Programs

  • Maple
    isevil:= proc(n) convert(convert(n,base,2),`+`)::even end proc:
    M:= 1000: # for terms <= M
    R:= NULL:
    p:= 1:
    do
      p:= nextprime(p);
      if p > M then break fi;
      for k from 1 do
        z:= p^k;
        if z > M then break fi;
        if isevil(z) then R:= R, z
        else break
        fi
      od
    od:
    sort([R]);

A235985 Primes p such that 3p-1 has even Hamming weight.

Original entry on oeis.org

2, 7, 23, 29, 31, 71, 103, 107, 109, 113, 127, 151, 157, 167, 199, 227, 229, 233, 263, 283, 313, 347, 349, 359, 367, 373, 379, 383, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 541, 569, 599, 607, 619, 631, 647, 739, 761, 797
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jan 17 2014

Keywords

Comments

Primes p such that A000120(3p-1) is even.
Smallest prime p such that A000120(np-1) is even: 7, 2, 2, 7, 5, 3, 3, 2, 2, 3, 5, 2, 7,...

Examples

			23 is in this sequence because A000120(3*23-1) = A000120(68) = 2 (even number).
29 is in this sequence because A000120(3*29-1) = A000120(86) = 4 (even number).
		

Crossrefs

Cf. A019434 (odd primes p having Hamming weight 2), A027697 (primes p having odd Hamming weight), A027699 (primes p having an even Hamming weight).

Programs

  • Mathematica
    Select[Prime@Range@200, EvenQ@ First@ DigitCount[3#-1, 2] &] (* Giovanni Resta, Jan 26 2014 *)
  • PARI
    isok(p) = isprime(p) && !(hammingweight(3*p-1) % 2); \\ Michel Marcus, Jan 18 2014

A269458 Primes p such that the numbers of negabinary evil primes and negabinary odious primes not exceeding p are equal (see comment).

Original entry on oeis.org

3, 53, 61, 71, 89, 101, 107, 7121, 7129, 7159, 7187, 424891, 29739371, 29740511, 29740523, 29740723, 1844046469, 1844046481, 1844046517, 1844046571, 1844046629, 1844046679, 1844046733, 1844046793, 1844046851, 1844047357, 1844047421, 1844047501, 1845540199, 1847154073, 1847154109
Offset: 1

Views

Author

Vladimir Shevelev, Feb 27 2016

Keywords

Comments

Negabinary evil and odious primes are primes in A268272 and A268273 correspondingly.
They are 2,5,7,13,17,19,31,37,61,67,73,79,...
and 3,11,23,29,41,43,47,53,59,71,83,89,...
In contrast to the analogous sequences for odious and evil primes (A027697, A027699), which, as we conjecture, consists of only primes 3,7,29 (see also our 2007-conjecture in A027697, A027699), here we conjecture that the sequence is infinite.

Crossrefs

Programs

  • Mathematica
    aQ[n_] := EvenQ @ Total @ Rest @ Reverse @ Mod[NestWhileList[(# - Mod[#, 2])/-2 &, n, # != 0 &], 2]; s = {}; p = 2; c = 0; Do[If[aQ[p], c++, c--]; If[c == 0, AppendTo[s, p]]; p = NextPrime[p], {10^3}]; s (* Amiram Eldar, Sep 22 2019 after Michael De Vlieger at A268272 *)

Extensions

More terms from Peter J. C. Moses, Feb 27 2016
More terms from Amiram Eldar, Sep 22 2019

A361071 Let c1(p) be the number of primes <= p with an odd number of 1's in base 2, and let c2(p) be the number of primes <= p with an even number of 1's in base 2. a(n) is the least prime p such that abs(c1(p) - c2(p)) >= n.

Original entry on oeis.org

2, 13, 41, 61, 67, 79, 109, 131, 137, 173, 179, 181, 191, 193, 211, 223, 227, 229, 233, 239, 241, 251, 587, 613, 617, 641, 653, 659, 661, 719, 727, 733, 761, 769, 829, 953, 967, 971, 1009, 1021, 1039, 1069, 1087, 1193, 1201, 1213, 1697, 1721, 1753, 1759, 1777, 1783, 1787
Offset: 1

Views

Author

Jean-Marc Rebert, Mar 01 2023

Keywords

Examples

			a(1) = 2, because c1(2) = 1 and c2(2) = 0, so abs(c1(2) - c2(2)) = 1 >= 1, and no lesser prime satisfies this.
		

Crossrefs

Programs

  • PARI
    { r = 0; n = 1; forprime (p = 2, 1787, r += (-1)^hammingweight(p); if (n==abs(r), print1 (p", "); n++;);); } \\ Rémy Sigrist, Mar 01 2023
Previous Showing 31-37 of 37 results.