Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #25 Jun 03 2024 08:53:12
%S 1,3,6,25,104,634,1236,22613,103409,929044,6298419,80396036,843325558,
%T 5843115733,24428345613,515211289906,4021634909249,77930896716918,
%U 387592118891917,53467625139656294,258820291307490689,2600667638804262010,29899374277934530878
%N Indices of the primes that occur in A104589.
%e The primes in A104589 are 2, 5, 13, 97, ... with prime indices 1, 3, 6, 25, ...
%t s[1] = 1; s[n_] := s[n] = s[n - 1] + Sum[If[CompositeQ[s[k]], 0, s[k]], {k, 1, n - 1}]; PrimePi[Select[s /@ Range[200], PrimeQ[#] &]] (* _Amiram Eldar_, Jul 21 2022 *)
%o (PARI) lista(nn) = my(last=1, s = 1, list = List()); for (n=2, nn, last += s; if (isprime(last), s += last; listput(list, primepi(last)));); Vec(list);
%o (Python)
%o from sympy import isprime, primepi
%o from itertools import islice
%o def A355967_gen(): # generator of terms
%o a, b = 1, 1
%o while True:
%o a += b
%o if isprime(a):
%o b += a
%o yield primepi(a)
%o A355967_list = list(islice(A355967_gen(),14)) # _Chai Wah Wu_, Jun 03 2024
%Y Cf. A000040, A000720, A104589, A355958.
%K nonn
%O 1,2
%A _Michel Marcus_, Jul 21 2022
%E a(14)-a(20) from _Amiram Eldar_, Jul 21 2022
%E a(21)-a(23) from _Chai Wah Wu_, Jun 03 2024