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 3, we have 3*(29 mod 10) + [29 / 10] = 3*9+2 = 29, then 29*(289 mod 10) + [289 / 10] = 29*9 + 28 = 289, etc.
a(2) = 289: 289*10-1 = 2889 == 0 (mod 9), so a(3) = 2889/9 = 321; 321*10-1 = 3209 == 2 (mod 3), so a(4) = 3209; 3209*10-1 = 32089 == 1 (mod 3), so a(5) = 32089; 32089*10-1 = 320889 == 0 (mod 3) but not 0 (mod 9), so a(6) = 320889/3 = 106963. - Bob Selcoe, Feb 17 2016
PROG
(PARI) vector(30, n, t=if(n>1, A268488(t), 3))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and M. F. Hasler, Feb 14 2016
STATUS
approved