login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A105361
Rearrangement of positive integers according to decimal expansions of Pi and e (see comments).
2
2, 1, 4, 3, 6, 8, 10, 5, 12, 7, 14, 16, 9, 18, 20, 11, 13, 15, 22, 24, 17, 26, 28, 19, 21, 23, 30, 32, 25, 34, 36, 27, 29, 31, 38, 33, 35, 37, 40, 39, 41, 42, 44, 46, 43, 48, 45, 47, 49, 51, 53, 55, 50, 57, 59, 61, 52, 63, 65, 67, 69, 71, 54, 73, 75, 77, 56, 58, 79, 81, 83, 85
OFFSET
1,1
COMMENTS
Take decimal expansions of Pi and e:
p = 3,1,4,1,5,9,2,6,5,3,5,8,9,...(A000796) and
e = 2,7,1,8,2,8,1,8,2,8,4,5,9,...(A001113).
If p(n) > e(n), then a(n) is the next even number; otherwise, a(n) is the next odd number.
MATHEMATICA
p = RealDigits[Pi, 10, 100][[1]]; e = RealDigits[E, 10, 100][[1]]; r = Range[100]; a[n_] := a[n] = Block[{c = Complement[r, Table[ a[i], {i, n - 1}]]}, If[p[[n]] > e[[n]], Select[c, EvenQ[ # ] &][[1]], Select[c, OddQ[ # ] &][[1]]]]; Table[ a[n], {n, 72}] (* Robert G. Wilson v, Apr 02 2005 *)
CROSSREFS
Cf. A105362.
Sequence in context: A114862 A064579 A277376 * A370728 A125154 A281853
KEYWORD
nonn,base
AUTHOR
Zak Seidov, Apr 01 2005
EXTENSIONS
Edited by Robert G. Wilson v, Apr 02 2005
STATUS
approved