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.

A145461 Numbers that can be written with a single digit in base 10 as well as in some base b<10.

This page as a plain text file.
%I A145461 #11 May 18 2021 06:29:44
%S A145461 0,1,2,3,4,5,6,7,8,9,777
%N A145461 Numbers that can be written with a single digit in base 10 as well as in some base b<10.
%C A145461 If a number is written in base 10 with a digit x and in base b with a digit y, then (b-1)*x*10^n - 9*y*b^m + (9*y - (b-1)*x) = 0. Varying parameters b=2,3,...,9; x=1,2,...,9; and y=1,2,...,b-1 give a finite number of equations. It is easy to find all solutions (w.r.t. n and m) of each equation or establish that there are none. In particular, for b=7, x=9, y=5, the equation is 54*10^n - 45*7^m - 9 = 0 or 6*10^n - 5*7^m - 1 = 0 that does not have solutions since the left hand side is not 0 modulo 5. It proves completeness and finiteness. - _Max Alekseyev_, Nov 06 2008
%e A145461 777[base 10]=3333[base 6]
%o A145461 (Python)
%o A145461 from math import *
%o A145461 i=1
%o A145461 while i<(10**10-1)/9:
%o A145461     i=10*i+1
%o A145461     for m in range(1,10):
%o A145461         q=i*m
%o A145461         q2=q
%o A145461         for b in range(2,10):
%o A145461             restes=[]
%o A145461             q=q2
%o A145461             while q>0:
%o A145461                 r=q%b
%o A145461                 q=q//b
%o A145461                 restes.append(r)
%o A145461             if restes==[restes[0]]*len(restes):
%o A145461                 print(q2,restes,"en base ",b)
%K A145461 base,nonn,fini,full
%O A145461 1,3
%A A145461 _Sébastien Dumortier_, Oct 10 2008