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!)
A327667 a(n) is the least base >= 2 where n is the least number with its sum of digits. 2
2, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 4, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 6, 5, 13, 3, 7, 29, 6, 31, 2, 11, 17, 7, 6, 37, 19, 13, 8, 41, 7, 43, 11, 9, 23, 47, 4, 7, 5, 17, 13, 53, 3, 11, 8, 19, 29, 59, 10, 61, 31, 9, 2, 13, 11, 67, 17, 23, 10, 71, 6, 73, 37 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
FORMULA
a(n) = 2 iff n belongs to A000225.
A327664(n) <= a(n).
a(p-1) = p for any prime number p.
EXAMPLE
For n = 4:
- in base 2, 1 and 4 have the same sum of digits,
- in base 3, 2 and 4 have the same sum of digits,
- in base 4, 1 and 4 have the same sum of digits,
- in base 5, 4 is the least number with its sum of digits,
- hence a(4) = 5.
MAPLE
N:= 100: # for a(0)..a(N)
V:= Array(0..N):
V[0]:= 2: count:= 1:
for b from 2 while count < N+1 do
for d from 1 to ilog[b]((N+1)/2)+2 do
for s from (d-1)*(b-1)+1 to d*(b-1) do
i:= s-(d-1)*(b-1);
x:= (i+1)*b^(d-1)-1;
if x > N then break fi;
if V[x] = 0 then V[x]:= b; count:= count+1 fi;
od od od:
convert(V, list); # Robert Israel, Jun 27 2023
PROG
(PARI) a(n) = { for (b=2, oo, my (s=sumdigits(n, b)); if (n==((s%(b-1))+1)*b^(s\(b-1))-1, return (b))) }
CROSSREFS
Sequence in context: A051664 A318884 A280990 * A256267 A307687 A281121
KEYWORD
nonn,base,look
AUTHOR
Rémy Sigrist, Sep 21 2019
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 26 12:38 EDT 2024. Contains 375456 sequences. (Running on oeis4.)