login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A275257 Array read by upwards antidiagonals: LegendrePhi phi(x,n), x,n >=1. 3
1, 2, 1, 3, 1, 1, 4, 2, 2, 1, 5, 2, 2, 1, 1, 6, 3, 3, 2, 2, 1, 7, 3, 4, 2, 3, 1, 1, 8, 4, 4, 3, 4, 1, 2, 1, 9, 4, 5, 3, 4, 1, 3, 1, 1, 10, 5, 6, 4, 5, 2, 4, 2, 2, 1, 11, 5, 6, 4, 6, 2, 5, 2, 2, 1, 1, 12, 6, 7, 5, 7, 3, 6, 3, 3, 2, 2, 1, 13, 6 (list; table; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Peter Kagey, Table of n, a(n) for n = 1..10000

L. Toth, On the Bi-Unitary Analogues of Euler's Arithmetical Function and the Gcd-Sum Function, JIS 12 (2009) 09.5.2, function phi(x,n).

FORMULA

phi(x,n) = Sum_{k=1..x} A054431(k,n).

phi(n,n) = A000010(n).

EXAMPLE

Upper left corner of array begins

   1 1 1 1 1 1 1 1 1 1 ...

   2 1 2 1 2 1 2 1 2 1 ...

   3 2 2 2 3 1 3 2 2 2 ...

   4 2 3 2 4 1 4 2 3 2 ...

   5 3 4 3 4 2 5 3 4 2 ...

   6 3 4 3 5 2 6 3 4 2 ...

   7 4 5 4 6 3 6 4 5 3 ...

   8 4 6 4 7 3 7 4 6 3 ...

   9 5 6 5 8 3 8 5 6 4 ...

  10 5 7 5 8 3 9 5 7 4 ...

MAPLE

A275257 := proc(x, n)

    local a, k ;

    a :=0 ;

    for k from 1 to x do

        if igcd(k, n) = 1 then

            a := a+1 ;

        end if;

    end do:

    a ;

end proc:

seq(seq(A275257(d-n, n), n=1..d-1), d=2..15) ;

MATHEMATICA

With[{nn = 14}, Table[#[[k, n - k + 1]], {n, nn - 1}, {k, n}] &@ Map[Accumulate, Table[Boole@ CoprimeQ[k, n], {n, nn}, {k, nn - n}]]] // Flatten (* Michael De Vlieger, Jan 09 2018 *)

PROG

(Ruby)

def a(x, n); (1..x).count { |k| k.gcd(n) == 1 } end

# Peter Kagey, Jan 08 2018

CROSSREFS

Partial sums of A054431. Cf. A078401 (upper right triangle).

Sequence in context: A138151 A207378 A166556 * A325027 A306735 A275937

Adjacent sequences:  A275254 A275255 A275256 * A275258 A275259 A275260

KEYWORD

nonn,easy,tabl

AUTHOR

R. J. Mathar, Jul 21 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 06:58 EDT 2022. Contains 356959 sequences. (Running on oeis4.)