|
|
A348881
|
|
After a(1) = 1, the sequence is always extended with the smallest divisor d (not yet present in the sequence) of the last term t. If d doesn't exist, we extend the sequence with 3*t - 1 and repeat. See the Comments section for more details.
|
|
1
|
|
|
1, 2, 5, 14, 7, 20, 4, 11, 32, 8, 23, 68, 17, 50, 10, 29, 86, 43, 128, 16, 47, 140, 28, 83, 248, 31, 92, 46, 137, 410, 41, 122, 61, 182, 13, 38, 19, 56, 167, 500, 25, 74, 37, 110, 22, 65, 194, 97, 290, 58, 173, 518, 259, 776, 388, 1163, 3488, 109, 326, 163, 488, 244, 731, 2192, 274, 821, 2462, 1231, 3692, 26
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(1) = 1 by definition; as 1 has no available divisor not yet present in the sequence, we produce a(2) = 3*1 - 1 = 2.
a(2) = 2; as 2 has no available divisor yet present in the sequence, we produce a(3) = 3*2 - 1 = 5.
a(3) = 5; as 5 has no available divisor yet present in the sequence, we produce a(4) = 3*5 - 1 = 14.
a(4) = 14; as 14 has 7 as its smallest divisor not yet present in the sequence, we have a(5) = 7.
a(5) = 7; as 7 has no available divisor yet present in the sequence, we produce a(6) = 3*7 - 1 = 20.
|
|
MATHEMATICA
|
a[1]=1; a[n_]:=a[n]=If[(s=Complement[Rest@Divisors@a[n-1], Array[a, n-1]])!={}, Min@s, 3a[n-1]-1]; Array[a, 70] (* Giorgos Kalogeropoulos, Nov 02 2021 *)
|
|
PROG
|
(Python)
from sympy import divisors
terms = [1]
for i in range(100):
for j in divisors(terms[-1]):
if j not in terms:
terms.append(j)
break
else:
terms.append(terms[-1]*3-1)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|