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.

A024620 Positions of primes among the powers of primes (A000961).

This page as a plain text file.
%I A024620 #36 Nov 05 2024 20:39:51
%S A024620 2,3,5,6,9,10,12,13,14,17,18,20,21,22,23,25,26,27,29,30,31,32,34,35,
%T A024620 36,37,38,39,40,41,44,46,47,48,49,50,51,52,53,55,56,57,58,59,60,61,62,
%U A024620 63,64,65,66,67,68,70,72,73,74,75,76,77,78,80,81,82,83,84,85,86,88,89,90,91,93,94
%N A024620 Positions of primes among the powers of primes (A000961).
%H A024620 Reinhard Zumkeller, <a href="/A024620/b024620.txt">Table of n, a(n) for n = 1..10000</a>
%F A024620 A025474(a(n)) = 1. - _Reinhard Zumkeller_, May 01 2015
%F A024620 a(n) = A001222(A056604(n)) + 1. - _Eric Desbiaux_, Dec 02 2018
%F A024620 From _Ridouane Oudra_, Oct 18 2020: (Start)
%F A024620 a(n) = A027883(n) + 1;
%F A024620 a(n) = A025528(A000040(n)) + 1;
%F A024620 a(n) = A065515(A000040(n)). (End)
%t A024620 a[n_] := PrimeOmega[LCM @@ Range@Prime@n] + 1; Array[a, 100] (* _Amiram Eldar_, Dec 02 2018 *)
%o A024620 (PARI) lista(nn) = my(powpr = select((i->((omega(i)==1) || (i==1))), [1..nn])); for (i = 1, #powpr, if (isprime(powpr[i]), print1(i, ", ")); ); \\ _Michel Marcus_, Jun 03 2021
%o A024620 (Haskell)
%o A024620 a024620 n = a024620_list !! (n-1)
%o A024620 a024620_list = filter ((== 1) . a025474) [1..]
%o A024620 -- _Reinhard Zumkeller_, May 01 2015
%o A024620 (Python)
%o A024620 from sympy import prime, primepi, integer_nthroot
%o A024620 def A024620(n):
%o A024620     x = prime(n)
%o A024620     return n+1+sum(primepi(integer_nthroot(x,k)[0]) for k in range(2,x.bit_length())) # _Chai Wah Wu_, Nov 05 2024
%Y A024620 Complement of A024621.
%Y A024620 Cf. A001222 (bigomega), A025474, A056604, A027883.
%Y A024620 Cf. A025528, A065515, A000040.
%K A024620 nonn
%O A024620 1,1
%A A024620 _Clark Kimberling_