login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the least number not 2*a(m) or 3*a(m)-1 for any m < n.
4

%I #5 May 02 2019 08:49:46

%S 1,3,4,5,7,9,12,13,15,16,17,19,21,22,23,25,27,28,29,31,33,36,37,39,40,

%T 41,43,45,48,49,51,52,53,55,57,59,60,61,63,64,67,69,70,71,73,75,76,77,

%U 79,81,84,85,87,88,89,91,93,94,95,97,99,100,101,103,105

%N a(n) is the least number not 2*a(m) or 3*a(m)-1 for any m < n.

%H Clark Kimberling, <a href="/A325462/b325462.txt">Table of n, a(n) for n = 1..10000</a>

%e The sequence necessarily starts with 1. The next 2 terms are determined as follows: because a(1) = 1, the number 2 is disallowed, so that a(2) = 3, whence the numbers 6 and 8 are disallowed, and a(3) = 4. See A325417 for a guide to related sequences.

%t a = {1}; Do[AppendTo[a, NestWhile[# + 1 &, Last[a] + 1, Apply[Or,

%t Map[MemberQ[a, #] &, Select[Flatten[{#/2, (#+1)/3}],

%t IntegerQ]]] &]], {150}]; a (* A325462 *)

%t Complement[Range[Last[a]], a] (* A325463 *)

%t (* _Peter J. C. Moses_, Apr 25 2019 *)

%Y Cf. A325417, A325463.

%K nonn,easy

%O 1,2

%A _Clark Kimberling_, May 01 2019