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.

A376814 a(n) is the number of squares that have all digits distinct in base n.

Original entry on oeis.org

2, 2, 7, 7, 21, 42, 71, 268, 611, 1352, 3099, 8471, 23877, 63564, 182771, 527001, 1671752, 5055853
Offset: 2

Views

Author

Robert Israel, Oct 09 2024

Keywords

Examples

			a(4) = 7 because the only squares with distinct digits in base 4 are 0^2 = 0_4, 1^2 = 1_4, 2^2 = 10_4, 3^2 = 21_4, 6^2 = 210_4, 7^2 = 301_4 and 15^2 = 3201_4.
		

Crossrefs

Programs

  • Maple
    f:= proc(b) local k,t,F;
     t:= 0;
     for k from 0 to floor(sqrt(b^b-1)) do
       F:= convert(k^2, base, b);
       if nops(F) = nops(convert(F,set)) then t:= t+1 fi;
     od;
     t
    end proc:
    map(f, [$2..12]);
  • Python
    from math import isqrt
    from sympy.ntheory import digits
    def A376814(n): return sum(1 for k in range(isqrt(n**n-1)+1) if len(s:=digits(k**2,n)[1:])==len(set(s))) # Chai Wah Wu, Oct 09 2024

Extensions

a(15)-a(16) from Michael S. Branicky, Oct 09 2024
a(17) from Michael S. Branicky, Oct 10 2024
a(18) from Michael S. Branicky, Oct 14 2024
a(19) from Michael S. Branicky, Oct 31 2024

A376898 Positive numbers k such that all the digits in the octal expansion of k^3 are distinct.

Original entry on oeis.org

1, 2, 5, 7, 10, 11, 14, 15, 22, 30, 37, 41, 49, 61, 74, 98, 122
Offset: 1

Views

Author

Kalle Siukola, Oct 08 2024

Keywords

Comments

There are no terms >= 2^8 because 2^24-1 is the largest eight-digit octal number.

Examples

			11 is a term because 11^3 = 1331 = 2463_8 in octal and no octal digit occurs more than once.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2^8],Length[IntegerDigits[#^3,8]]==Length[Union[IntegerDigits[#^3,8]]]&] (* James C. McMahon, Oct 16 2024 *)
  • Python
    for k in range(1, 2**8):
        octal = format(k**3, "o")
        if len(octal) == len(set(octal)): print(k, end=",")
Showing 1-2 of 2 results.