login
A062070
Smallest base b such that the decimal digits of n interpreted as digits in base b give a square, or 0 if no such base exists.
1
2, 2, 0, 0, 2, 0, 0, 0, 0, 2, 4, 3, 2, 6, 5, 4, 3, 2, 8, 7, 2, 4, 7, 3, 6, 2, 5, 9, 4, 8, 3, 5, 0, 2, 4, 0, 10, 3, 0, 9, 4, 2, 0, 0, 3, 5, 0, 0, 2, 4, 5, 3, 0, 0, 9, 4, 2, 0, 0, 8, 6, 4, 0, 13, 2, 0, 5, 3, 0, 12, 7, 5, 2, 0, 3, 0, 0, 6, 4, 13, 2, 3, 0, 0, 4, 0, 0, 0, 7, 2, 4, 7, 0, 0, 5, 0, 0, 2, 0, 3, 2
OFFSET
0,1
LINKS
EXAMPLE
a(13) = 6 since 13_6 = 9 = 3^2 and this is the smallest such base.
PROG
(PARI) a(n) = {for (b=2, n+2, if (issquare(fromdigits(digits(n), b)), return (b)); ); return (0); } \\ Michel Marcus, Nov 20 2017
CROSSREFS
Sequence in context: A281790 A245254 A059080 * A347088 A343991 A239395
KEYWORD
base,easy,nice,nonn
AUTHOR
Erich Friedman, Jun 27 2001
EXTENSIONS
Name clarified by Felix Fröhlich and Kevin Ryde, May 17 2021
STATUS
approved