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

A033549 Numbers k such that sum of digits of k-th prime equals sum of digits of k.

Original entry on oeis.org

32, 56, 88, 175, 176, 182, 212, 218, 227, 248, 293, 295, 323, 331, 338, 362, 377, 386, 394, 397, 398, 409, 439, 446, 457, 481, 499, 508, 563, 571, 595, 599, 635, 637, 655, 671, 728, 751, 752, 755, 761, 767, 779, 820, 821, 826, 827, 847, 848, 857, 869, 878
Offset: 1

Views

Author

Calculated by Jud McCranie

Keywords

Comments

A090431(a(n)) = 0, A007953(a(n)) = A007605(a(n)).

Examples

			131 is the 32nd prime and sum of digits of both is 5.
		

References

Crossrefs

Programs

  • Haskell
    a033549 n = a033549_list !! (n-1)
    a033549_list = filter ((== 0) . a090431) [1..]
    -- Reinhard Zumkeller, Mar 16 2014
    
  • Mathematica
    Select[Range[1000],Total[IntegerDigits[#]]==Total[IntegerDigits[ Prime[#]]]&] (* Harvey P. Dale, May 05 2011 *)
  • PARI
    is(n,p=prime(n))=sumdigits(n)==sumdigits(p) \\ Charles R Greathouse IV, Feb 07 2017
    
  • Python
    from sympy.ntheory.factor_ import digits
    from sympy import prime
    print([n for n in range(1, 1001) if sum(digits(n)[1:])==sum(digits(prime(n))[1:])]) # Indranil Ghosh, Jun 27 2017

A072439 Primes prime(k) such that the number of binary 1's in prime(k) equals the number of binary 1's in k.

Original entry on oeis.org

2, 5, 41, 67, 73, 83, 97, 113, 193, 197, 211, 269, 281, 283, 353, 389, 521, 523, 547, 563, 587, 593, 601, 647, 661, 691, 929, 937, 1061, 1063, 1097, 1109, 1117, 1123, 1289, 1319, 1361, 1381, 1489, 1549, 1559, 1567, 1571, 1579, 1597, 1801, 1873, 2069
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2002

Keywords

Examples

			In binary representation 13 and A000040(13)=41 have three 1's: 13='1101' and 41='101001', therefore 41 is a term.
		

Crossrefs

Programs

  • Mathematica
    Prime[Select[Range[400], DigitCount[#, 2, 1] == DigitCount[Prime[#], 2, 1] &]] (* Amiram Eldar, Aug 03 2023 *)
  • PARI
    isok(p) = isprime(p) && ((hammingweight(p) == hammingweight(primepi(p)))); \\ Michel Marcus, Jun 14 2021

Formula

A000120(a(n)) = A000120(A071600(n)) = A014499(n).
A090455(A049084(a(n))) = 0.
a(n) = A000040(A071600(n)).

A090455 Difference between numbers of binary 1's of n and binary 1's of n-th prime.

Original entry on oeis.org

0, -1, 0, -2, -1, -1, 1, -2, -2, -2, -2, -1, 0, -1, -1, -3, -3, -3, 0, -2, 0, -2, 0, -2, 0, -1, -1, -2, -1, 0, -2, -2, -1, -2, -1, -3, -2, -1, -1, -3, -2, -2, -3, 0, 0, -1, 0, -5, -2, -2, -1, -4, -1, -3, 3, -1, 0, -1, 1, 0, 0, 1, 1, -5, -3, -4, -2, -2, -3, -3, 0, -4, -4, -3
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 01 2003

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DigitCount[n,2,1]-DigitCount[Prime[n],2,1],{n,80}] (* Harvey P. Dale, Aug 08 2013 *)

Formula

a(n) = A000120(n) - A014499(n);
a(A071600(n)) = a(A049084(A072439(n))) = 0.
a(A049084(A090456(n))) < 0.
a(A049084(A090457(n))) > 0.

Extensions

Definition clarified by Harvey P. Dale, Aug 08 2013

A072577 Numbers k such that k and the k-th prime have the same number of 0's in their binary representation.

Original entry on oeis.org

5, 6, 20, 22, 24, 28, 31, 32, 34, 37, 41, 42, 49, 50, 67, 68, 81, 82, 84, 88, 89, 93, 94, 138, 139, 140, 141, 142, 143, 147, 151, 157, 165, 192, 194, 198, 200, 202, 206, 207, 232, 236, 241, 262, 265, 270, 271, 284, 285, 295, 301, 328, 329, 332, 333, 337
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Examples

			In binary representation 20 and A000040(20) = 71 have three 0's: 13 = '10100' and 71 = '1000111', therefore 20 is a term.
		

Crossrefs

Programs

  • Mathematica
    q[k_] := DigitCount[k, 2, 0] == DigitCount[Prime[k], 2, 0]; Select[Range[350], q] (* Amiram Eldar, Jul 28 2025 *)

Formula

A023416(a(n)) = A023416(A072580(n)) = A035103(n).
a(n) = A049084(A072580(n)).

A072578 In binary representation: k has the same number of 0's as the k-th prime has 1's.

Original entry on oeis.org

8, 16, 34, 44, 64, 65, 80, 106, 116, 128, 138, 140, 174, 178, 184, 193, 196, 209, 258, 259, 260, 263, 264, 266, 272, 280, 288, 290, 314, 316, 325, 326, 327, 328, 330, 338, 344, 385, 391, 402, 449, 514, 520, 521, 528, 544, 566, 570, 574, 578, 587, 590, 597
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Examples

			In binary representation 80 = '1010000' has five 0's and A000040(80) = 409 = '110011001' has five 1's: therefore 80 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[600],DigitCount[#,2,0]==DigitCount[Prime[#],2,1]&] (* Harvey P. Dale, Jan 07 2014 *)

Formula

A000120(A072581(n)) = A023416(a(n)) = A014499(n).
a(n) = A049084(A072581(n)).

A072579 In binary representation: k has the same number of 1's as the k-th prime has 0's.

Original entry on oeis.org

1, 7, 13, 26, 37, 41, 42, 45, 49, 50, 58, 59, 62, 69, 70, 74, 78, 79, 87, 103, 105, 107, 110, 114, 118, 121, 134, 139, 141, 142, 145, 147, 158, 161, 162, 164, 165, 168, 175, 185, 189, 198, 202, 203, 213, 214, 223, 227, 232, 234, 243, 267, 275, 282, 289, 292
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Examples

			In binary representation 70 = '1000110' has three 1's and A000040(70) = 349 = '101011101' has three 1's: therefore 70 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[300],DigitCount[#,2,1]==DigitCount[Prime[#],2,0]&] (* Harvey P. Dale, May 02 2012 *)

Formula

A023416(A072582(n)) = A000120(a(n)) = A035103(n).
a(n) = A049084(A072582(n)).

A072583 Numbers k with the property that there is no match when comparing the numbers of 0's and 1's in the binary representations of k and the k-th prime.

Original entry on oeis.org

2, 4, 9, 10, 11, 12, 14, 15, 17, 18, 27, 29, 33, 35, 36, 38, 39, 40, 43, 46, 48, 51, 52, 53, 54, 55, 56, 63, 66, 72, 73, 75, 76, 83, 85, 86, 90, 91, 92, 95, 96, 97, 100, 102, 104, 109, 111, 112, 113, 115, 117, 119, 120, 122, 123, 124, 126, 127, 129, 130, 131, 132, 133
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

In other words, A000120(k) <> A000120(A000040(k)) and A000120(k) <> A023416(A000040(k)) and A023416(k) <> A000120(A000040(k)) and A023416(k) <> A023416(A000040(k)).
A000120(k) <> A014499(k) and A000120(k) <> A035103(k) and A023416(k) <> A014499(k) and A023416(k) <> A035103(k).

Examples

			k = 40 = '101000', A000040(40) = 173 = '10101101'.
		

Crossrefs

Programs

  • Mathematica
    With[{m = 150}, Select[Transpose[{Range[m], Prime[Range[m]]}], Intersection @@ DigitCount[#, 2] == {} &]][[;; , 1]] (* Amiram Eldar, Jul 28 2025 *)

Formula

a(n) = A049084(A072584(n)).

A345335 Primes p such that A014499(k) / A000120(k) is an integer, where k = A000720(p).

Original entry on oeis.org

2, 3, 5, 7, 19, 23, 29, 41, 53, 67, 71, 73, 83, 89, 97, 113, 131, 139, 193, 197, 211, 269, 281, 283, 311, 317, 337, 347, 349, 353, 359, 373, 389, 479, 503, 521, 523, 547, 563, 587, 593, 601, 647, 661, 691, 719, 739, 839, 857, 863, 881, 887, 929, 937, 983, 1013
Offset: 1

Views

Author

Ctibor O. Zizka, Jun 14 2021

Keywords

Comments

A014499(k) / A000120(k) = 1 gives A072439.

Examples

			prime(8) = 19, A014499(8)/A000120(8) = 3, thus 19 is a term.
		

Crossrefs

Programs

  • Maple
    R:= NULL: p:= 1: count:= 0:
    for n from 1 while count < 100 do
      p:= nextprime(p);
      if convert(convert(p,base,2),`+`) mod convert(convert(n,base,2),`+`) = 0 then R:= R,p; count:= count+1 fi;
    od:
    R; # Robert Israel, Apr 21 2025
  • Mathematica
    Select[Range[1000], PrimeQ[#] && Divisible @@ DigitCount[{#, PrimePi[#]}, 2, 1] &] (* Amiram Eldar, Jun 14 2021 *)
  • PARI
    isok(p) = isprime(p) && ((hammingweight(p) % hammingweight(primepi(p))) == 0); \\ Michel Marcus, Jun 14 2021
Showing 1-8 of 8 results.