OFFSET
1,1
COMMENTS
Numbers k such that k and k+1 are both in A002191.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Max Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems: Inversion of Multiplicative Functions (invphi.gp).
EXAMPLE
3 is a term since 3 = sigma(2) and 3 + 1 = 4 = sigma(3).
6 is a term since 6 = sigma(5) and 6 + 1 = 7 = sigma(4).
MATHEMATICA
seq[lim_] := Module[{v = Select[Union[DivisorSigma[1, Range[lim]]], # <= lim &]}, v[[Position[Differences[v], 1] // Flatten]]]; seq[2000]
PROG
(PARI) isA002191(n) = invsigmaNum(n) > 0; \\ using Max Alekseyev's invphi.gp
list(lim) = my(q1 = isA002191(1), q2); for(k = 2, lim, q2 = isA002191(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jan 03 2025
STATUS
approved