OFFSET
0,1
COMMENTS
As noted in A369797, a(n) is either 1 or a prime. But not mentioned is that all primes appear once, with two exceptions. The second prime, 3, never appears and the third prime, 5, appears twice, at 4 and 9.
A denominator of 1 in A369797 appears about 81% of the time.
The graph of this sequence has three broken lines, one at a(n) = 1, the second at ~3n/2 and the third at ~3n.
MATHEMATICA
b[n_] := b[n] = (n + 2) (b[n - 1] - b[n - 2]); b[-1] = 0; b[0] = 1; a[n_] := a[n] = (3 n - 2)/GCD[3 n - 2, b[n - 2] + 2 b[n - 3]]; Flatten[ Table[ FirstPosition[ Table[ a[n], {n, 3, 220}], n], {n, Join[{1}, Prime@ Range@ 67]}]] + 2
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Feb 28 2024
STATUS
approved