login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A075789
Value of i, when n is written as r^i - s^j with the smallest possible r^i (with minimal i) and r, s > 0, i, j > 1; or 0 if n is not of this form.
0
2, 3, 2, 3, 2, 0, 3, 2, 2, 3, 3, 2, 2, 0, 2, 2, 2, 3, 3, 2, 2, 2, 3, 2, 3, 3, 2, 5, 2, 2, 5, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 3, 2, 2, 7, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 3, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 5, 2, 3, 2, 0, 7, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 3, 2, 2, 2, 2, 3, 2, 3, 7, 0, 7, 2, 2
OFFSET
1,1
COMMENTS
The zeros are only conjectures (cf. A074981).
"minimal i" means that, if r^i = a^b with composite b, then i is the smallest prime factor of b; e.g., r^i = 3^4 = 9^2, i.e., r = 9, i = 2.
EXAMPLE
1 = 3^2 - 2^3, 2 = 3^3 - 5^2, 3 = 2^2 - 1^2, 4 = 2^3 - 2^2, etc.
a(10) = 3 because 10 = 13^3 - 3^7.
PROG
(PARI) a(n, LIM=999*n)=for(k=1, LIM, (ispower(k)||k==1)&&ispower(n+k)&&return(factor(ispower(n+k))[1, 1])) \\ M. F. Hasler, May 29 2018
CROSSREFS
Cf. A074981 (not difference of powers), A075788, A075790, A075791.
Sequence in context: A239238 A125928 A114388 * A341018 A214323 A321865
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 13 2002
EXTENSIONS
More terms from David Wasserman, Jan 23 2005
Edited and data double-checked with given PARI code by M. F. Hasler, May 29 2018
STATUS
approved