[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a231475 -id:a231475
     Sort: relevance | references | number | modified | created      Format: long | short | data
Largest integer less than 10, coprime to n.
+10
4
9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 5, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 5, 9, 9, 8, 9, 9, 7, 9, 9, 8, 9, 9, 7, 9, 9
OFFSET
1,1
COMMENTS
Periodic with period 210.
Motivated by A231155(n)=a(n)*(10^(n-1)-1)/9.
a(n) is in {1, 5, 7, 8, 9}. Average value is 253/30 = 8.433.... - Charles R Greathouse IV, Oct 13 2022
EXAMPLE
a(210)=1 because 210=2*3*5*7 is not coprime to any number n>1, n<10.
PROG
(PARI) a(n)=for(k=1, 9, gcd(n, 10-k)==1&&return(10-k))
(PARI) a(n)=n=n%210; (2456570291879305656378327950088507572292988734220585220471023291179171177166614 45448973642646595615830994341498146323777941833948520102560885856758200689935551 394284409822886865709103348710416026442401 \ 9^n)%9+1 \\ Charles R Greathouse IV, Oct 13 2022
CROSSREFS
Cf. A231475 (analog for 5), A231471 (analog for 11), A231155.
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 09 2013
STATUS
approved
Largest integer less than 11 and coprime to n.
+10
4
10, 9, 10, 9, 9, 7, 10, 9, 10, 9, 10, 7, 10, 9, 8, 9, 10, 7, 10, 9, 10, 9, 10, 7, 9, 9, 10, 9, 10, 7, 10, 9, 10, 9, 9, 7, 10, 9, 10, 9, 10, 5, 10, 9, 8, 9, 10, 7, 10, 9, 10, 9, 10, 7, 9, 9, 10, 9, 10, 7, 10, 9, 10, 9, 9, 7, 10, 9, 10, 9, 10, 7, 10, 9, 8, 9, 10, 7, 10, 9
OFFSET
1,1
COMMENTS
Motivated by the m = 10 analog A231470 which in turn was motivated by A231155, simply a repetition of (n-1) times the same digit A231470(n).
Periodic with period 210. Possible values are 1, 5, 7, 8, 9, 10. - Robert Israel, Jul 03 2020
LINKS
EXAMPLE
a(1) = 10 because 10 is the largest integer less than 11 and it's coprime to 1.
a(2) = 9 because 10 is not coprime to 2 but 9 is.
a(6) = 7 because 10, 9 and 8 are not coprime to 6 = 2*3.
a(210) = 1 because 210 = 2*3*5*7 is not coprime to any number n > 1, n < 11.
MAPLE
f:= proc(n) local k;
for k from 10 by -1 do if igcd(n, k)=1 then return k fi od
end proc:
map(f, [$1..210]); # Robert Israel, Jul 03 2020
MATHEMATICA
Table[m = 10; While[GCD[m, n] != 1, m--]; m, {n, 75}] (* Alonso del Arte, Nov 09 2013 *)
PROG
(PARI) a(n, m=11)=for(k=1, m, gcd(n, m-k)==1&&return(m-k))
CROSSREFS
Cf. A231475 (analog for 5), A231470 (analog for 10), A231155.
KEYWORD
nonn,easy
AUTHOR
M. F. Hasler, Nov 09 2013
STATUS
approved

Search completed in 0.007 seconds