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).

This page as a plain text file.
%I A374330 #8 Jul 23 2024 21:44:53
%S A374330 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,
%T A374330 64,21,54,28,25,22,22,72,37,82,26,28,31,43,36,93,44,95,38,95,41,38,33,
%U A374330 106,36,49,111,65,53,53,49,113,55,68,138,80,49,50,152,61,55,43,73,120
%N A374330 a(n) is the number of numbers k <= prime(n)^2 such that A075860(k) = prime(n).
%C A374330 For all n>=1, a(n)>=2.
%e A374330 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.
%p A374330 f := proc (n)
%p A374330     option remember;
%p A374330     if isprime(n) then
%p A374330         return n
%p A374330     else
%p A374330         return procname(convert(numtheory:-factorset(n), `+`))
%p A374330     end if
%p A374330 end proc:
%p A374330 g := proc (n)
%p A374330     local count, k;
%p A374330     count := 0;
%p A374330     for k from ithprime(n) to ithprime(n)^2 do
%p A374330         if f(k) = ithprime(n) then
%p A374330             count := count + 1
%p A374330         end if
%p A374330     end do;
%p A374330     return count
%p A374330 end proc:
%p A374330 map(g, [$1 .. 80]);
%o A374330 (PARI) fp(n, pn) = if (n == pn, n, fp(vecsum(factor(n)[, 1]), n));
%o A374330 f(n) = if (n==1, 0, fp(n, 0)); \\ A075860
%o A374330 a(n) = sum(k=1, prime(n)^2, f(k) == prime(n)); \\ _Michel Marcus_, Jul 04 2024
%Y A374330 Cf. A001248, A075860.
%K A374330 nonn
%O A374330 1,1
%A A374330 _Rafik Khalfi_, Jul 04 2024