A337535 For n>1, a(n) is the least base b>2 such that the digits of n in base b contain the digit b-1; a(1)=1.
1, 3, 4, 5, 3, 3, 3, 3, 5, 11, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 37, 19, 3, 4, 41, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 41, 83, 3, 5, 43
Offset: 1
Examples
a(4) = 5 since 4 = 4_5, and 5 is the only base b > 2 with digit b-1. a(7) = 3 since 7 = 21_3 so containing the digit 2.
Links
- Michel Marcus, Table of n, a(n) for n = 1..10000
Programs
-
PARI
isok(n, b) = vecmax(digits(n, b)) == b-1; a(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b;
Comments