login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069584 a(n) = n - largest perfect power <= n. 2
0, 1, 2, 0, 1, 2, 3, 0, 0, 1, 2, 3, 4, 5, 6, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 0, 1, 2, 3, 4, 0, 1, 2, 3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 (list; graph; refs; listen; history; text; internal format)
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

Table of n, a(n) for n=1..95.

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

Cf. A001597, a(n)=n-A081676(n).

Sequence in context: A080099 A268040 A127711 * A199238 A181347 A014587

Adjacent sequences:  A069581 A069582 A069583 * A069585 A069586 A069587

KEYWORD

easy,nonn

AUTHOR

Amarnath Murthy, Mar 24 2002

EXTENSIONS

Edited by Reinhard Zumkeller, Mar 26 2003

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 5 06:46 EDT 2020. Contains 336209 sequences. (Running on oeis4.)