login

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

Position of second and last occurrence of n in A256918.
5

%I #12 Oct 23 2024 20:27:56

%S 2,6,9,12,8,14,30,17,20,28,123,23,201,32,25,39,300,46,825,43,34,125,

%T 946,51,27,203,47,52,3094,56,7060,62,127,302,54,71,13528,827,205,61,

%U 28659,79,40811,132,58,948,46658,65,81,99,304,210,57450,69,134,77,829

%N Position of second and last occurrence of n in A256918.

%C GCD(A257218(a(n)),A257218(a(n)-1)) = n;

%C a(n) > A257120(n); a(n) = A257120 + A257478(n).

%H Hiroaki Yamanouchi, <a href="/A257475/b257475.txt">Table of n, a(n) for n = 1..72</a>

%e Cf. A257478.

%o (Haskell)

%o a257475 n = f 1 a256918_list where

%o f i (u:us) = (if u == n then g else f) (i + 1) us

%o g j (v:vs) = if v == n then j else g (j + 1) vs

%Y Cf. A256918, A257120, A257478, A257218.

%K nonn

%O 1,1

%A _Reinhard Zumkeller_, Apr 25 2015

%E a(38)-a(57) from _Hiroaki Yamanouchi_, May 03 2015