login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287298 a(n) is the largest square with distinct digits in base n. 1
1, 1, 225, 576, 38025, 751689, 10323369, 355624164, 9814072356, 279740499025, 8706730814089, 23132511879129, 11027486960232964, 435408094460869201, 18362780530794065025, 48470866291337805316, 39207739576969100808801, 1972312183619434816475625, 104566626183621314286288961 (list; graph; refs; listen; history; text; internal format)
OFFSET

2,3

COMMENTS

a(n) does not always have n digits in base n. If n is 5 mod 8 then a number which contains all the digits in base n is congruent to (n-1)n/2 mod (n-1). It will be then divisible by a single power of 2 and not a square.

a(22) = 340653564758245010607213613056. - Chai Wah Wu, May 24 2017

LINKS

Table of n, a(n) for n=2..20.

EXAMPLE

a(4)=225 which is 3201 in base 4. Higher squares have at least 5 digits in base 4.

PROG

(Python)

from gmpy2 import isqrt, mpz, digits

def A287298(n): # assumes n <= 62

    m = isqrt(mpz(''.join(digits(i, n) for i in range(n-1, -1, -1)), n))

    m2 = m**2

    d = digits(m2, n)

    while len(set(d)) < len(d):

        m -= 1

        m2 -= 2*m+1

        d = digits(m2, n)

    return int(m2) # Chai Wah Wu, May 24 2017

CROSSREFS

Sequence in context: A147276 A219022 A193003 * A117246 A027470 A134934

Adjacent sequences:  A287295 A287296 A287297 * A287299 A287300 A287301

KEYWORD

nonn,base

AUTHOR

John L. Drost, May 22 2017

EXTENSIONS

Added a(16)-a(20) and corrected a(12) by Chai Wah Wu, May 24 2017

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 20 10:59 EDT 2018. Contains 316379 sequences. (Running on oeis4.)