cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A334880 Numbers k such that gcd(k, k-th composite number) > 1.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 17 2020

Keywords

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.
		

Crossrefs

Cf. A002808, A064814, A073258 (complement), A336323.

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