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.
%I A100394 #24 Mar 13 2025 08:55:28 %S A100394 3,4,5,3,9,2,4,6,15,17,4,3,23,10,8,28,7,13,3,6,4,16,39,41,6,10,9,14, %T A100394 21,49,7,56,5,11,9,26,4,29,19,69,72,5,76,14,22,8,15,35,6,7,91,92,9,96, %U A100394 27,11,5,42,12,103,4,107,13,24,8,31,7,3,34,51,26,128,4,23,9,17,13,16,21,6 %N A100394 a(n) is the subscript of the greatest prime factor of (2*prime(n) + 1). %H A100394 Robert Israel, <a href="/A100394/b100394.txt">Table of n, a(n) for n = 1..10000</a> %F A100394 a(n) = A000720(A006530(2*A000040(n) + 1)) = A000720(A023590(n)). %e A100394 For n = 1: q = prime(1) = 2; 2*q + 1 = 5; A006530(5) = 5, pi(5) = 3 = a(1). %e A100394 For n = 25: q = prime(25) = 97; 2*q + 1 = 195 = 3*5*13, whose greatest prime factor is 13, of which the subscript = pi(13) = 6 = a(25). %p A100394 f:= n -> numtheory:-pi(max(numtheory:-factorset(2*ithprime(n)+1))): %p A100394 map(f, [$1..100]); # _Robert Israel_, Jul 08 2018 %t A100394 a[n_] := PrimePi[FactorInteger[2*Prime[n]+1][[-1, 1]]]; Array[a, 100] (* _Amiram Eldar_, Mar 13 2025 *) %o A100394 (PARI) a(n) = primepi(vecmax(factor(2*prime(n) + 1)[,1])); \\ _Michel Marcus_, Jul 09 2018; corrected Jun 14 2022 %Y A100394 Cf. A000040, A000720, A006530, A023590. %K A100394 nonn %O A100394 1,1 %A A100394 _Labos Elemer_, Dec 16 2004