login

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

A340969
a(n) is the first number k with A340967(k) = n.
1
1, 2, 8, 12, 14, 54, 158, 159, 203, 2159, 5999, 8339, 143098, 85679, 724919, 2417594, 7415099, 44026799, 183578399, 446036579
OFFSET
0,2
FORMULA
A340967(a(n)) = n.
EXAMPLE
a(3) = 12 because A340967(12) = 3 is the first occurrence of the value 3 in A340967.
MAPLE
sopfr:= proc(n) local t;
add(t[1]*t[2], t = ifactors(n)[2])
end proc:
f:= proc(n) local x, k;
x:= n;
for k from 1 do x:= n mod sopfr(x); if x <= 1 then return k fi od;
end proc:
f(1):= 0:
V:= Array(0..15): count:= 0:
for i from 1 while count < 16 do
v:= f(i);
if v <= 15 and V[v] = 0 then V[v]:= i; count:=count+1; fi
od:
convert(V, list);
PROG
(PARI)
f(n) = my(x=n, c=0, t); while(x > 1, c++; x = n % ((t=factor(x))[, 1]~*t[, 2])); c; \\ A340967
a(n) = for(k=1, oo, if(f(k) == n, return(k))); \\ Daniel Suteu, Feb 01 2021
CROSSREFS
Cf. A340967.
Sequence in context: A277568 A108059 A276932 * A180634 A139270 A176100
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Jan 31 2021
EXTENSIONS
a(17)-a(19) from Daniel Suteu, Feb 01 2021
STATUS
approved