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.

A385515 Repdigit numbers whose square does not contain the repeated digit.

Original entry on oeis.org

2, 3, 4, 7, 8, 9, 22, 33, 44, 77, 88, 333, 444, 3333, 33333, 44444, 88888, 333333, 3333333, 33333333, 333333333, 3333333333, 33333333333, 333333333333, 3333333333333, 33333333333333, 333333333333333, 3333333333333333, 33333333333333333, 333333333333333333
Offset: 1

Views

Author

Gonzalo Martínez, Jul 01 2025

Keywords

Comments

For n >= 18, all terms are of the form 33...3; that is, elements of A002277.
A002277(m) is a term, for m > 0. Proof: 3 is in a(n) because 3^2 = 9. If 33...3 is composed of k 3's, with k > 1, it is satisfied that 33...3^2 = 11...1088...89; i.e., (k - 1) 1's followed by a 0, then (k - 1) 8's and a 9, so that 3 is not among the digits of its square.
Let's see that there are no other terms of the form 33...3 besides 2, 4, 7, 8, 9, 22, 44, 77, 88, 444, 44444, 88888. In this sequence there are no repdigits of the form 11...1, 55...5, 66...6, since their squares end in 1, 5 and 6 respectively. On the other hand, 9 is the only number of the form 999...9, since if it has 2 or more 9's its square starts with 9. Suppose that dd...d contains 6 or more digits. We already saw that the cases d = 1, 5, 6 and 9 are discarded. Let us analyze what happens for d = 2, 4, 7 and 8:
For d = 2, we have that 22...2^2 == 284 (mod 10^3).
For d = 4, we have that 44...4^2 == 469136 (mod 10^6).
For d = 7, we have that 77...7^2 == 729 (mod 10^3).
For d = 8, we have that 88...8^2 == 876544 (mod 10^6).
Thus, we conclude that a(n) only consists of digits 3 for n >= 18. And, in fact, a(n) consists of (n - 12) 3's.

Examples

			22 is a term since 22^2 = 484 does not contain the digit 2.
		

Crossrefs

Intersection of A010785 and A029783.

Programs

  • Mathematica
    Select[Union@ Flatten@ Table[k (10^n - 1)/9, {k, 0, 9}, {n, 18}] ,ContainsNone[IntegerDigits[#^2],IntegerDigits[#]]&] (* James C. McMahon, Jul 07 2025 *)

Formula

a(n) = A002277(n - 12), for n >= 18.