A067368 a(n) is the smallest positive even integer that cannot be expressed as the product of two or three previous terms (not necessarily distinct).
2, 6, 10, 14, 16, 18, 22, 26, 30, 34, 38, 42, 46, 48, 50, 54, 58, 62, 66, 70, 74, 78, 80, 82, 86, 90, 94, 98, 102, 106, 110, 112, 114, 118, 122, 126, 128, 130, 134, 138, 142, 144, 146, 150, 154, 158, 162, 166, 170, 174, 176, 178, 182, 186, 190, 194, 198, 202, 206
Offset: 1
Examples
8 = 2*2*2, but 10 = 2*5 cannot be expressed with factors 2 and 6, so a(3) = 10.
Links
- Robert Israel, Table of n, a(n) for n = 1..10000
Programs
-
Maple
N:= 1000: A:= {seq(seq(2^(3*k+1)*s,s=1..N/2^(3*k+1),2),k=0..floor(log[2](N/2)/3))}: sort(convert(A,list)); # Robert Israel, Jul 23 2019
-
Mathematica
t = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {0, 3}, 3 -> {0, 1}}] &, {0}, 9] (* A191255 *) Flatten[Position[t, 0]] (* A005408, the odds *) a = Flatten[Position[t, 1]] (* this sequence *) b = Flatten[Position[t, 2]] (* A213258 *) a/2 (* A191257 *) b/4 (* a/2 *) (* Clark Kimberling, May 28 2011 *)
-
PARI
isok(n) = valuation(n, 2)%3==1; \\ Altug Alkan, Sep 21 2018
-
Python
def A067368(n): def f(x): return n+x-sum(((x>>i)-1>>1)+1 for i in range(0,x.bit_length(),3)) m, k = n, f(n) while m != k: m, k = k, f(k) return m<<1 # Chai Wah Wu, Feb 17 2025
Formula
Conjecture: a(n) = a(n-1) + 2 if (n = 2a(k) + k + 1) or (n = 2a(k) + k) for some k, otherwise a(n) = a(n-1) + 4. This has been confirmed for several hundred terms.
The above conjecture is correct because there are 2*(a(k+1)-a(k)) terms that are not divisible by 4 in the k-th interval which are determined by terms that are divisible by 4. For example, there are 2*(a(2)-a(1)) = 2*(6-2) = 8 terms between a(5) = 16 and a(14) = 48 because numbers of the form 2*s are always terms where s is an odd number. So first differences of a(n) determine the corresponding intervals and the formula above always holds. - Altug Alkan, Sep 24 2018
Extensions
Edited by John W. Layman, Jan 23 2002
Comments