OFFSET
1,1
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..5000
EXAMPLE
A005117(k) is the k-th squarefree number.
-------+------------+------------+------------
-------+------------+------------+------------
23 | 35 | 7 | 13
34 | 55 | 11 | 21
44 | 70 | 7 | 13
48 | 77 | 11 | 31
60 | 95 | 19 | 37
65 | 105 | 7 | 13
69 | 110 | 11 | 21
73 | 115 | 23 | 45
75 | 119 | 17 | 49
89 | 143 | 13 | 61
94 | 154 | 11 | 31
95 | 155 | 31 | 61
99 | 161 | 23 | 67
101 | 165 | 11 | 21
115 | 187 | 17 | 81
116 | 190 | 19 | 37
PROG
(Ruby)
require 'prime'
def A(n)
s = 1
flag = false
while !flag
s += 1
flag = true
(1..n - 1).each{|i|
if i != ((i ** s) % n)
flag = false
break
end
}
end
s
end
def A318572(n)
ary = []
i = 2
while ary.size < n
pq = i.prime_division
if pq.all?{|j| j[1] == 1}
ary << i if A(i) != pq[-1][0]
end
i += 1
end
ary
end
p A318572(50)
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Aug 29 2018
STATUS
approved