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 11-13 of 13 results.

A255564 Primes having in binary representation a nonprime number of 1's.

Original entry on oeis.org

2, 23, 29, 43, 53, 71, 83, 89, 101, 113, 139, 149, 163, 197, 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, 887, 907, 937, 977, 983, 991, 1013, 1019, 1021, 1031, 1049, 1061
Offset: 1

Views

Author

Antti Karttunen, May 14 2015

Keywords

Comments

Equally: 2 followed by all primes with their hamming weight a composite number.

Examples

			2, which in binary (A007088) is "10", has just one 1-bit, and 1 is not a prime, thus 2 is included in the sequence.
23, which in binary is "10111", has four 1-bits, and 4 is not a prime, thus 23 is included in the sequence.
		

Crossrefs

Complement among primes: A081092.
Intersection of A000040 and A084345.
Subsequences: A027699 \ A019434, A085448, A095077, A255569.
Cf. A000120.

Programs

  • PARI
    i = 0; forprime(n=2, 2^31, if(!isprime(hammingweight(n)), i++; write("b255564.txt", i, " ", n); if(i>=10000,return(n))));
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library
    (define A255564 (MATCHING-POS 1 1 (lambda (n) (and (prime? n) (not (prime? (A000120 n)))))))

A348906 Squares with a square number of 1's in their binary expansion.

Original entry on oeis.org

0, 1, 4, 16, 64, 169, 225, 256, 676, 900, 1024, 2209, 2704, 3600, 4096, 5625, 7921, 8836, 10201, 10816, 12321, 13689, 14400, 16384, 19321, 20449, 22201, 22500, 23409, 26569, 27889, 28561, 29929, 30625, 31684, 32041, 35344, 38809, 40401, 40804, 43264, 49284, 52441
Offset: 1

Views

Author

Ctibor O. Zizka, Nov 03 2021

Keywords

Comments

If a number k is of the form 2^(2*r), r >= 0, then k is included in this sequence.

Examples

			225 is in the sequence because it is a square and the number of 1's in the binary expansion of 225 is 4 which is a square.
		

Crossrefs

Intersection of A000290 and A084561.

Programs

  • Maple
    q:= n-> issqr(add(i, i=Bits[Split](n))):
    select(q, [i^2$i=0..250])[];  # Alois P. Heinz, Nov 03 2021
  • Mathematica
    Select[Range[0, 300]^2, IntegerQ @ Sqrt[DigitCount[#, 2, 1]] &] (* Amiram Eldar, Nov 03 2021 *)
  • PARI
    isok(k) = issquare(k) && issquare(hammingweight(k)); \\ Michel Marcus, Nov 03 2021

A363464 Numbers k in A052294 with arithmetic derivative k' (A003415) in A052294.

Original entry on oeis.org

6, 9, 10, 14, 18, 20, 21, 22, 24, 25, 33, 34, 35, 38, 40, 42, 44, 48, 49, 52, 62, 65, 66, 68, 69, 70, 76, 80, 84, 88, 91, 93, 94, 96, 100, 104, 110, 115, 117, 118, 121, 132, 133, 134, 138, 140, 143, 144, 145, 148, 152, 155, 158, 164, 174, 182, 185, 186, 188, 192
Offset: 1

Views

Author

Marius A. Burtea, Jul 08 2023

Keywords

Comments

If p > 2 is in A092506 then m = 2*p and u = 4*p are terms. Indeed, if p = 2^k + 1, k >= 1, m = 2*(2^k + 1) = 2^(k+1) + 2^1 has two 1's in its binary expansion, and m' = p+2 = 2^k + 3 = 2^k + 2^1 + 1 has three 1's in its binary expansion. Similarly u = 4*(2^k + 1) = 2^(k+2) + 2^2 and u' = 4*p + 4 = 2^(k+2) + 2^3.
If p is in A057733 then the number m = 2*p is a term. Indeed, if p = 2^k + 3, k >= 1, m = 2*(2^k + 3) = 2^(k+1) + 2^2 + 2 has three 1's in its binary expansion, and m' = p+2 = 2^k + 5 = 2^k + 2^2 + 1 has three 1's in its binary expansion.
If p > 7 is in A057733 then the number m = 4*p is a term. Indeed, if p = 2^k + 3, k >= 3, m = 4*(2^k + 3) = 2^(k+2) + 2^3 + 2 has three 1's in its binary expansion, and m' = 4*(p + 1) = 4*(2^k + 4) = 2^(k+2) + 2^4 has two 1's in its binary expansion.
If p is in A123250 then the number m = 4*p is a term. Indeed, if p = 2^k + 5, k >= 1, m = 4*(2^k + 5) = 2^(k+2) + 2^4 + 2^2 has three 1's its binary expansion, and m' = 4*(p+1) = 4*(2^k + 6) = 2^(k+2) + 2^4 + 2^2 has three 1's in its binary expansion.
If p is in A104070 then the number m = 4*p is a term. Indeed, if p = 2^k + 9, k >= 1, m = 4*(2^k + 9) = 2^(k+2) + 2^5 + 2^2 has three 1's its binary expansion, and m' = 4*(p+1) = 4*(2^k + 10) = 2^(k+2) + 2^5 + 2^3 has three 1's in its binary expansion.

Examples

			6 = 110_2 has two 1's, 6' = 5 = 101_2 has two 1's, so 6 is a term.
9 = 101_2 has two 1's, 9' = 6 = 110_2 has two 1's, so 9 is a term.
10 = 1010_2 has two 1's, 10' = 7 = 111_2 has three 1's, so 10 is a term.
18 = 10010_2 has two 1's, 18' = 21 = 10101_2 has three 1's, so 18 is a term.
		

Crossrefs

Programs

  • Magma
    fp:=func; f:=func; [n:n in [1..200]| fp(n) and fp(Floor(f(n)))];
  • Mathematica
    pernQ[n_] := PrimeQ[DigitCount[n, 2, 1]]; d[0] = d[1] = 0; d[n_] := n*Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Range[200], And @@ pernQ[{#, d[#]}] &] (* Amiram Eldar, Jul 10 2023 *)
Previous Showing 11-13 of 13 results.