|
|
A347306
|
|
When k appears in A347113, or -1 if k never appears.
|
|
7
|
|
|
1, 8, 11, 2, 7, 9, 20, 12, 15, 3, 28, 13, 19, 10, 16, 21, 37, 17, 51, 23, 27, 4, 53, 24, 33, 14, 29, 34, 47, 25, 101, 30, 38, 22, 43, 31, 116, 18, 44, 39, 58, 45, 63, 48, 52, 5, 99, 49, 59, 54, 68, 60, 81, 55, 64, 50, 73, 35, 136, 56, 146, 26, 65, 69, 72, 66, 159, 74, 77, 70, 153
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
With[{s = Import["https://oeis.org/A347113/b347113.txt", "Data"][[All, -1]]}, Array[FirstPosition[s, #][[1]] &, 71]] (* Michael De Vlieger, Sep 01 2021 *)
|
|
PROG
|
(Python)
from math import gcd
if n == 1:
return 1
i, j, nset, m = 1, 2, {1}, 2
while True:
k = m
i += 1
while k == j or gcd(k, j) == 1 or k in nset:
k += 1
if k == n:
return i
j = k+1
nset.add(k)
while m in nset:
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|