A334880 Numbers k such that gcd(k, k-th composite number) > 1.
2, 5, 6, 7, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32, 34, 36, 42, 48, 50, 51, 52, 54, 55, 56, 60, 62, 63, 64, 65, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 93, 96, 98, 99, 102, 104, 105, 110, 112, 114, 120, 122, 124, 126, 128, 130, 132, 138, 148
Offset: 1
Examples
In the following table, c(k) = A002808(k) = k-th composite number. k c(k) gcd(k, c(k)) 1 4 1 2 6 2 3 8 1 4 9 1 5 10 5 6 12 6 2, 5, 6 are in this sequence, and 1,3,4 are in A073258.
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
c = Select[Range[2, 150], ! PrimeQ[#] &]; (* A002808 *) Select[Range[Length[c]], GCD[c[[#]], #] > 1 &] (* A334880 *) Module[{nn=200,cmps,len},cmps=Select[Range[nn],CompositeQ];len=Length[ cmps];Select[Thread[{Range[len],cmps}],GCD@@#>1&]][[All,1]] (* Harvey P. Dale, Sep 20 2020 *)
-
PARI
lista(nn) = {my(n=0, list=List()); forcomposite (c=1, nn, n++; if (gcd(n, c) > 1, listput(list, n))); Vec(list);} \\ Michel Marcus, Jul 19 2020