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 A078227 #16 May 22 2025 10:21:35 %S A078227 2,4,8,16,32,96,672,45696,2787456,270383232,507238943232, %T A078227 27274745216527872,141232121898569036783616, %U A078227 216567470725252501672125832323072 %N A078227 a(1) = 2, a(n+1) is the smallest multiple of a(n) such that the digits are alternately odd and even. The unit digit is always even and parity alternates. %e A078227 a(7) = 672 = 7*a(6) = 7*96. Starting with the unit digit the digits in 672 are alternately even and odd. %p A078227 isAltr := proc(n) local nshft,osgn,sgn ; nshft := n ; osgn := ( n mod 10 ) mod 2 ; while nshft >= 10 do nshft := floor(nshft/10) ; sgn := ( nshft mod 10 ) mod 2 ; if sgn = osgn then RETURN(false) ; fi ; osgn := sgn ; od ; RETURN(true) ; end: A078227 := proc(prev) local m; m := 2 ; while true do if isAltr(m*prev) then RETURN(m*prev) ; fi ; m := m+1 ; od ; end: n := 2 : while true do print(n) ; n := A078227(n) : od : # _R. J. Mathar_, Nov 12 2006 %o A078227 (Python) %o A078227 A078227_list = [2] %o A078227 for _ in range(20): %o A078227 x = A078227_list[-1] %o A078227 y = x %o A078227 while True: %o A078227 y += x %o A078227 s = str(y) %o A078227 for j in range(len(s)-1,-1,-2): %o A078227 if not s[j] in ('0','2','4','6','8'): %o A078227 break %o A078227 else: %o A078227 for k in range(len(s)-2,-1,-2): %o A078227 if not s[k] in ('1','3','5','7','9'): %o A078227 break %o A078227 else: %o A078227 A078227_list.append(y) %o A078227 break %o A078227 # _Chai Wah Wu_, Nov 06 2014 %Y A078227 Cf. A078221, A078222, A078223, A078224, A078225, A078226, A078228. %K A078227 base,more,nonn %O A078227 1,1 %A A078227 _Amarnath Murthy_, Nov 23 2002 %E A078227 More terms from _R. J. Mathar_, Nov 12 2006 %E A078227 a(13) and a(14) from _Donovan Johnson_, Mar 09 2008