OFFSET
1,3
COMMENTS
a(n) = 0 if n = m^p that is if n is a full power (square, cube etc.).
As Catalan's conjecture is now proved, n=8=2^3, n+1=9=3^2 is the only solution for a(n+1) = a(n) = 0.
LINKS
Eric Weisstein's World of Mathematics, Catalan's conjecture
PROG
(PARI) a(n) = {m = n; while(!ispower(m), m--; if (m==0, return (n-1))); n-m; } \\ Michel Marcus, Nov 04 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Mar 24 2002
EXTENSIONS
Edited by Reinhard Zumkeller, Mar 26 2003
STATUS
approved