OFFSET
0,2
COMMENTS
FORMULA
a(n) = (10^2^floor(n/5)-1)/9*(n%5*2+1), where n%5 means the remainder (in {0..4}) of n divided by 5. - M. F. Hasler, Jun 24 2016
EXAMPLE
Following 33: 3+2 = 5 and 3+2 = 5, hence the next term is 55.
MATHEMATICA
NestList[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[#]+2)]]&, 1, 30] (* Harvey P. Dale, Apr 13 2012 *)
PROG
(PARI) A061512(n)=10^2^(n\5)\9*(n%5*2+1) \\ M. F. Hasler, Jun 24 2016
(PARI) nxt(n) = my(d=digits(n)); if(d[1]<9, n+2*(10^#d - 1)/9, (10^(2*#d) - 1)/9)
inv(n) = {my(d=digits(n)); 5*logint(#d, 2) + (d[1]+1)\2} \\ David A. Corneth, Jun 24 2016
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, May 08 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), May 11 2001
STATUS
approved