login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A076221 Triangle read by rows: A(n,k) is the number of x, x<=n, which are coprime to and not equal to k. 7
0, 1, 1, 2, 2, 2, 3, 2, 3, 2, 4, 3, 4, 3, 4, 5, 3, 4, 3, 5, 2, 6, 4, 5, 4, 6, 3, 6, 7, 4, 6, 4, 7, 3, 7, 4, 8, 5, 6, 5, 8, 3, 8, 5, 6, 9, 5, 7, 5, 8, 3, 9, 5, 7, 4, 10, 6, 8, 6, 9, 4, 10, 6, 8, 5, 10, 11, 6, 8, 6, 10, 4, 11, 6, 8, 5, 11, 4, 12, 7, 9, 7, 11, 5, 12, 7, 9, 6, 12, 5, 12 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,4

COMMENTS

Last entry of each row is Euler totient function phi(n).

{{0}, {1, 1}, {2, 2, 2}, {3, 2, 3, 2}, {4, 3, 4, 3, 4}, {5, 3, 4, 3, 5, 2}}

LINKS

Robert Israel, Table of n, a(n) for n = 1..10011

EXAMPLE

a(20)=A(6,5) is 5 because (1,5), (2,5), (3,5), (4,5) and (5,6) are the five pairs of relatively primes integers <= 6.

Triangle begins:

  0,

  1, 1,

  2, 2, 2,

  3, 2, 3, 2,

  4, 3, 4, 3, 4,

  5, 3, 4, 3, 5, 2,

  ...

MAPLE

f:= proc(n, k) if k=1 then n-1 else  nops(select(t -> igcd(k, t)=1, [$1..n])) fi end proc:

seq(seq(f(n, k), k=1..n), n=1..30); # Robert Israel, Aug 29 2016

MATHEMATICA

A[n_, k_] := Count[Range[n], x_ /; CoprimeQ[x, k] && x != k];

Table[A[n, k], {n, 1, 13}, {k, 1, n}] // Flatten (* Jean-François Alcover, Mar 05 2019 *)

CROSSREFS

Sequence in context: A292585 A175872 A143117 * A029235 A289052 A329046

Adjacent sequences:  A076218 A076219 A076220 * A076222 A076223 A076224

KEYWORD

nonn,tabl

AUTHOR

Olivier Gérard

EXTENSIONS

Definition and example corrected by Robert Israel, Aug 29 2016

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 2 19:18 EST 2021. Contains 341756 sequences. (Running on oeis4.)