OFFSET
0,1
COMMENTS
See A268488 and the link to the SeqFan list for further information.
There can be no more than three consecutive terms where a(n) = 10*a(n-1)-1 and a(n+1) = 10*a(n)-1. This occurs when a(n-1) == 0 (mod 3), which must be followed by a(n) == 2 (mod 3) and a(n+1) == 1 (mod 3). - Bob Selcoe, Feb 17 2016
LINKS
Eric Angelini (and reply by M. Hasler), 3, 29, 289, 321, ..., SeqFan list, Feb. 13, 2016
FORMULA
a(n) = 10*a(n-1)-1 unless divisible by 3 or 9, then a(n) = (10*a(n-1)-1)/{3,9}, respectively. - Bob Selcoe, Feb 17 2016
EXAMPLE
Starting from 2, we have 2*(19 mod 10) + [19 / 10] = 2*9 + 1 = 19, then 19*(21 mod 10) + [21 / 10] = 19*1 + 2 = 21, etc.
a(4) = 2089: 2089*10-1 = 20889 == 0 (mod 9), so a(5) = 20889/9 = 2321; 2321*10-1 = 23209 == 1 (mod 3), so a(6) = 23209; 23209*10-1 = 232089 == 0 (mod 3) but not 0 (mod 9), so a(7) = 232089/3 = 77363. - Bob Selcoe, Feb 17 2016
PROG
(PARI) vector(30, n, t=if(n>1, A268488(t), 2))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Feb 14 2016
STATUS
approved