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.

A100395 The smallest prime number q such that the greatest prime divisor of 2*q+1 equals the n-th prime.

This page as a plain text file.
%I A100395 #15 Aug 08 2020 11:29:44
%S A100395 13,2,3,5,19,59,47,11,43,139,277,61,107,23,79,29,457,167,461,109,197,
%T A100395 41,311,727,151,257,53,163,2203,317,1637,479,347,223,1283,863,733,83,
%U A100395 1297,89,271,859,1061,1871,2089,5591,557,113,1259,349,1553,3253,1129,2441
%N A100395 The smallest prime number q such that the greatest prime divisor of 2*q+1 equals the n-th prime.
%C A100395 The offset is 2 because prime(1)=2 is never a prime factor of an odd number.
%H A100395 Amiram Eldar, <a href="/A100395/b100395.txt">Table of n, a(n) for n = 2..10001</a>
%F A100395 a(n) = Min{x; x is prime number; A006530(2x+1) = prime(n)}.
%e A100395 n=1: a(1)=13 because it is the least prime number such that the greatest prime divisor of 2*13 + 1 = 27 equals 3;
%e A100395 n=2: a(2)=2 because the largest prime divisor of 2*a(2) + 1 = 5 is 5;
%e A100395 n=6: a(6)=19 since the greatest prime factor of 2*19 + 1 = 39 = 3*13 is 13=prime(6).
%p A100395 A100395 := proc(n)
%p A100395     p := ithprime(n) ;
%p A100395     for i from 1 do
%p A100395         q := ithprime(i) ;
%p A100395         numtheory[factorset](2*q+1) ;
%p A100395         if max(op(%)) = p then
%p A100395             return q;
%p A100395         end if;
%p A100395     end do:
%p A100395 end proc:
%p A100395 seq(A100395(n),n=2..60) ; # _R. J. Mathar_, Sep 22 2018
%t A100395 gpf[n_] := FactorInteger[n][[-1, 1]]; n = 54; m = Prime[n + 1]; v = Table[0, {m}]; c = 0; p = 2; While[c < n, g = gpf[2*p + 1]; If[g <= m && v[[g]] == 0, c++; v[[g]] = p]; p = NextPrime[p]]; Select[v, # > 0 &] (* _Amiram Eldar_, Aug 08 2020 *)
%Y A100395 Cf. A006530, A023590, A100394.
%K A100395 nonn
%O A100395 2,1
%A A100395 _Labos Elemer_, Dec 16 2004