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.

A126260 Irregular triangle read by rows where row n contains the positive integers k, k<=n, where every positive integer <=k and coprime to k is also coprime to n.

This page as a plain text file.
%I A126260 #13 Oct 10 2019 13:55:16
%S A126260 1,1,2,1,2,3,1,2,4,1,2,3,4,5,1,2,6,1,2,3,4,5,6,7,1,2,4,6,8,1,2,3,6,9,
%T A126260 1,2,4,10,1,2,3,4,5,6,7,8,9,10,11,1,2,6,12,1,2,3,4,5,6,7,8,9,10,11,12,
%U A126260 13,1,2,4,6,14,1,2,3,15,1,2,4,6,8,10,12,14,16,1,2,3,4,5,6,7,8,9,10,11,12
%N A126260 Irregular triangle read by rows where row n contains the positive integers k, k<=n, where every positive integer <=k and coprime to k is also coprime to n.
%C A126260 The first term of each row is 1. The second term of each row, except for row 1, is 2. The last term of row n is n.
%H A126260 Michael De Vlieger, <a href="/A126260/b126260.txt">Table of n, a(n) for n = 1..12325</a> (rows 1 <= n <= 300).
%e A126260 Table begins:
%e A126260 1
%e A126260 1,2
%e A126260 1,2,3
%e A126260 1,2,4
%e A126260 1,2,3,4,5
%e A126260 1,2,6
%e A126260 ...
%e A126260 Row 10 is (1,2,4,10) because the positive integers <=1 and coprime to 1 are {1}, for 2 they are {1}, for 4 they are {1,3}, for 10 they are {1,3,7, 9}; and 1,1,1,3,1,3,7,9 are each coprime to 10.
%t A126260 f[n_] := Select[Range[n], GCD[ #, n] == 1 &];g[n_] := Select[Range[n], Times @@ GCD[f[ # ], n] == 1 &];Flatten@Table[g[n], {n, 17}] (* _Ray Chandler_, Dec 24 2006 *)
%t A126260 Table[Select[Range@ n, Function[k, AllTrue[Select[Range@ k, CoprimeQ[#, k] &], CoprimeQ[#, n] &]]], {n, 17}] // Flatten (* _Michael De Vlieger_, Aug 21 2017 *)
%K A126260 nonn,tabf
%O A126260 1,3
%A A126260 _Leroy Quet_, Dec 22 2006
%E A126260 Extended by _Ray Chandler_, Dec 24 2006