A004684 Primes written in base 11. (Next term contains a nondecimal character.)
2, 3, 5, 7, 10, 12, 16, 18, 21, 27, 29, 34, 38
Offset: 1
Links
- Jianing Song, Table of n, a(n) for n = 1..1000 (using A to represent 10)
Programs
-
Mathematica
FromDigits /@ TakeWhile[Array[IntegerDigits[Prime@ #, 11] &, 15], NoneTrue[#, # > 9 &] &] (* Michael De Vlieger, Nov 25 2018 *)
-
PARI
a(n)=subst(Pol(digits(prime(n),11)),'x,10) \\ Charles R Greathouse IV, Nov 06 2013
-
PARI
a(n) = my(d=digits(prime(n), 11)); my(s="", x); for(i=1, #d, if(d[i]<10, x = d[i], x = "A"); s = concat(s, x)); eval(s); for(n=1, 30, print1(a(n), ", ")) \\ Michel Marcus, Nov 25 2018