This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A028898 #38 Dec 05 2019 04:41:55 %S A028898 0,1,2,3,4,5,6,7,8,9,3,4,5,6,7,8,9,10,11,12,6,7,8,9,10,11,12,13,14,15, %T A028898 9,10,11,12,13,14,15,16,17,18,12,13,14,15,16,17,18,19,20,21,15,16,17, %U A028898 18,19,20,21,22,23,24,18,19,20,21,22,23,24,25,26,27,21,22,23,24,25,26,27 %N A028898 Map n = Sum c_i 10^i to a(n) = Sum c_i 3^i. %C A028898 If n is a multiple of 7, then a(n) is also a multiple of 7. See the Bhattacharyya link. - _Michel Marcus_, May 11 2016 %H A028898 Michael De Vlieger, <a href="/A028898/b028898.txt">Table of n, a(n) for n = 0..10000</a> %H A028898 Malay Bhattacharyya, Sanghamitra Bandyopadhyay, Ujjwal Maulik, <a href="http://www.emis.de/journals/AUA/acta19/Paper-15.pdf">Non-primes are recursively divisible</a>, Acta Universitatis Apulensis, No 19/2009. %F A028898 a(0)=0, a(n)=3*a(n/10) if n==0 (mod 10), a(n)=a(n-1)+1 otherwise. - _Benoit Cloitre_, Dec 21 2002 %F A028898 G.f.: G(x) = (1-x)^(-1) * Sum_{i>=0} 3^i*p(x^(10^i)) where p(t) = (t+2*t^2+3*t^3+4*t^4+5*t^5+6*t^6+7*t^7+8*t^8+9*t^9)/(1+t+t^2+t^3+t^4+t^5+t^6+t^7+t^8+t^9) satisfies (1-x)*G(x) = p(x) + 3*(1-x^10)*G(x^10). - _Robert Israel_, May 11 2016 %p A028898 a:= proc(n) option remember; n mod 10 + 3*procname(floor(n/10)) %p A028898 end proc: %p A028898 a(0):= 0: %p A028898 seq(a(i),i=0..100); # _Robert Israel_, May 11 2016 %t A028898 a = {1}; Do[AppendTo[a, If[Mod[n, 10] == 0, 3 a[[n/10]], a[[n - 1]] + 1]], {n, 2, 76}]; {0}~Join~a (* _Michael De Vlieger_, May 10 2016 *) %o A028898 (PARI) a(n)=if(n<1,0,if(n%10,a(n-1)+1,3*a(n/10))) %o A028898 (PARI) a(n) = subst(Pol(digits(n)), x, 3); \\ _Michel Marcus_, May 10 2016 %Y A028898 Cf. A008589 (multiples of 7). %Y A028898 Different from A081502 for n>=100. %K A028898 nonn,easy,base %O A028898 0,3 %A A028898 _N. J. A. Sloane_ %E A028898 More terms from _Erich Friedman_ %E A028898 Moved _Wesley Ivan Hurt_'s formula to A081502 where it applies. - _Kevin Ryde_, Dec 03 2019