OFFSET
1,2
COMMENTS
Probably finite? The last term?
Subsequence of primes starts 7, 23, 31, 53, 61, 107, 137, 191, 199, 229,...
Prime indices of A006899(n) such that A006899(n-1) and A006899(n+1) are both odd: 2, 7, 43, 113, 131, 139, 149, 157, 193, 211, 263, 281, 307, 317, 379,...
Let f(n) := floor( n * log(2) / log(3)), then k is in the sequence if and only if k = 1 or f(k - 1) = f(k) - 1 and f(k + 1) = f(k) + 1. - Michael Somos, Feb 24 2014
k > 1 is in the sequence if and only if the interval (k*b - b + 1, k*b + b) contains an integer, where b = log_3(2). Since b is irrational, the fractional parts of its multiples are uniformly distributed in [0,1], so the asymptotic density of this sequence is 2*b - 1 or approximately 0.26186. In particular, the sequence is infinite. Moreover, by a theorem of Vinogradov, the fractional parts of p * b for primes p are uniformly distributed in [0,1], so the subsequence of primes is infinite and has asymptotic density 2*b - 1 in the primes. - Robert Israel, Sep 10 2025
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 4 because k = 4 and 2^(4-1) < 3^(3-1) < 2^4 < 3^3 < 2^(4+1) for m = 3;
a(3) = 7 because k = 7 and 2^(7-1) < 3^(4-1) < 2^7 < 3^4 < 2^(7+1) for m = 4;
a(4) = 12 because k = 12 and 2^(12-1) < 3^(8-1) < 2^12 < 3^8 < 2^(12+1) for m = 8.
MAPLE
filter:= proc(k) local m;
m:= 2+ilog[3](2^(k-1));
3^m < 2^(k+1)
end proc:
filter(1):= true:
select(filter, [$1..1000]); # Robert Israel, Sep 10 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Lopatin and Juri-Stepan Gerasimov, Feb 08 2014
STATUS
approved
