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.

A265675 Number of smaller squarefree numbers that are coprime to the n-th squarefree number.

Original entry on oeis.org

0, 1, 2, 3, 2, 5, 3, 7, 8, 5, 6, 11, 12, 8, 9, 15, 10, 17, 8, 19, 13, 13, 15, 23, 15, 17, 26, 11, 28, 18, 30, 21, 32, 25, 23, 23, 36, 37, 25, 30, 18, 41, 29, 22, 44, 45, 30, 36, 22, 49, 32, 51, 41, 34, 39, 55, 44, 41, 38, 47, 60, 61, 30, 63, 36, 43, 66, 67
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 13 2015

Keywords

Comments

a(n) = number of A005117(k) such that A005117(k) and A005117(n) are coprime, k = 1..n-1.

Examples

			A005117(7) = 10, A005117(1..6) = [1,2,3,5,6,7],
->  a(7) = #{1,3,7} = 3;
A005117(8) = 11, A005117(1..7) = [1,2,3,5,6,7,10],
->  a(8) = #{1,2,3,5,6,7,10} = 7;
A005117(9) = 13, A005117(1..8) = [1,2,3,5,6,7,10,11],
->  a(9) = #{1,2,3,5,6,7,10,11} = 8;
A005117(10) = 14, A005117(1..9) = [1,2,3,5,6,7,10,11,13],
->  a(10) = #{1,3,5,11,13} = 5;
A005117(11) = 15, A005117(1..10) = [1,2,3,5,6,7,10,11,13,14],
->  a(11) = #{1,2,7,11,13,14} = 6.
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits)
    a265675 n = a265675_list !! (n-1)
    a265675_list = map (\(x:xs) -> length $ filter ((== 1) . gcd x) xs) $
                       map reverse $ tail $ inits a005117_list
  • Mathematica
    With[{sf=Select[Range[200],SquareFreeQ]},Table[Total[Boole[CoprimeQ[sf[[n]],sf[[Range[1,n-1]]]]]],{n,70}]] (* Harvey P. Dale, Oct 12 2024 *)

Formula

a(n) = Sum_{k=1..n-1} A008966(A005117(n)*A005117(k)).