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.

A065061 Numbers k such that sigma(k) - tau(k) is a prime.

This page as a plain text file.
%I A065061 #35 Feb 19 2024 10:34:05
%S A065061 3,8,162,512,1250,8192,31250,32768,41472,663552,2531250,3748322,
%T A065061 5120000,6837602,7558272,8000000,15780962,33554432,35701250,42762752,
%U A065061 45334242,68024448,75031250,78125000,91125000,137149922,243101250,512000000,907039232,959570432
%N A065061 Numbers k such that sigma(k) - tau(k) is a prime.
%C A065061 From _Kevin P. Thompson_, Jun 20 2022: (Start)
%C A065061 Terms greater than 3 must be twice a square (see A064205).
%C A065061 No terms are congruent to 4 or 6 (mod 10) (see A064205).
%C A065061 (End)
%H A065061 Amiram Eldar, <a href="/A065061/b065061.txt">Table of n, a(n) for n = 1..5000</a> (terms 1..265 from Kevin P. Thompson)
%e A065061 162 is a term since sigma(162) - tau(162) = 363 - 10 = 353, which is prime.
%t A065061 Do[ If[ PrimeQ[ DivisorSigma[1, n] - DivisorSigma[0, n]], Print[n]], {n, 1, 10^7}]
%o A065061 (PARI) { n=0; for (m=1, 10^9, if (isprime(sigma(m) - numdiv(m)), write("b065061.txt", n++, " ", m); if (n==100, return)) ) } \\ _Harry J. Smith_, Oct 05 2009
%o A065061 (Python)
%o A065061 from itertools import count, islice
%o A065061 from sympy import isprime, divisor_sigma as s, divisor_count as t
%o A065061 def agen(): # generator of terms
%o A065061     yield 3
%o A065061     yield from (k for k in (2*i*i for i in count(1)) if isprime(s(k)-t(k)))
%o A065061 print(list(islice(agen(), 30))) # _Michael S. Branicky_, Jun 20 2022
%Y A065061 I.e., A065608(n) is prime. Cf. A064205.
%Y A065061 Cf. A000005, A000203, A023194, A038344, A055813, A062700, A115919, A141242, A229264, A229265, A229266, A229268.
%K A065061 nonn
%O A065061 1,1
%A A065061 _Jason Earls_, Nov 06 2001
%E A065061 a(17)-a(28) from _Harry J. Smith_, Oct 05 2009
%E A065061 a(29)-a(30) from _Kevin P. Thompson_, Jun 20 2022