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.

A231472 Largest integer less than 12 and coprime to n.

This page as a plain text file.
%I A231472 #15 Mar 02 2018 18:19:55
%S A231472 11,11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,9,11,
%T A231472 11,11,11,11,11,11,11,11,11,10,11,11,11,11,11,11,11,11,11,11,9,11,11,
%U A231472 11,11,11,11,11,11,11,11,9,11,11,11,11,11,11,11,11,11,11,7,11,11,11,11,11,11,11,11,11,11,10
%N A231472 Largest integer less than 12 and coprime to n.
%C A231472 Values in this sequence are 1, 5, 7, 8, 9, 10, and 11; the average value is 3569/330 = 10.81515.... - _Charles R Greathouse IV_, Aug 19 2016
%H A231472 Harvey P. Dale, <a href="/A231472/b231472.txt">Table of n, a(n) for n = 1..1000</a>
%e A231472 a(1..10)=11 because this is the largest integer less than 12 and it is coprime to n=1,...,10.
%e A231472 a(11)=10 because 11 is not coprime to 11 but 10 is.
%e A231472 a(22)=9 because 11 and 10 are not coprime to 22=2*11.
%e A231472 a(2310)=1 because 2310=2*3*5*7*11 is not coprime to any number n>1, n<12.
%t A231472 Table[SelectFirst[Range[11,1,-1],CoprimeQ[#,n]&],{n,80}] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Mar 02 2018 *)
%o A231472 (PARI) a(n,m=12)=for(k=1,m,gcd(n,m-k)==1&&return(m-k))
%Y A231472 Cf. A231471 (analog for 11), A231470 (analog for 10), A231155.
%K A231472 nonn,easy
%O A231472 1,1
%A A231472 _M. F. Hasler_, Nov 09 2013