login
A168007
Jumping divisor sequence (see Comments lines for definition).
3
1, 2, 4, 3, 6, 5, 10, 9, 12, 11, 22, 21, 24, 23, 46, 45, 48, 47, 94, 93, 96, 95, 100, 99, 102, 101, 202, 201, 204, 203, 210, 209, 220, 219, 222, 221, 234, 233, 466, 465, 468, 467, 934, 933, 936, 935, 940, 939, 942, 941, 1882, 1881, 1884, 1883, 1890, 1889, 3778, 3777, 3780, 3779, 7558, 7557, 7560, 7559
OFFSET
1,2
COMMENTS
Consider the diagram with overlapping periodic curves that appears in the Links section (figure 2). The number of curves that contain the point [n,0] equals the number of divisors of n. The curve of diameter d represents the divisor d of n. Now consider only the lower part of the diagram (figure 3). Starting from point [1,0] we continue our journey walking along the semicircumference with smallest diameter not used previously (see the illustration of initial terms, figure 1). The sequence is formed by the values of n where the trajectory intercepts the x axis. - Omar E. Pol, Jan 14 2019
FORMULA
a(1) = 1; if a(n) is an even composite number then a(n+1) = a(n) - 1; otherwise a(n+1) = a(n) + A020639(a(n)). - Omar E. Pol, Jan 13 2019
PROG
(PARI) lista(nn) = {my(v=vector(nn, i, if(i<4, 2^i/2))); for(n=4, nn, if(v[n-1]%2, v[n]=v[n-1] + factor(v[n-1])[1, 1], v[n]=v[n-1] - 1)); v; } \\ Jinyuan Wang, Mar 14 2020
(Python)
from itertools import count, islice
from sympy import primefactors
def A168007_gen(): # generator of terms
yield (a := 1)
for n in count(2):
yield (a:=a+(min(primefactors(a), default=1) if a&1 or a==2 else -1))
A168007_list = list(islice(A168007_gen(), 20)) # Chai Wah Wu, Mar 14 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Nov 19 2009
EXTENSIONS
More terms from Omar E. Pol, Jan 12 2019
STATUS
approved