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.

A374330 a(n) is the number of numbers k <= prime(n)^2 such that A075860(k) = prime(n).

Original entry on oeis.org

2, 2, 6, 8, 2, 10, 3, 14, 6, 8, 22, 7, 8, 21, 9, 14, 12, 45, 14, 17, 45, 17, 21, 20, 18, 17, 64, 21, 54, 28, 25, 22, 22, 72, 37, 82, 26, 28, 31, 43, 36, 93, 44, 95, 38, 95, 41, 38, 33, 106, 36, 49, 111, 65, 53, 53, 49, 113, 55, 68, 138, 80, 49, 50, 152, 61, 55, 43, 73, 120
Offset: 1

Views

Author

Rafik Khalfi, Jul 04 2024

Keywords

Comments

For all n>=1, a(n)>=2.

Examples

			For n=3, prime(3)=5. The only integers k <= 5^2 such that A075860(k)=5 are 5,6,12,18,24 and 25. Therefore a(3)=6.
		

Crossrefs

Programs

  • Maple
    f := proc (n)
        option remember;
        if isprime(n) then
            return n
        else
            return procname(convert(numtheory:-factorset(n), `+`))
        end if
    end proc:
    g := proc (n)
        local count, k;
        count := 0;
        for k from ithprime(n) to ithprime(n)^2 do
            if f(k) = ithprime(n) then
                count := count + 1
            end if
        end do;
        return count
    end proc:
    map(g, [$1 .. 80]);
  • PARI
    fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
    f(n) = if (n==1, 0, fp(n, 0)); \\ A075860
    a(n) = sum(k=1, prime(n)^2, f(k) == prime(n)); \\ Michel Marcus, Jul 04 2024