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.

A322614 Smallest k such that A305445(k) = n, i.e., smallest k > 1 such that the minimum number of bit inversions required to convert k into a prime equals n.

Original entry on oeis.org

2, 4, 8, 84, 45812984490
Offset: 0

Views

Author

Felix Fröhlich, Dec 20 2018

Keywords

Comments

Does a(n) exist for every n?

Crossrefs

Cf. A305445.

Programs

  • PARI
    a305445(n) = my(b, L, N, s, v); if(n < 2, , if(isprime(n), 0, b = binary(n); L = #b; for(j = 1, L, v = vector(j, Y, [1, L]); forvec(X = v, N = n + sum(k = 1, j, if(b[X[k]], s = -1, s = 1); s*2^(L - X[k])); if(isprime(N), return(j)), 2)))) \\ after Rick L. Shepherd in A305445
    a(n) = for(k=2, oo, if(a305445(k)==n, return(k)))

Extensions

a(4) from Giovanni Resta, Jan 03 2019