[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A375727 a(n) is the least number that is a Smith number in all bases 2 to n but not in base n+1. 0
15, 475, 1023, 222, 1924475, 26910204, 191999912, 240365505 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,1
LINKS
EXAMPLE
a(3) = 475 = 5^2 * 19.
In base 2, 475 = 111011011_2 with digit sum 7, 5 = 101_2 with digit sum 2, 19 = 10011_2 with digit sum 3, and 7 = 2 * 2 + 3.
In base 3, 475 = 122121_3 with digit sum 9, 5 = 12_3 with digit sum 3, 19 = 201_3 with digit sum 3, and 9 = 2 * 3 + 3.
In base 4, 475 = 13123_4 with digit sum 10, 5 = 11_4 with digit sum 2, 19 = 103_4 with digit sum 4, and 10 <> 2 * 2 + 4.
MAPLE
f:= proc(n) local F, t, b;
if isprime(n) then return 0 fi;
F:= ifactors(n)[2];
for b from 2 while convert(convert(n, base, b), `+`) = add(t[2]*convert(convert(t[1], base, b), `+`), t = F) do od:
if b = 2 then 0 else b-1 fi
end proc:
N:= 7: # for a(2) .. a(N)
V:= Vector(N): count:= 0:
for n from 4 while count < N-1 do
v:= f(n);
if v > 0 and V[v] = 0 then V[v]:= n; count:= count+1 fi;
od:
convert(V[2..N], list);
PROG
(Python)
from sympy.ntheory import digits
from sympy import factorint, isprime
from itertools import count, islice
def sd(n, base=10): return sum(digits(n, base)[1:])
def f(n, factors):
for b in count(2):
if sd(n, base=b) != sum(sd(p, base=b)*factors[p] for p in factors):
break
return b-1
def agen(): # generator of terms
adict, n = dict(), 2
for k in count(1):
if isprime(k): continue
v = f(k, factorint(k))
if v not in adict: adict[v] = k
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 4))) # Michael S. Branicky, Aug 25 2024
CROSSREFS
Sequence in context: A005815 A120600 A279922 * A129892 A275411 A289185
KEYWORD
nonn,base,more,new
AUTHOR
Robert Israel, Aug 25 2024
EXTENSIONS
a(8)-a(9) from Michael S. Branicky, Aug 26 2024
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 29 17:51 EDT 2024. Contains 375518 sequences. (Running on oeis4.)