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

A236695 The n-th prime with n 0-bits in its binary expansion.

Original entry on oeis.org

2, 43, 41, 139, 269, 773, 1049, 2309, 4357, 8737, 16673, 34819, 66569, 139393, 279553, 589829, 1051649, 2621569, 4260097, 9437189, 17039489, 33817601, 67649537, 167903233, 269484097, 545260033, 1074267137, 2155872769, 4311760897, 12884901893, 17184063521
Offset: 1

Views

Author

Irina Gerasimova, Jan 30 2014

Keywords

Examples

			Primes p(k) such that
A035103(p(k)) = 0: 3, 7, 31, 127, 8191,...
A035103(p(k)) = 1: 2, 5, 11, 13, 23, 29,...
A035103(p(k)) = 2: 19, 43, 53, 79, 103, 107,...
A035103(p(k)) = 3: 17, 37, 41, 71, 83, 89, 101,...
A035103(p(k)) = 4: 67, 73, 97, 139, 149, 163,...
A035103(p(k)) = 5: 131, 137, 193, 263, 269, 277,...
		

Crossrefs

Cf. A066195 (least prime having n zeros in binary), A236513 (the n-th prime with n 1-bits in its binary expansion).

Programs

  • PARI
    nz(n)=#binary(n)-hammingweight(n)
    a(n)=my(k=n);forprime(p=2,,if(nz(p)==n&&k--==0,return(p))) \\ Charles R Greathouse IV, Feb 04 2014

Extensions

New name from Ralf Stephan and Charles R Greathouse IV, Feb 04 2014
a(14)-a(27) from Charles R Greathouse IV, Feb 04 2014
a(28)-a(31) from Giovanni Resta, Feb 04 2014

A102566 a(n) = {minimal k such that f^k(prime(n)) = 1} where f(m) = (m+1)/2^r, 2^r is the highest power of two dividing m+1.

Original entry on oeis.org

2, 1, 2, 1, 2, 2, 4, 3, 2, 2, 1, 4, 4, 3, 2, 3, 2, 2, 5, 4, 5, 3, 4, 4, 5, 4, 3, 3, 3, 4, 1, 6, 6, 5, 5, 4, 4, 5, 4, 4, 4, 4, 2, 6, 5, 4, 4, 2, 4, 4, 4, 2, 4, 2, 8, 6, 6, 5, 6, 6, 5, 6, 5, 4, 5, 4, 5, 6, 4, 4, 6, 4, 3, 4, 3, 2, 6, 5, 6, 5, 5, 5, 3, 5, 3, 3, 6, 5, 4, 3, 4, 2, 3, 3, 3, 2, 2, 8, 7, 6, 7, 6, 6, 6, 5
Offset: 1

Views

Author

Yasutoshi Kohmoto, Feb 25 2005

Keywords

Comments

A066195(n+1) is the prime corresponding to the first n in this sequence. - David Wasserman, Apr 08 2008

Examples

			f(f(f(f(17)))) = 1, prime(7) = 17, so a(7) = 4.
prime(16) = 53 = (2*27-1) = (2*(2^2*7-1)-1) = (2*(2^2*(2^3*1-1)-1)-1), has 3 levels, so a(16) = 3.
		

Crossrefs

Programs

  • PARI
    f(n) = (n+1)/2^(valuation(n+1, 2));
    a(n) = {my(k = 1, p = prime(n)); while((q=f(p)) != 1, k++; p = q); k;} \\ Michel Marcus, Nov 20 2016
    
  • PARI
    a(n) = my(p=prime(n)); 2 + logint(p, 2) - hammingweight(p); \\ Kevin Ryde, Nov 06 2023

Formula

a(n) = A023416(prime(n)) + 1. - David Wasserman, Apr 08 2008
a(n) = A035103(n) + 1. - Filip Zaludek, Nov 19 2016

Extensions

More terms from David Wasserman, Apr 08 2008
Previous Showing 11-12 of 12 results.