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.

A100394 a(n) is the subscript of the greatest prime factor of (2*prime(n) + 1).

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Labos Elemer, Dec 16 2004

Keywords

Examples

			For n = 1: q = prime(1) = 2; 2*q + 1 = 5; A006530(5) = 5, pi(5) = 3 = a(1).
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).
		

Crossrefs

Programs

  • Maple
    f:= n -> numtheory:-pi(max(numtheory:-factorset(2*ithprime(n)+1))):
    map(f, [$1..100]); # Robert Israel, Jul 08 2018
  • Mathematica
    a[n_] := PrimePi[FactorInteger[2*Prime[n]+1][[-1, 1]]]; Array[a, 100] (* Amiram Eldar, Mar 13 2025 *)
  • PARI
    a(n) = primepi(vecmax(factor(2*prime(n) + 1)[,1])); \\ Michel Marcus, Jul 09 2018; corrected Jun 14 2022

Formula

a(n) = A000720(A006530(2*A000040(n) + 1)) = A000720(A023590(n)).