A325417 a(n) is the least number not 2*a(m) or 3*a(m)+1 for any m < n.
1, 3, 5, 7, 8, 9, 11, 12, 13, 15, 17, 19, 20, 21, 23, 27, 29, 31, 32, 33, 35, 36, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 55, 56, 57, 59, 60, 63, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 87, 89, 91, 92, 93, 95, 99, 101, 103, 104
Offset: 1
Examples
The sequence necessarily starts with 1. The next 2 terms are determined as follows: because a(1) = 1, the numbers 2 and 4 are disallowed, so that a(2) = 3, whence the numbers 6 and 10 are disallowed, so that a(3) = 5.
Links
- Clark Kimberling, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1, Apply[Or, Map[MemberQ[a, #] &, Select[Flatten[{#/2, (# - 1)/3}], IntegerQ]]] &]], {150}]; a (* A325417 *) Complement[Range[Last[a]], a] (* A325418 *) (* Peter J. C. Moses, Apr 23 2019 *)
Comments