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.

A292874 Least k such that A039654(k) = prime(n).

Original entry on oeis.org

2, 3, 5, 7, 4, 13, 10, 19, 8, 29, 21, 37, 20, 43, 22, 34, 18, 61, 67, 9, 73, 57, 44, 40, 52, 101, 63, 85, 109, 74, 93, 86, 137, 76, 149, 91, 157, 163, 32, 173, 88, 117, 68, 193, 197, 199, 211, 84, 80, 229, 36, 104, 241, 96, 257, 102, 136
Offset: 1

Views

Author

M. F. Hasler, Sep 25 2017

Keywords

Comments

We have A039653(k) >= k, thus also A039654(k) >= k, with equality if k is prime, therefore a(n) <= prime(n), and the largest k for which A039654(k) = prime(n) is always k = prime(n).

Crossrefs

Programs

  • PARI
    a039654(n) = if(n<2, 0, my(m); while((m=sigma(n)-1)!=n, n=m); n);
    a(n) = my(k=0, p=prime(n)); while(a039654(k) != p, k++); k; \\ Michel Marcus, Sep 26 2017