OFFSET
1,2
COMMENTS
The lower and upper asymptotic densities of this sequence are 1/9 and 5/9, respectively. - Amiram Eldar, Feb 27 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Bryan Brown, Michael Dairyko, Stephan Ramon Garcia, Bob Lutz and Michael Someck, Four quotient set gems, The American Mathematical Monthly, Vol. 121, No. 7 (2014), pp. 590-598; arXiv preprint, arXiv:1312.1036 [math.NT], 2013.
FORMULA
A000030(a(n)) = 1. - Reinhard Zumkeller, Jul 16 2014
a(A002275(n)+1) = 10^n for any n >= 0. - Rémy Sigrist, Jun 23 2017
a(n) = n + (8*10^floor(log_10(9*n-8))-8)/9. - Alan Michael Gómez Calderón, May 16 2023
MAPLE
isA131835 := proc(n) if op(-1, convert(n, base, 10)) = 1 then true; else false ; fi ; end: for n from 1 to 300 do if isA131835(n) then printf("%d, ", n) ; fi ; od : # R. J. Mathar, Jul 24 2007
MATHEMATICA
Select[Range[150], IntegerDigits[#][[1]] == 1 &] (* Amiram Eldar, Feb 27 2021 *)
PROG
(Haskell)
a131835 n = a131835_list !! (n-1)
a131835_list = concat $
iterate (concatMap (\x -> map (+ 10 * x) [0..9])) [1]
-- Reinhard Zumkeller, Jul 16 2014
(PARI) a(n, {base=10}) = my (o=1); while (n>o, n-=o; o*=base); return (o+n-1) \\ Rémy Sigrist, Jun 23 2017
(PARI) a(n) = n--; s = #digits(9*n+1); n + 8 * (10^(s-1))/9 + 1/9 \\ David A. Corneth, Jun 23 2017
(PARI) nxt(n) = my(d = digits(n+1)); if(d[1]==1, n+1, 10^#d) \\ David A. Corneth, Jun 23 2017
(Python)
def A131835(n): return n+(10**(len(str(9*n-8))-1)<<3)//9 # Chai Wah Wu, Dec 07 2024
CROSSREFS
Subsequence of A011531.
KEYWORD
nonn,base,easy
AUTHOR
Andrew Good (yipes_stripes(AT)yahoo.com), Jul 20 2007
EXTENSIONS
More terms from R. J. Mathar, Jul 24 2007
STATUS
approved