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.

A343594 Numbers k that, when written in all bases from base 2 to base 10, are a substring of k^k when written in the same base.

This page as a plain text file.
%I A343594 #23 Apr 26 2021 21:37:05
%S A343594 1,5,17,25,31,41,63,92,151,170,202,221,263,266,278,322,327,347,364,
%T A343594 401,404,412,421,423,437,467,470,482,490,498,501,515,519,543,558,578,
%U A343594 590,612,623,636,646,647,671,683,685,705,707,717,718,726,764,785,795,859,867,872,875,881,890,892,897
%N A343594 Numbers k that, when written in all bases from base 2 to base 10, are a substring of k^k when written in the same base.
%e A343594 5 is a term. See below table:
%e A343594 .
%e A343594    base  |  5 in base  |  5^5 in base
%e A343594 ---------+-------------+-------------
%e A343594     10          5                3125
%e A343594      9          5                4252
%e A343594      8          5                6065
%e A343594      7          5               12053
%e A343594      6          5               22245
%e A343594      5         10              100000
%e A343594      4         11              300311
%e A343594      3         12            11021202
%e A343594      2        101        110000110101
%e A343594 .
%e A343594 5^5 in all bases contains 5 in that base as a substring.
%o A343594 (Python)
%o A343594 from sympy.ntheory import digits
%o A343594 def nstr(n, b): return "".join(map(str, digits(n, b=b)[1:]))
%o A343594 def ok(k): return all(nstr(k, b) in nstr(k**k, b) for b in range(10, 1, -1))
%o A343594 print(list(filter(ok, range(900)))) # _Michael S. Branicky_, Apr 25 2021
%o A343594 (PARI) str(v) = my(s=""); for (k=1, #v, s = concat(s, Str(v[k]))); s;
%o A343594 isok(k) = {for (b=2, 10, my(kb = digits(k, b), kkb = digits(k^k, b)); if (#strsplit(str(kkb), str(kb)) <=1 , return (0));); return (1);} \\ _Michel Marcus_, Apr 26 2021
%Y A343594 Cf. A049329, A045537, A051248.
%K A343594 nonn,base
%O A343594 1,2
%A A343594 _Scott R. Shannon_, Apr 21 2021