cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A342260 a(n)^2 is the least square that, when written in base n, has exactly n digits n-1.

Original entry on oeis.org

3, 31, 217, 268, 8399, 29110, 711243, 4676815, 31622764, 376863606, 12638826343, 38121744938, 1511790122972, 8648472039419, 243625577528103
Offset: 2

Views

Author

Hugo Pfoertner, Apr 04 2021

Keywords

Comments

17^(25/2) < a(17) <= 4159201115231103. - Martin Ehrenstein, Jul 10 2021

Examples

			a(2) = 3: 3^2 = 9 is the least square with 2 binary ones: 1001;
a(3) = 31: 31^2 = 961 is the least square with 3 ternary digits 2: 1022121;
a(4) = 217: 217^2 = 47089 = 23133301_4;
a(5) = 268: 268^2 = 71824 = 4244244_5.
		

Crossrefs

Programs

  • PARI
    isok(k, n) = #select(x->(x==n-1), digits(k^2, n)) == n;
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Apr 05 2021
    
  • Python
    from sympy.ntheory.factor_ import digits
    def A342260(n):
        k = 1
        while digits(k**2,n).count(n-1) != n:
            k += 1
        return k # Chai Wah Wu, Apr 05 2021

Formula

a(n) <= n^(n+1) - 1. - Bert Dobbelaere, Apr 20 2021

Extensions

a(14) from Martin Ehrenstein, Apr 17 2021
a(15) from Bert Dobbelaere, Apr 20 2021
a(16) from Martin Ehrenstein, Apr 21 2021

A175635 a(n) = smallest number m such that decimal expansion of m^2 has exactly (n+1) digits n.

Original entry on oeis.org

0, 11, 149, 1156, 2538, 22925, 163284, 2116076, 9321378, 31622764
Offset: 0

Views

Author

Zak Seidov, Aug 01 2010

Keywords

Examples

			a(0)=0 because 0^2=0 has one 0
a(1)=1 because 11^2=121 has two 1's
a(2)=149 because 149^2=22201 has three 2's
a(8)=9321378 because 9321378^2=86888087818884 has nine 8's
a(9)=31622764 because 31622764^2=999999202999696 has ten 9's.
		

Crossrefs

Showing 1-2 of 2 results.