login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A302721
Square array T(n, k) read by antidiagonals upwards, n > 0 and k > 0: T(n, k) is the distance from n to the nearest prime(k)-smooth number (where prime(k) denotes the k-th prime number).
0
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 1, 0, 0, 0, 0, 0, 0
OFFSET
1,16
FORMULA
a(2^i, k) = 0 for any i >= 0.
a(2*n, k) <= 2*a(n, k).
a(n, k+1) <= a(n, k).
abs(T(n+1, k) - T(n, k)) <= 1.
a(n, A061395(n)) = 0 for any n > 1.
a(n, 1) = A053646(n).
a(n, 2) = A301574(n).
Sum_{k > 0} a(n, k) = A303545(n).
EXAMPLE
Array T(n, k) begins:
n\k| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
---+------------------------------------------------------------
1| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
3| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5| 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
6| 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7| 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
8| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
9| 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10| 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
11| 3 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12| 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
13| 3 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
PROG
(PARI) gpf(n) = if (n==1, 1, my (f=factor(n)); f[#f~, 1])
T(n, k) = my (p=prime(k)); for (d=0, oo, if (gpf(n-d) <= p || gpf(n+d) <= p, return (d)))
CROSSREFS
Cf. A053646 (first column), A061395, A301574 (second column), A303545 (row sums).
Sequence in context: A057764 A010108 A033782 * A321740 A098082 A321921
KEYWORD
nonn,tabl
AUTHOR
Rémy Sigrist, Apr 29 2018
STATUS
approved