login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


The smallest prime p such that tau(p-1) + tau(p+1) = prime(n), or 0 if no such prime exists; where tau(k) is the number of divisors of k.
0

%I #11 Aug 03 2014 14:01:30

%S 0,2,3,5,17,37,101,0,401,3137,4357,62501,21317,16901,1008017,15877,

%T 1020101,33857,69697,14401,331777,78401,32401,57601,828101

%N The smallest prime p such that tau(p-1) + tau(p+1) = prime(n), or 0 if no such prime exists; where tau(k) is the number of divisors of k.

%C This is sequence A090482(n) for prime n.

%t nn = 25; t = Table[-1, {nn}]; t[[1]] = 0; t[[8]] = 0; cnt = 2; p = 1; While[cnt < nn, p = NextPrime[p]; s = DivisorSigma[0, p - 1] + DivisorSigma[0, p + 1]; If[PrimeQ[s], i = PrimePi[s]; If[i <= nn && t[[i]] == -1, t[[i]] = p; cnt++]]]; t (* _T. D. Noe_, Apr 28 2011 *)

%Y Cf. A000005, A000668, A002496, A090482, A175144 (tau(p-1)+tau(p+1)).

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Apr 23 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 11:27 EDT 2024. Contains 376084 sequences. (Running on oeis4.)