A350150 a(1)=1; thereafter a(n+1) is the smallest unused number k such that d(k) and d(a(n)) are coprime, where d is the divisor counting function A000005.
1, 2, 4, 3, 9, 5, 16, 6, 25, 7, 36, 8, 49, 10, 64, 11, 81, 12, 625, 13, 100, 14, 121, 15, 144, 17, 169, 19, 196, 21, 225, 22, 256, 23, 289, 24, 324, 26, 361, 27, 400, 29, 441, 30, 484, 31, 529, 33, 576, 34, 676, 35, 729, 18, 1024, 20, 1296, 28, 2401, 32, 4096
Offset: 1
Keywords
Examples
a(2) = 2 because d(1) = 1, d(2) = 2 and gcd(1,2) = 1. a(3) cannot be 3 since d(2) = d(3) = 2, but gcd(d(2),d(4)) = gcd(2,3) = 1, so a(3) = 4.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log-log scatterplot of a(n) for n = 1..10^5 showing maxima in red and minima in blue. The golden line indicates the smallest missing number. We label terms that begin and end a flare phase among squares in alpha that comprise many records, and same in beta that comprise nearly all local minima.
- Michael De Vlieger, Log-log scatterplot of a(n) for n = 1..512 annotating a(n) in black above and d(a(n)) in red below the point. The plot illustrates bifurcation of the sequence, with a(2n) such that d(a(2n)) is even in trajectory beta below, while square a(2n+1) such that d(a(2n+1)) is odd in trajectory alpha above. Terms a(2n) such that d(a(2n)) = 6 appear in blue, while a(2n+1) such that d(a(2n)) = 6 appear in red. The faint green line below represents d(a(n)) for reference.
Programs
-
Mathematica
a[1] = 1; a[n_] := a[n] = Module[{k = 2, s = Array[a, n - 1], d = DivisorSigma[0, a[n - 1]]}, While[MemberQ[s, k] || ! CoprimeQ[d, DivisorSigma[0, k]], k++]; k]; Array[a, 100] (* Amiram Eldar, Dec 16 2021 *)
Extensions
More terms from Amiram Eldar, Dec 16 2021
Comments