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.

Showing 1-2 of 2 results.

A077581 Triangle in which row n contains the n smallest numbers starting from 1 and coprime to n.

Original entry on oeis.org

1, 1, 3, 1, 2, 4, 1, 3, 5, 7, 1, 2, 3, 4, 6, 1, 5, 7, 11, 13, 17, 1, 2, 3, 4, 5, 6, 8, 1, 3, 5, 7, 9, 11, 13, 15, 1, 2, 4, 5, 7, 8, 10, 11, 13, 1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, 35, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
Offset: 1

Views

Author

Amarnath Murthy, Nov 14 2002

Keywords

Comments

A247815 and A247892 give number of primes and nonprimes per row. - Reinhard Zumkeller, Sep 26 2014

Examples

			1;
1,  3;
1,  2,  4;
1,  3,  5,  7;
1,  2,  3,  4,  6;
1,  5,  7, 11, 13, 17;
1,  2,  3,  4,  5,  6,  8;
1,  3,  5,  7,  9, ...
		

Crossrefs

Cf. A247798 (central terms), A247815, A247892.
Cf. A077664.

Programs

  • Haskell
    a077581 n k = a077581_tabl !! (n-1) !! (k-1)
    a077581_row n = a077581_tabl !! (n-1)
    a077581_tabl = map (\x -> take x [z | z <- [1..], gcd x z == 1]) [1..]
    -- Reinhard Zumkeller, Sep 26 2014
  • Mathematica
    row[n_] := Take[Select[Range[n^2], GCD[ #, n]==1&], n]; Join@@row/@Range[13]

Extensions

More terms from Sascha Kurz, Jan 11 2003

A247815 Number of primes in n-th row of triangle A077581.

Original entry on oeis.org

0, 1, 1, 3, 2, 5, 3, 5, 5, 7, 4, 9, 5, 9, 7, 10, 6, 14, 7, 13, 10, 13, 8, 18, 10, 14, 11, 16, 9, 26, 10, 17, 14, 18, 13, 26, 11, 20, 16, 23, 12, 31, 13, 22, 21, 22, 14, 32, 15, 28, 20, 27, 15, 35, 19, 29, 22, 28, 16, 45, 17, 29, 27, 30, 21, 44, 18, 32, 26
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 26 2014

Keywords

Comments

a(n) = n - A247892(n).

Crossrefs

Programs

  • Haskell
    a247815 = sum . map a010051' . a077581_row

Formula

a(n) = A000720(A069213(n)) - A001221(n).
Showing 1-2 of 2 results.