OFFSET
1,3
REFERENCES
C. A. Pickover, "Keys to Infinity", Wiley 1995, p. 159,160.
C. A. Pickover, "Wonders of Numbers", Oxford New York 2001, Chapter 52, pp. 123-124, 316-317.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
C. A. Pickover, "Wonders of Numbers, Adventures in Mathematics, Mind and Meaning," Zentralblatt review
Eric Weisstein's World of Mathematics, Undulating Number
MAPLE
$0..9, seq(seq(seq(a*(10^(d+1)-10^(d+1 mod 2))/99 + b*(10^d - 10^(d mod 2))/99, b=0..9), a=1..9), d=2..6); # Robert Israel, Jul 08 2016
MATHEMATICA
wave[1] = Range[0, 9]; wave[2] = Range[10, 99]; wave[n_] := wave[n] = Select[ Union[ Flatten[ {id = IntegerDigits[#]; FromDigits[ Prepend[id, id[[2]]]], FromDigits[ Append[id, id[[-2]]]]} & /@ wave[n-1]]], 10^(n-1) < # < 10^n & ]; Flatten[ Table[ wave[n], {n, 1, 3}]] (* Jean-François Alcover, Jun 19 2012 *)
PROG
(Haskell)
import Data.Set (fromList, deleteFindMin, insert)
a033619 n = a033619_list !! (n-1)
a033619_list = [0..9] ++ (f $ fromList [10..99]) where
f s = m : f (insert (m * 10 + h) s') where
h = div (mod m 100) 10
(m, s') = deleteFindMin s
-- Reinhard Zumkeller, May 01 2012
(Python)
from itertools import count, islice
def agen(): # generator of terms
yield from range(10)
for d in count(2):
q, r = divmod(d, 2)
for a in "123456789":
for b in "0123456789":
yield int((a+b)*q + a*r)
print(list(islice(agen(), 106))) # Michael S. Branicky, Mar 28 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved